28.06.2012, 21:06
pawn Код:
if(strcmp(cmd, "/aod", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if(aduty[playerid] == 0)
{
aduty[playerid] = 1;
SetPlayerHealth(playerid, 99999);
SetPlayerArmour(playerid, 99999);
SetPlayerColor(playerid, COLOR_LIGHTRED);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "[FioriGinal]: %s went on admin duty!", sendername);
SendClientMessageToAll(COLOR_LIGHTRED, string);
}
else
{
aduty[playerid] = 0;
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
SetPlayerColor(playerid, COLOR_LIGHTRED);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "[FioriGinal]: %s went off admin duty!", sendername);
SendClientMessageToAll(COLOR_LIGHTRED, string);
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, " Nu esti admin !");
}
}
return 1;
}