World Bounds
#1

I'm creating a world bounds system to avoid the player escaping the TDM Gameplay area.
However it doesn't work. So i used gangzones to get the maxx, maxy, minx, miny.

It still don't work.

It's very simple. I want to create a square area.
Las Venturas (Default Spawn of blank.amx) to Caligulas Casino.

Code:

Note: I even try SetPlayerWorldBounds but didn't work.

pawn Код:
public IsInBounds()
{
    for(new i; i < MAX_SLOTS; i++)
    {
        if(IsPlayerConnected(i))
        {
            new Float:X, Float:Y, Float:Z;
            GetPlayerPos(i, X, Y, Z);
            if(!(X <= 1930.159423 && X >= 1351.851684 && Y <= 2184.662597 && Y >= 1754.383666)) return 1;
            else
            {
                SetPlayerHealth(i, 0.0);
                GameTextForPlayer(i, "~w~Stay in the ~r~gameplay ~w~bounds!", 1000, 5);
            }
        }
    }
    return 1;
}
Even if i remove the ! in the (X. Still doesn't work. Even i change the code except the maxx, maxy, minx, miny. It doesn't work.
Reply


Messages In This Thread
World Bounds - by JaKe Elite - 15.12.2012, 06:36
AW: World Bounds - by Kevin54321 - 15.12.2012, 07:47
Re: World Bounds - by Lordzy - 15.12.2012, 07:58

Forum Jump:


Users browsing this thread: 2 Guest(s)