Booleans help!
#4

On the top of the script:
Код:
new bool:god[MAX_PLAYERS];
Under OnPlayerConnect:
Код:
public OnPlyerConnect(playerid)
{
     god[playerid] = 0;
     return 1;
}
Код:
if(strcmp(cmd, "/God", true) == 0)
	{
	 	if (PlayerStats[playerid][pAdmin] >= 2)
	    {
			if(god[playerid] == 0)
			{
			    god[playerid] = 1;
                            SetPlayerHealth(playerid,999);
			}
			else
			{
			    god[playerid] = 0;
                            SetPlayerHealth(playerid,100);
			}
		}
  		return 1;
	}
This ?!
Reply


Messages In This Thread
Booleans help! - by HighHP - 16.02.2015, 08:55
Re: Booleans help! - by $$inSane - 16.02.2015, 09:54
Re: Booleans help! - by HighHP - 22.02.2015, 01:21
Re: Booleans help! - by Stoyanov - 22.02.2015, 10:29

Forum Jump:


Users browsing this thread: 2 Guest(s)