Deci, am un script vehicle-system, dar functiile "park" si "handbrake" nu au bind key, trebuie activate/dezactivate prin comanda. Am incercat sa le pun eu bind key dar nu am gasit functia potrivita. A-si fii recunoscator daca cineva ar putea sa imi dea codul complet.
P.S: Nu sunt scripter! Nu stiu prea multe in scripting.
for i,v in ipairs(getElementsByType("player")) do
bindKey(v, "j", "down", toggleVehicleEngine)
bindKey(v, "l", "down", toggleVehicleLights)
bindKey(v, "k", "down", toggleVehicleLock)
bindKey(v, "h", "down", triggerEmergencyLights)
end
outputServerLog("[VEHICLES] [AUTO/SPAWN] All vehicles spawned as the resource started.")
outputServerLog("[VEHICLES] [AUTO/BIND] All players binded with vehicle commands.")
end
)
addEventHandler("onPlayerLogin", cRoot,
function()
bindKey(source, "j", "down", toggleVehicleEngine)
bindKey(source, "l", "down", toggleVehicleLights)
bindKey(source, "k", "down", toggleVehicleLock)
bindKey(source, "h", "down", triggerEmergencyLights)
end