SA-MP Forums Archive
IsPlayerInZone - 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)
+--- Thread: IsPlayerInZone (/showthread.php?tid=507617)



IsPlayerInZone - Addons - 18.04.2014

Hi all.

Ok, so I've IsPlayerInZone stock but doesn't work 'cause /war show me a message "You aren't on gangzone".

Function:
Код:
forward IsPlayerInZone(playerid, zoneid);
stock IsPlayerInZone(playerid, zoneid)
{
   new Float:x, Float:y, Float:z;
   GetPlayerPos(playerid, x, y, z);
   return (x > TeritoriuData[zoneid][tPozX1] && x < TeritoriuData[zoneid][tPozY1] && y > TeritoriuData[zoneid][tPozX2] && y < TeritoriuData[zoneid][tPozY2]);
}
Sorry for my bad english, i'm from another country.


Re : IsPlayerInZone - S4t3K - 18.04.2014

Why do you want to put a forward for a normal function ?

Read again and again the wiki about forward.

That's a good way to use forward. But yours is useless. Simply remove the forward then retry.

PHP код:

// MyCommand
SetTimer("myFunction"180000false);
forward myFunction();
public 
myFunction()
{

Also, I've not understood at all your return.
You want to return more than 1 value, which is absolutely impossible in pawn.


Re: IsPlayerInZone - Addons - 18.04.2014

I removed forward and problem persist.