Function bug
#3

area.JPG

You need to take coords from 2 places only (red dots on picture)

And then the code would be:

pawn Код:
stock IsPlayerInArea(playerid, Float:minX, Float:minY, Float:maxX, Float:maxY)
{
    new Float:pX, Float:pY, Float:pZ;
    GetPlayerPos(playerid, pX, pY, pZ);
    if(pX >= minX && pX <= maxX && pY >= minY && pY <= maxY)
        return true;
    else
        return false;
}
Reply


Messages In This Thread
Function bug - by Unknown123 - 21.03.2011, 02:49
Re: Function bug - by s0nic - 21.03.2011, 03:09
Re: Function bug - by MadeMan - 21.03.2011, 10:29

Forum Jump:


Users browsing this thread: 1 Guest(s)