IsPlayerInZone doesn't work at all! - 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: IsPlayerInZone doesn't work at all! (
/showthread.php?tid=75918)
IsPlayerInZone doesn't work at all! -
Andom - 03.05.2009
pawn Код:
public IsPlayerInZone(playerid, Float:XMin, Float:YMin, Float:XMax, Float:YMax)
{
new RetValue = 0;
new Float: PosX, Float: PosY, Float: PosZ;
GetPlayerPos( playerid, PosX, PosY, PosZ );
if( PosX >= XMin && PosY >= YMin && PosX < XMax && PosY < YMax )
{
RetValue = 1;
}
return RetValue;
}
And
pawn Код:
if(IsPlayerInZone(playerid, 2977.858, 817.4513, 2989.536, 467.115)) // Las Venturas
{
I get those coords from Vehicle Plotter and selected whole Las Venturas, whoever if some player is in the middle of Las Venturas, IsPlayerInZone returns 0
Why?
I tried to do the same with San Fierro and Los Santos but they all don't work!
I also tried many other IsPlayerInZone and IsPlayerInArea's but they all never work!
Re: IsPlayerInZone doesn't work at all! -
Backwardsman97 - 03.05.2009
pawn Код:
if(IsPlayerInZone(playerid, 2989.536, 467.115, 2977.858, 817.4513)) // Las Venturas
Try that.
Re: IsPlayerInZone doesn't work at all! -
Weirdosport - 03.05.2009
Yeah it would seem you got your mins and max's confused. The post above contains a solution which should work
Re: IsPlayerInZone doesn't work at all! -
Andom - 04.05.2009
How do i know what is the right way to do it? because Vehicle Plotter gave me these coordinates.
Re: IsPlayerInZone doesn't work at all! -
radeee - 24.08.2009
What are coordinates for Los Santos?
Re: IsPlayerInZone doesn't work at all! -
Limex - 24.08.2009
That vehicle plotter put them like 10 metres in the wrong direction for me. Didn't work at all.
Re: IsPlayerInZone doesn't work at all! -
radeee - 24.08.2009
Quote:
Originally Posted by Seif_ [adream-rp.com
]
Use my SeifArea to get square zones coordinates. You just need to read the thread's first post to make sure you know how to do it.
|
Thx Seif for great plug