29.06.2012, 09:23
Not sure if it's going to work but I hope so
pawn Код:
new PlayerOldColor[MAX_PLAYERS];
pawn Код:
if(strcmp(cmd, "/aod", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new curcolor;
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if(aduty[playerid] == 0)
{
aduty[playerid] = 1;
SetPlayerHealth(playerid, 99999);
SetPlayerArmour(playerid, 99999);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "[FioriGinal]: %s went on admin duty!", sendername);
PlayerOldColor[playerid] = GetPlayerColor(playerid);
SendClientMessageToAll(COLOR_LIGHTRED, string);
}
else
{
aduty[playerid] = 0;
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "[FioriGinal]: %s went off admin duty!", sendername);
SetPlayerColor(playerid, PlayerOldColor[playerid]);
SendClientMessageToAll(COLOR_LIGHTRED, string);
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, " Nu esti admin !");
}
}
return 1;
}