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)
+--- Thread: IsPlayerInArea (
/showthread.php?tid=646522)
IsPlayerInArea -
kapciowat - 18.12.2017
Hello.
I have problem with isplayerinarea in my gamemode i have this
Код:
if(IsPlayerInArea(playerid, 1331.2108, 1320.6995, 236.5835, 306.1077))
{
GameTextForPlayer(playerid, "~g~Welcome", 3000, 5);
}
but IsPlayerInArea didn't work. (good x,y)
Function IsPlayerInArea
Код:
IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if (x > minx && x < maxx && y > miny && y < maxy) return 1;
return 0;
}
Can somebody help?
Re: IsPlayerInArea -
Sithis - 18.12.2017
What's the X and Y of the player?
Try to print it while debugging. It might tell you why it's not working.
For your info, the location you are checking for, is Las Venturas Airport: