SA-MP Forums Archive
Tagon / Tagoff - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Tagon / Tagoff (/showthread.php?tid=183223)



Tagon / Tagoff - ColdXX - 14.10.2010

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!


Re: Tagon / Tagoff - HyperZ - 14.10.2010

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;
}




Re: Tagon / Tagoff - ColdXX - 14.10.2010

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