16.05.2009, 08:57
Quote:
Originally Posted by FreeSoul
I changed it a bit so it fits my gamemode.
It changes his name to Unknown,but when he does it again it doesn't change his name back. Код:
if (strcmp("/nameoff", cmdtext, true, 5) == 0) { if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11) { GetPlayerName(playerid, playername, sizeof(playername)); if (NameOff[playerid] == 0) { GetPlayerName(playerid, playername, sizeof(playername)); SetPlayerName(playerid,"Unknown"); NameOff[playerid] = 1; return 1; } else { NameOff[playerid] = 0; SetPlayerName(playerid,playername); return 1; } } } |
pawn Код:
// top script
new pName[26][MAX_PLAYERS];
// on connect
GetPlayerName(playerid, pName[playerid], 26);
// command.
SetPlayerName(playerid, pName[playerid]);