28.11.2012, 21:31
If you use the offdutyname[MAX_PLAYERS][24] variable by NumbSkull:
pawn Код:
if (admintag == 1)
{
SetPlayerName(playerid, offdutyname[playerid]);
}
if(strcmp(cmd, "/setadmintag", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] <= 5) return SendClientMessage(playerid, COLOR_LIGHTRED, "* You need to be admin, to do this!");
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /setadmintag [Admin Name]");
SetPlayerName(playerid, tmp);
admintag = 1;
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(offdutyname, 24, name);
SendClientMessage(playerid, COLOR_GREY, "* You have set your admin name!");
return 1;
}
return 1;
}