SA-MP Forums Archive
Need Help With IsVehicleInArea - 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: Need Help With IsVehicleInArea (/showthread.php?tid=302083)



Need Help With IsVehicleInArea - titanak - 07.12.2011

Hello , i need some help

i got function

pawn Код:
IsVehicleInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
{
    new Float:x, Float:y, Float:z;
    GetVehiclePos(GetPlayerVehicleID(playerid), x, y, z);
    if (x > minx && x < maxx && y > miny && y < maxy) return 1;
    return 0;
}
i made the gangzone

and added coords

pawn Код:
if(IsVehicleInArea(g, -2101.701171, -283.088439, -2013.701171, -91.088455)
but i want it to show all the players a text who is on the area.

but when i leave at area then it still shows gametext.

i got timer updater working too..

The Gangzone

pawn Код:
GangZoneCreate(-2101.701171, -283.088439, -2013.701171, -91.088455);
can someone help me to put coords rightly ?
i think there is something wrong with coords.


repping too please help :P


Re: Need Help With IsVehicleInArea - Sascha - 07.12.2011

the coords you are using in your function should be alright... you could try showing us the timer with the msg


Re: Need Help With IsVehicleInArea - titanak - 07.12.2011

i got fixed it , the problem was at the playerid , i changed it to the playerid value and to IsPlayerInArea ..