SA-MP Forums Archive
Is Business in Gangzone - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Is Business in Gangzone (/showthread.php?tid=651129)



Is Business in Gangzone - SeanDenZYR - 14.03.2018

i can't thing of any way to do it, i'd like some help or the code itself, i really need it


Re: Is Business in Gangzone - FailerZ - 14.03.2018

Use this function
pawn Код:
IsPointInArea(Float:X, Float:Y, Float:MinX, Float:MinY, Float:MaxX, Float:MaxY)
{
    if(X > MinX && X < MaxX && Y > MinY && Y < MaxY)
    {
        return true;
    }

    return false;
}
Feed the X and Y from the entrance to the business point (pickup/checkpoint pos) and the MinX, MinY, MaxX, MaxY the gangzone borders area (You find them in were you have created the gang zone)