06.03.2014, 22:07
pawn Код:
CMD:godon(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1 && IsPlayerConnected(playerid))
{
Godmode[playerid] = 1;
SetPlayerHealth(playerid, 99999);
SetPlayerArmour(playerid, 99999);
SendClientMessage(playerid, -1, "You have enabled the god mode");
return 1;
}
else
{
SendClientMessage(playerid, -1, "You are not an admin");
}
return 1;
}
pawn Код:
CMD:godoff(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1 && IsPlayerConnected(playerid))
{
Godmode[playerid] = 0;
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
SendClientMessage(playerid, -1, "You have disabled the god mode");
return 1;
}
else
{
SendClientMessage(playerid, -1, "You are not an admin");
}
return 1;
}