little help with isplayerinarea and gangzone - 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: little help with isplayerinarea and gangzone (
/showthread.php?tid=267881)
little help with isplayerinarea and gangzone -
boelie - 10.07.2011
Hello,
I want to easy combine IsPlayerInArea with GangZoneCreate
GangzoneCreate has (Float:minx, Float:miny, Float:maxx, Float:maxy)
so i made my IsPlayerInArea like this;
pawn Код:
stock IsPlayerInArea(playerid, Float:minx, Float:miny, Float:maxx, Float:maxy)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if (y > minx && y < miny && x > maxx && x < maxy) return 1;
return 0;
}
Now if i create the gangzone it should be simular to the area but its not..so i failed somewherein the stock
please help me with my math
Re: little help with isplayerinarea and gangzone -
iJumbo - 10.07.2011
Код:
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;
}
this is the right code so you can see its inverted ..
minx maxx miny maxy
all x then all y