20.09.2011, 08:48
Hello,
Currently I have a simple toggle variable (0-Off, 1-On) for engine which is toggled when /engine is written by a player.
In this same toggle portion, I use GetVehicleParamsEx and SetVehicleParamsEx with the only difference being the engine portion is either 0 off or 1 on (to actually start and stop it).
However there are issues such as the character automatically trying to turn the engine on when entering the vehicle (but not actually doing it) and if I turn the vehicle off, exit the vehicle, enter it again and /engine, it will freeze the player and not allow keyboard input (like what that TogglePlayerControllable does).
Is there anyway to stop these little bugs, and/or is there callbacks etc where I should be re-calling Get/Set to ensure it doesn't try to change them?
Currently I have a simple toggle variable (0-Off, 1-On) for engine which is toggled when /engine is written by a player.
In this same toggle portion, I use GetVehicleParamsEx and SetVehicleParamsEx with the only difference being the engine portion is either 0 off or 1 on (to actually start and stop it).
However there are issues such as the character automatically trying to turn the engine on when entering the vehicle (but not actually doing it) and if I turn the vehicle off, exit the vehicle, enter it again and /engine, it will freeze the player and not allow keyboard input (like what that TogglePlayerControllable does).
Is there anyway to stop these little bugs, and/or is there callbacks etc where I should be re-calling Get/Set to ensure it doesn't try to change them?