SA-MP Forums Archive
check if player is in area/boundaries - 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: check if player is in area/boundaries (/showthread.php?tid=263583)



check if player is in area/boundaries - krisis32 - 22.06.2011

How to check if player is in area.. like boundaries... If player is in it.. he have guns... when he leaves the area/boundaries.. he lose them.


Re: check if player is in area/boundaries - Tommy_Mandaz - 22.06.2011

I usually just do this, say I want the person to not have any guns inside the LSPD, I go to the center point of the LSPD and I get the coords, afterwards I do IfPlayerInRangeOfPoint of that point by say 50 it removes his weapons and so on... Not sure if that is what you wanted.


Re: check if player is in area/boundaries - krisis32 - 22.06.2011

Well i have a jail, so i want to remove guns from jailed person if he is in jail area. And area is like area 51


Re: check if player is in area/boundaries - Tommy_Mandaz - 23.06.2011

Maybe create a timer to check if the player is in the area using the IsPlayerInRangeOfPoint, maybe every 20 seconds it checks and if he is reset the player's weapons.


Re: check if player is in area/boundaries - krisis32 - 23.06.2011

But how big would be the range then?


Re: check if player is in area/boundaries - [HiC]TheKiller - 23.06.2011

The range is how many X and Y tiles you want to extend the area. You should find a filterscript that allows you to calculate it.


Re: check if player is in area/boundaries - Gazmull - 23.06.2011

if you wanna get a basic isplayerinjail
pawn Код:
new IsPlayerInJail[MAX_PLAYERS] //on the globals.

//to any cmds or blah blah blah any
if(IsPlayerInJail[ playerid ] == true) return SendClientMessage(playerid. 0x0, "You're injail you can't enter to xD-World!"); return true;