ah ok thanks^^
bindKey("m", "down",
function(key, keyState)
if key ~= "m" or keyState ~= "down" then return end
if not isPedInVehicle(localPlayer) then return end
local vehicle = getPedOccupiedVehicle(localPlayer)
if localPlayer ~= getVehicleOccupant(vehicle, 0) then return end
if engineStarting then return end
if getVehicleEngineState(vehicle) then
setVehicleEngineState(vehicle, false)
else
if getElementData(vehicle, "tank") > 0.0 then
playSound('engine.wav')
engineStarting = true
setTimer(startEngine, 1500, 1, vehicle)
else
playSound('engineNoFuel.wav')
end
end
end
)
When i make this server-side now?
How is the easiest way to play the sounds?