Код:
CMD:god(playerid,params[])
{
if (God[playerid] == 1)
{
GameTextForPlayer(playerid,"~g~Godmod ~w~Off",4500,3);
SetPlayerHealth(playerid, 100);
Delete3DTextLabel(GodON);
God[playerid] = 0;
return 1;
}
else if(God[playerid] == 0)
{
GameTextForPlayer(playerid,"~g~Godmod ~w~On",4500,3);
GodON = Create3DTextLabel("GODMODE ON", 0xFC3A69AA, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(GodON, playerid, 0, 0, 0.3);
SetPlayerHealth(playerid, 99999);
ResetPlayerWeapons(playerid);
God[playerid] = 1;
return 1;
}
else if(PlayerInfo[playerid][Jail] == 1)
{
SetPlayerHealth(playerid, 0);
indm[playerid] = 0;
ResetPlayerWeapons(playerid);
GameTextForPlayer(playerid,"~g~Player is not in freeroam",4500,3);
}
return 1;
}
and i want to make it enabled on everytime player spawn if its enabled.So i did this:
'99999' is the naive approach and is not true infinity. Use: