Avoid moving as passenger - 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: Avoid moving as passenger (
/showthread.php?tid=443521)
Avoid moving as passenger -
GiS - 12.06.2013
Quick question ..
locking a vehicle avoids persons who would like to enter a the vehicle as a driver from moving towards it. I am in need of the same effect for passengers.
Right now I am taking care of it by setting the player's position in OnPlayerEnterVehicle to the player's current position. However, it still makes the player move a few centimeters.
Any ideas?
Re: Avoid moving as passenger -
Lordzy - 12.06.2013
Freeze & Unfreeze player using TogglePlayerControllable rather than setting player's pos. Those functions just avoids the player from entering the vehicle and doesn't bring any changes in position.
Re: Avoid moving as passenger -
GiS - 12.06.2013
Same effect.
Re: Avoid moving as passenger -
feartonyb - 12.06.2013
Quote:
Originally Posted by Lordz™
Freeze & Unfreeze player using TogglePlayerControllable rather than setting player's pos. Those functions just avoids the player from entering the vehicle and doesn't bring any changes in position.
|
Can be abused when you are frozen by admin. Don't use it.
It has to move because the function doesn't run as fast as SAMP commands
Re: Avoid moving as passenger -
Georgi166 - 12.06.2013
Make the engine be off, then turn it on after the function.
AW: Re: Avoid moving as passenger -
GiS - 12.06.2013
Quote:
Originally Posted by Georgi166
Make the engine be off, then turn it on after the function.
|
How do you mean that? Turning the engine off and immediately back on would fix it?
Re: Avoid moving as passenger -
FGaming - 12.06.2013
GiS give us the code for it, so I can help you fix it.
Re: Avoid moving as passenger -
GiS - 13.06.2013
No further ideas?