Author Topic: Set a players Tag  (Read 968 times)

I noticed when you are dead in a TDM it adds *DEAD* to your tag
what is the script to do that i looked and all i see where the same thing

GameConnection.clanSuffix = string suffix; GameConnection.clanPrefix = string prefix;

But how do i set it?
do i replace string suffix and the string prefix?

Of course. If you knew how syntax works you would already know what to do with what he gave you.

I am pretty new to scripting
I have never scripted before.
but would this work?
Code: [Select]
package Admin
{
if(player.isAdmin)

Then
{
GameConnection.clanSuffix = <color:00ffff>[<color:ff0000>ADMIN<color:00ffff>];
}
}
« Last Edit: August 15, 2009, 04:57:39 PM by Pah1023 »

Don't just vaguely jam random bits of code you see together. It really won't help.

I am just trying out a simple script to change the persons tag if they are admin and to show that they are admin

I noticed when you are dead in a TDM it adds *DEAD* to your tag
You could try reading the Team Deathmatch script? Search for "servercmdmessagesent".

You could try reading the Team Deathmatch script? Search for "servercmdmessagesent".
Heres what it says when i search for it
Quote
Done. No matches has been found.
Edit: Nvm found something.
but what would be the IfAdmin thing?
Would it be Client.IfAdmin?
Edit again:Umm i getting a little confuse on the script
heres what i would have
Code: [Select]
Package Admin
{
if(client.isAdmin)
echo(GameConnection.clanSuffix = <color:00ffff>[<color:ff0000>ADMIN<color:00ffff>];)
{
Package SAdmin
{
if(client.isSuperAdmin)
echo(GameConnection.clanSuffix = <color:00ffff>[<color:ff0000>SuperADMIN<color:00ffff>];)
{
Im gonna test it out now
Edit again the second time: Didnt work came up with syntax errors
« Last Edit: August 15, 2009, 05:22:09 PM by Pah1023 »

Don't just vaguely jam random bits of code you see together. It really won't help.

I found a code here but it will not show Admin or SAdmin
Code: [Select]
package Adminchat
{
function ServerCmdmessagesent(%client,%message)
{
messageAll(",",%client.status SPC %client.name SPC"<color:FFFFFF>:"SPC %message);
}
};
activatePackage(Adminchat);
Just shows my name as red

Perhaps you should start with something more simple.

Ok what would be simple?

Editing weapons.
Then when you feel comfortable with intensive experimenting (and not releasing, please), move onto making these weapons do special things using advanced functions.
You will mess up a lot, but that's the whole idea about learning.

I am pretty new to scripting
I have never scripted before.
but would this work?
Code: [Select]
package Admin
{
if(player.isAdmin)

Then
{
GameConnection.clanSuffix = <color:00ffff>[<color:ff0000>ADMIN<color:00ffff>];
}
}

package Admin
{
// Hmm - Forgot a function.
   if(player.isAdmin) //You're saying, that the client/object/thing called "Player" is checking for Admin?, if(%client.isAdmin)
   
   Then //Err, no "Then"'s, also, what is that freaking space doing there?
                 //if(%client.isAdmin)
                 //{
                 //GameConnection.clanSuffix =[BEEP-FAIL]
   {
      GameConnection.clanSuffix = <color:00ffff>[<color:ff0000>ADMIN<color:00ffff>];
   }

A bit messy, here it comes from my point of view.
Code: [Select]
package Admin
{
                function GameConnection::AutoAdminCheck(%client)
                {
                if(%client.isAdmin)
                {
               GameConnection.clanSuffix="<color:00ffff>[<color:ff0000>ADMIN<color:00ffff>]";
                }
                }
};
Don't copy and paste cause i used space for TAB.
[Sorry for errors and mess]