Safe zone
#7

Код:
public IsPlayerInArea()
{
  new Float:X, Float:Y, Float:Z;
  for(new i=0; i < MAX_PLAYERS; i++)
  {
    if (!IsPlayerConnected(i))
      continue;
		  
    GetPlayerPos(i, X, Y, Z);
    if (X <= -1665 && X >= -1832 && Y <= 973 && Y >= 784)
    {
      SetPlayerHealth(i, 999999.9);
      InArea[i] = 1;
    }
    else if (InArea[i] == 1)
	{
    		SetPlayerHealth(i, 100);
  		InArea[i] = 0;
    }
  }
}
make sure you do this too

Код:
OnPlayerConnect(playerid)
{
  [...]

  InArea[playerid] = 0;

  [...]
}
Reply


Messages In This Thread
Safe zone - by fiordas - 15.02.2009, 20:04
Re: Safe zone - by Pghpunkid - 15.02.2009, 20:07
Re: Safe zone - by Salmon - 15.02.2009, 20:09
Re: Safe zone - by fiordas - 15.02.2009, 20:31
Re: Safe zone - by Pghpunkid - 15.02.2009, 20:36
Re: Safe zone - by fiordas - 15.02.2009, 20:38
Re: Safe zone - by [RP]Rav - 15.02.2009, 20:43
Re: Safe zone - by fiordas - 15.02.2009, 20:47

Forum Jump:


Users browsing this thread: 3 Guest(s)