Tagon / Tagoff
#1

I have made these 2 cmds it worked at first time,then when i edited the /tagoff ,the server crashed!
Then i edited again both,and now none work lol!

http://pastebin.com/WgdzqXwW

here is the code!
Help will be apreciated!
Reply
#2

Try this:
Quote:

//=============================/tagon=========================================//
if(strcmp(cmdtext,"/tagon",true)==0)
{
if(tagon[playerid] == 1) return SendClientMessage(playerid,red,"You already wearing the [CnCs] Tag!");
if(hastag[playerid] == 0)
{
hastag[playerid] = 1;
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string),"%s[CnCs]", name);
SetPlayerName(playerid, string);
}
return 1;
}

//=====================================/tagoff================================//
if(strcmp(cmdtext,"/tagoff",true)==0)
{
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string),"%s", name);
SetPlayerName(playerid, string);
}
return 1;
}

Reply
#3

The Tagoff command is wrong (the one u showed to me) cuz i need to get the player name after i assigned tag then delete the characters!

Fixed them!
Ty
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)