check if player is in area/boundaries
#1

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

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

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
Reply
#4

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

But how big would be the range then?
Reply
#6

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

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;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)