07.10.2009, 14:58
Hi..
I was trying to check whether a player is in certain Area for my bank script. But Even if I enter that particular area, it doesn't works. I checked the whole code and everything seems fine. So I guess the problem is probably with my co-ords.
This is from my savedpositions.txt :
And this is my failing line:
Here's my IsPlayerInArea Code
I was trying to check whether a player is in certain Area for my bank script. But Even if I enter that particular area, it doesn't works. I checked the whole code and everything seems fine. So I guess the problem is probably with my co-ords.
This is from my savedpositions.txt :
Код:
AddPlayerClass(217,-1990.9180,298.8868,35.4688,78.8712,0,0,0,0,0,0); // minx AddPlayerClass(217,-1980.5435,299.2061,35.1719,281.7545,0,0,0,0,0,0); // miny AddPlayerClass(217,-1980.7822,309.1550,35.1719,1.6553,0,0,0,0,0,0); // maxy AddPlayerClass(217,-1990.7935,309.2433,35.1794,92.5646,0,0,0,0,0,0); // maxx
Код:
if (IsPlayerInArea(playerid,-1990.7935, -1990.9180, 309.1550, 299.2061))
Код:
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; }