13.12.2011, 23:45
I wrote a stock up quickly, use this inplace of whatever your current one is.
Your function was broken because of the ordering of inputs.
When you have a set of coords, it comes in two pairs, X and Y.
You were specifying MinX and MaxX together, meaning the area was physically appearing somewhere you didn't expect it to
Your function was broken because of the ordering of inputs.
When you have a set of coords, it comes in two pairs, X and Y.
You were specifying MinX and MaxX together, meaning the area was physically appearing somewhere you didn't expect it to
pawn Код:
stock IsPlayerInArea(playerid, Float:MinX, Float:MinY, Float:MaxX, Float:MaxY)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
if (X > MinX && X < MaxX && Y > MinY && Y < MaxY)
{
return true;
}
else
{
return false;
}
}