pawn Код:
CMD:god(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, [color], "Not Authorized to use this command");
format(string, sizeof(string), "ADMIN-SPEC: %s has used /god", pname);
SentMessageToAdmins(COLOR_GREY, string);
if(GodMode[playerid] == 0)
{
timerid[playerid] = SetTimerEx("Health", 1000, true, "d", playerid);
GodMode[playerid] = 1;
GivePlayerWeapon(playerid, 22, 5000);
GivePlayerWeapon(playerid, 5, 1);
GivePlayerWeapon(playerid, 29, 5000);
format(string, sizeof(string), "Administrator %s(ID:%d) has turn on his/her God Mode!", pname, playerid);
SendClientMessageToAll(COLOR_GREEN, string);
SendClientMessage(playerid, COLOR_GREEN, "| - God Mode ON! - |");
PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
}
else
{
GodMode[playerid] = 0;
SetPlayerHealth(playerid, 100.0);
SetPlayerArmour(playerid, 100.0);
format(string, sizeof(string), "Administrator %s(ID:%d) has turn off his/her God Mode!", pname, playerid);
SendClientMessageToAll(COLOR_RED, string);
SendClientMessage(playerid, COLOR_RED, "| - God Mode OFF! - |");
PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
KillTimer(timerid[playerid]);
}
return 1;
}