Loop through all vehicles, checking if player stands opposite of vehicle door - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Loop through all vehicles, checking if player stands opposite of vehicle door (
/showthread.php?tid=489902)
Loop through all vehicles, checking if player stands opposite of vehicle door -
Riwerry - 24.01.2014
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.
Re: Loop through all vehicles, checking if player stands opposite of vehicle door -
Misiur - 24.01.2014
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.
Re: Loop through all vehicles, checking if player stands opposite of vehicle door -
Riwerry - 24.01.2014
hmm seems hard
can you give me example how can I check if is player near some vehicle?? (in his area)
Re: Loop through all vehicles, checking if player stands opposite of vehicle door -
MP2 - 24.01.2014
Quote:
Originally Posted by Misiur
|
https://sampwiki.blast.hk/wiki/GetVehicleModelInfo