01.10.2011, 12:58
pawn Код:
new bool: God[MAX_PLAYERS];
public OnPlayerDeath(playerid, killerid, reason)
{
if(God[killerid] == true && killerid != INVALID_PLAYER_ID)
{
SetPlayerHealth(killerid, 0);
God[killerid] = false;
}
return 1;
}
if (strcmp("/godon", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,0xAA3333AA,">>");
SendClientMessage(playerid,COLOR_RED,"GodMod ON!");
SetPlayerHealth(playerid,99999);
God[playerid] = true;
return 1;
}
if (strcmp("/godoff", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,0xAA3333AA,">>");
SendClientMessage(playerid,COLOR_RED,"GodMod OFF!");
SetPlayerHealth(playerid,100);
God[playerid] = false;
return 1;
}