IsPlayerInArea
#1

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?
Reply
#2

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:
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)