14.10.2013, 18:41
IsPlayerInRangeOfPoint does not really check for squared areas... It was made to checks for spheres (Notice the range parameter).
But you can easily create a function like:
Usage:
Or you can use Incognito's streamer.
But you can easily create a function like:
pawn Код:
stock IsPlayerInSquaredArea(playerid, Float:minx, Float:miny, Float:maxx, Float:maxy)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if(minx <= x <= maxx && miny <= y <= maxy) return true;
else return false;
}
pawn Код:
if(IsPlayerInSquaredArea(playerid, 123.123, 234.234, 123.123, 234.234)
SendClientMessage(playerid, -1, "You are inside the squared area");