12.07.2011, 08:19
My bad for not reading it completely, here you go and It works, I have tested it.
pawn Код:
if(strcmp(cmd, "/aduty", true) == 0) {
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "[System] You are not authorized to use that command !");
new name[MAX_PLAYER_NAME];
if(AdminDutyStatus[playerid] == 0) {
SendClientMessage(playerid,COLOR_YELLOW,"You are now on Admin Duty!");
AdminDutyStatus[playerid] = 1;
GetPlayerName(playerid, name, sizeof(name));
SetPlayerName(playerid, GetPlayerFirstName(playerid));
return 1;
} else if(AdminDutyStatus[playerid] == 1) {
SendClientMessage(playerid,COLOR_YELLOW,"You have gone off Admin Duty!");
AdminDutyStatus[playerid] = 0;
SetPlayerName(playerid, name);
return 1;
}
return 1;
}