21.03.2011, 10:29
area.JPG
You need to take coords from 2 places only (red dots on picture)
And then the code would be:
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;
}