SA-MP Forums Archive
IsPlayerInArea Problem - 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 Problem (/showthread.php?tid=82760)



IsPlayerInArea Problem - Emrets61 - 20.06.2009

I created IsPlayerInArea code in OnPlayerSpawn. But my code not work. Where is the problem ?

pawn Код:
if(IsPlayerInArea(playerid,-2748.932686806969,-2814.4508055210663,-2366.9854147571964,-2722.3874149799476) == 1)
    {
      SetPlayerPos(playerid,-2203.3171,-2771.0288,35.5669);
      SetPlayerFacingAngle(playerid,75.0368);
      SendPlayerFormattedText(playerid, "Tatil alanına girebilmek iзin bilet almalısınız.", 0);
    }



Re: IsPlayerInArea Problem - GTA_Rules - 20.06.2009

You sure the coords are correct?


Re: IsPlayerInArea Problem - Emrets61 - 20.06.2009

Hmm. Wait. I re-creating coordinats.


Re: IsPlayerInArea Problem - Emrets61 - 20.06.2009

I re-created area but not work.


Re: IsPlayerInArea Problem - Karlip - 20.06.2009

Quote:
Originally Posted by Emrets61
I re-created area but not work.
Umm..
Where is the function located at?
Command/public function?


Re: IsPlayerInArea Problem - Emrets61 - 20.06.2009

Quote:
Originally Posted by Emrets61
I created IsPlayerInArea code in OnPlayerSpawn.



Re: IsPlayerInArea Problem - pascallj - 20.06.2009

You don't need to put that in OnPlayerSpawn. Then it only works on the moment that the players spawns. If you want to do this all the time place it in OnGameModeInit


Re: IsPlayerInArea Problem - Emrets61 - 20.06.2009

Quote:
Originally Posted by pascallj
You don't need to put that in OnPlayerSpawn. Then it only works on the moment that the players spawns. If you want to do this all the time place it in OnGameModeInit
OnGameModeInit haven't playerid.


Re: IsPlayerInArea Problem - pascallj - 20.06.2009

Hmm, now i tried and i don't know what IsPlayerInArea is. It is not a official command, is it? btw, I can't found it on Samp Wiki and my compiler fails also.


Re: IsPlayerInArea Problem - NiGhTWoLFy - 20.06.2009

You have added a timer to check if player is in that area?