Jump to content

Ajutor- Bind key!


Recommended Posts

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) 
        outputServerLog("[VEHICLES] [AUTO/SPAWN] All vehicles spawned as the resource started.") 
        outputServerLog("[VEHICLES] [AUTO/BIND] All players binded with vehicle commands.") 
addEventHandler("onPlayerLogin", cRoot, 
        bindKey(source, "j", "down", toggleVehicleEngine) 
        bindKey(source, "l", "down", toggleVehicleLights) 
        bindKey(source, "k", "down", toggleVehicleLock) 
        bindKey(source, "h", "down", triggerEmergencyLights) 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...