04.04.2012, 00:12
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?
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?