[Help] with "IsPlayerInArea" - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help] with "IsPlayerInArea" (
/showthread.php?tid=115634)
[Help] with "IsPlayerInArea" -
BMGP - 25.12.2009
I use this in my script:
Код:
stock IsPlayerInArea(playerid, Float:max_x, Float:min_x, Float:max_y, Float:min_y)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
if(X <= max_x && X >= min_x && Y <= max_y && Y >= min_y) return 1;
return 0;
}
but how can i control if someone ISNT in the area
I tried this:
Code:
Код:
if(IsPlayerInArea(playerid,-3164.704, -2942.825, 2966.18, -490.4708) == false)
and this:
Code:
Код:
if(!IsPlayerInArea(playerid,-3164.704, -2942.825, 2966.18, -490.4708))
But it doesnt work... Can someone help me how i can do this?
BMGP