Davey Posted March 7, 2013 Posted March 7, 2013 "Davey" type="script" name="engine" /> "help.xml" type="client"/> this is one "Davey" type="script" name="Engine" /> "help.xml" type="client"/> client="1.3.1" server="1.3.1" /> false and this is 2 both of them dont dont work function turnEngineOff ( theVehicle, leftSeat, jackerPlayer ) if leftSeat == 0 and not jackerPlayer then setVehicleEngineState ( theVehicle, false ) end end -- add 'turnEngineOff' as a handler for "onPlayerExitVehicle" addEventHandler ( "onPlayerVehicleExit", getRootElement ( ), turnEngineOff ) this is the script lua function toggleEngine(source) local vehicle = getPedOccupiedVehicle(source) if vehicle then if getVehicleEngineState(vehicle) then setVehicleEngineState(vehicle, false) else setVehicleEngineState(vehicle, true) end end end addCommandHandler( "engine", toggleEngine ) and this is the command handler i dont know whats wrong can someone tell me? i made 2 meta's because i dont know which works i tried both of them but not working
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now