Help with /nametag command and /backup command? - 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: Help with /nametag command and /backup command? (
/showthread.php?tid=113193)
Help with /nametag command and /backup command? -
DeltaAirlines12 - 12.12.2009
How would I make a command so if you type /nametag it turns off all the players name tags?
Only I want the name tags to be invisible only for the person who typed it. Not everyone.
Then, how would I make a /backup command? I want the person to type /backup or /bk and it sends
a message to all players saying "(name here) is is need of backup! If you are on his team, please respond!"
Thanks for your feedback in advance!
Re: Help with /nametag command and /backup command? -
_[HuN]_Epsilon_ - 12.12.2009
pawn Код:
if(strcmp("/names-off",cmdtext, true) == 0)
{
for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, false);
return GameTextForPlayer(playerid,"~w~nametags ~r~off",3000,3);
}
if(strcmp("/names-on", cmdtext, true) == 0)
{
for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, true);
return GameTextForPlayer(playerid,"~w~nametags ~g~on",3000,3);
}
if(strcmp("/backup", cmdtext, true) == 0 || strcmp("/bk", cmdtext, true) == 0)
{
new est[128],e[MAX_PLAYER_NAME];
GetPlayerName(playerid,e,MAX_PLAYER_NAME);
format(est,128,"%s is need of backup! If you are on his team, please respond!",e);
return SendClientMessageToAll(COLOR,est);
}
Here you are.