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: IsPlayerInArea (
/showthread.php?tid=80862)
IsPlayerInArea -
Koppa, - 06.06.2009
Oh my GOOOOODDDDD! IsPlayerInArea is driving me crazyy!
Look what I am doing:
Код:
if(!IsPlayerInArea(playerid, -70.06725, -186.846, 105.1009, -11.67788)) return SendClientMessage(playerid,COLOR_RED,"* You need to be at the planting area!");
But IsPlayerInArea Always say: * You need to be at the planting area!
My IsPlayerInArea
Код:
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;
}
Re: IsPlayerInArea -
M4S7ERMIND - 06.06.2009
so whats the problem?
Re: IsPlayerInArea -
Koppa, - 06.06.2009
Solved by my self.
Re: IsPlayerInArea -
Klutty - 06.06.2009
Please tell me how, I need this function for further use.
Re: IsPlayerInArea -
yezizhu - 06.06.2009
Quote:
Originally Posted by Klutty
Please tell me how, I need this function for further use.
|
His args of IsPlayerInArea are maxx,minx,maxy,miny.
But he just mix'em up(minx,miny,maxx,maxy)