Is there any callback for gang zones?
#1

Hi, I'm trying to create a gamemode in which Hydras can roam the whole San Andreas map except Las Venturas, which will be a safe zone. I have used GangZoneCreate and GangZoneShowForAll so LV is green and has a yellow border:



What I want to do is the following: when a player enters the yellow border he gets a warning (I might use GameTextForPlayer for that), and if he enters the green zone in a Hydra the vehicle is selfdestructed and the player ejected. So my question is, what's the best way for this? should I create a custom function (like IsPlayerInLV for example) that checks the coordinates of the player and returns 1 or 0, and call that function in OnPlayerUpdate? is there any other way that doesn't imply constantly checking the coordinates of all players several times per second?
Reply
#2

I think no other way
Reply
#3

You can use this library and manipulate it to your needs. I don't think there are any easier way of doing that.
Reply
#4

Ok yeah I created my own custom functions that check the coordinates and I'm calling those functions in OnPlayerUpdate, and at the moment seems to be working.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)