Need Some Info
#2

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

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;
    }
}
Reply


Messages In This Thread
Need Some Info - by titanak - 13.12.2011, 23:27
Re: Need Some Info - by Rob_Maate - 13.12.2011, 23:45

Forum Jump:


Users browsing this thread: 3 Guest(s)