06.09.2013, 17:36
Quote:
Try something like this.
Note: You will need YSI specifically y_hooks pawn Код:
- when you add a new vending machine it will create the dynamic area - entering the dynamic area will loop through the vending machine list to see if the player is in a vending machine area - when an area is found CallLocalFunction will call OnPlayerNearVending() this should be put where you want it in your script do whatever you want to do in here Advantages of this system: - No need to keep checking if a player is near a vending machine (let the streamer do the work!) - When a player does enter a dynamic area the loop check is very simple no need for IsPlayerInRangeOfPoint() Disadvantages: - Streamer might be delayed when updating |