IsPlayerInZone
#1

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.
Reply
#2

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.
Reply
#3

I removed forward and problem persist.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)