Loop through all vehicles, checking if player stands opposite of vehicle door
#1

Hello guys, how I can check when player stands near of the door some vehicle?? I want to make this to all vehicle of the server.. Thanx.
Reply
#2

This one is tricky. First, you have to fetch all vehicles which are close to player. Looping through all vehicles is not a good idea, best if you'd create some sort of areas, or just use the already streamed cars for specific player. Next, you have to determine the car door position - I'd suggest using this https://sampforum.blast.hk/showthread.php?tid=164251 . Check the distance between each door you want, and voila.
Reply
#3

hmm seems hard

can you give me example how can I check if is player near some vehicle?? (in his area)
Reply
#4

Quote:
Originally Posted by Misiur
Посмотреть сообщение
Next, you have to determine the car door position - I'd suggest using this https://sampforum.blast.hk/showthread.php?tid=164251.
https://sampwiki.blast.hk/wiki/GetVehicleModelInfo
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)