Avoid moving as passenger
#1

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?
Reply
#2

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.
Reply
#3

Same effect.
Reply
#4

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
Reply
#5

Make the engine be off, then turn it on after the function.
Reply
#6

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?
Reply
#7

GiS give us the code for it, so I can help you fix it.
Reply
#8

No further ideas?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)