Morelli Posted March 5, 2008 Share Posted March 5, 2008 Well, I'll make this short and sweet. We've got a setVehicleEngineState, but no method of retrieving what a vehicle is currently set to. It would be nice for a getVehicleEngineState to be implemented, to coincide with the setting of an engine state. getVehicleEngineState ( vehicle theVehicle ) Required Arguments theVehicle: A handle to the vehicle that you wish to know the light state of. Returns Returns a boolean. 0 is engine state off ; 1 is engine state on. Example: function GetEngineState( source ) if ( getPlayerOccupiedVehicleSeat ( source ) == 0 ) then local veh = getPlayerOccupiedVehicle ( source ) if ( getVehicleEngineState( veh ) == 1 ) then setVehicleEngineState( veh, 0 ) else setVehicleEngineState( veh, 1 ) end end end Link to comment
Jumba' Posted March 5, 2008 Share Posted March 5, 2008 Try this viewtopic.php?f=91&t=21738&p=271191&hilit=getVehicleEngineState#p271191 Link to comment
Recommended Posts