"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