AreaCheck doesn't work.
#3

pawn Код:
#define FILTERSCRIPT
#include <a_samp>
forward isPlayerInArea();
#if defined FILTERSCRIPT
#else
#endif

public OnGameModeInit()
{
    SetTimer("isPlayerInArea", 1000, 1);
    return 1;
}
public OnPlayerSpawn(playerid)
{
    return 1;
}
public isPlayerInArea()
   {
       new Float:X, Float:Y, Float:Z; //We use this to store player position
       for(new i=0; i < MAX_PLAYERS; i++) //This line defines a name for all player, the name is "i"
       {
           GetPlayerPos(i, X, Y, Z); //Here we are storing the player position on the variables X, Y, and Z defined previously
           if (X <= 2918 && X >= 925 && Y >= 598 && Y <= 2606)
           /* This line is the important one!. Here, is where you change those numbers, by the ones
           you get from the /pos command. As you can see, those coordinates, are only the X and Y ones, the Z
           doesnt matter*/

           {
               SetPlayerHealth(i, 0);
           }
       }
   }
you mixed up "<" and ">" for the Y coordinate check

edit:
don't use Hashski's version as this will put an "Circile" around a point and won't make a square as you need...
Reply


Messages In This Thread
AreaCheck doesn't work. - by Gemini - 10.03.2011, 13:23
Re: AreaCheck doesn't work. - by Hashski - 10.03.2011, 13:29
Re: AreaCheck doesn't work. - by Sascha - 10.03.2011, 13:31
Re: AreaCheck doesn't work. - by Gemini - 10.03.2011, 13:44
Re: AreaCheck doesn't work. - by Sascha - 10.03.2011, 14:28
Re: AreaCheck doesn't work. - by Gemini - 10.03.2011, 14:31

Forum Jump:


Users browsing this thread: 1 Guest(s)