Need Some Help
#1

I have a godmod command:

Код:
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:
Код:
public OnPlayerSpawn(playerid)
{
	if(God[playerid] == 1) return SetPlayerHealth(playerid, 99999);
	return 1;
}
but the bug is still there,please help
Reply
#2

What bug? Could you explain more, what exactly do you want?
Reply
#3

'99999' is the naive approach and is not true infinity. Use:
pawn Код:
Float:0x7F800000
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)