is player in area
#5

Quote:
Originally Posted by Gappy
pawn Код:
forward PlayerInAreaCheck();
pubic PlayerInAreaCheck()
{
  for(new i = 0, i < MAX_PLAYERS; i++)
  {
    if(IsPlayerInArea(i, 1543, 1608, -1634, -1602))
    {
      if(gTeam[i] == TEAM_CIVILIAN)
      {
        GameTextForPlayer(i,"~y~ You Died For Being On Police Property",5000,5);
        SetPlayerHealth(i, -999999.9);
      }
    }
  }
  return 1;
}

OnGameModeInIt()
{
  SetTimer("PlayerInAreaCheck", 1000, 1);
  return 1;
}
At the bottom of your script
pawn Код:
stock IsPlayerInArea(playerid, Float:max_x, Float:min_x, Float:max_y, Float:min_y)
{
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X, Y, Z);
    if(X <= max_x && X >= min_x && Y <= max_y && Y >= min_y) return 1;
    return 0;
}
try that
You better learn to script before misleading other people.
Reply


Messages In This Thread
is player in area - by sggassasin - 20.08.2009, 08:52
Re: is player in area - by Gappy - 20.08.2009, 09:00
Re: is player in area - by sggassasin - 20.08.2009, 09:23
Re: is player in area - by Gappy - 20.08.2009, 09:37
Re: is player in area - by MenaceX^ - 20.08.2009, 09:43
Re: is player in area - by Gappy - 20.08.2009, 09:44
Re: is player in area - by dice7 - 20.08.2009, 09:46
Re: is player in area - by Gappy - 20.08.2009, 09:48
Re: is player in area - by dice7 - 20.08.2009, 09:50
Re: is player in area - by MenaceX^ - 20.08.2009, 09:51
Re: is player in area - by Gappy - 20.08.2009, 09:55
Re: is player in area - by MenaceX^ - 20.08.2009, 10:05
Re: is player in area - by Gappy - 20.08.2009, 10:10
Re: is player in area - by MenaceX^ - 20.08.2009, 10:23
Re: is player in area - by Gappy - 20.08.2009, 10:27
Re: is player in area - by MenaceX^ - 20.08.2009, 10:58
Re: is player in area - by Gappy - 20.08.2009, 11:01
Re: is player in area - by sggassasin - 20.08.2009, 11:05
Re: is player in area - by sggassasin - 21.08.2009, 04:01
Re: is player in area - by Joe Staff - 21.08.2009, 04:17
Re: is player in area - by sggassasin - 21.08.2009, 04:31
Re: is player in area - by sggassasin - 22.08.2009, 06:09
Re: is player in area - by sggassasin - 23.08.2009, 07:30
Re: is player in area - by sggassasin - 24.08.2009, 04:40

Forum Jump:


Users browsing this thread: 9 Guest(s)