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