Jump to content

Ajutor- Bind key!


..:D&G:..

Recommended Posts

Posted

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 

76561198066470453.png

SP37Ecj.jpg?2MTA:Rust Pre-Alpha Build v.0.3:SP37Ecj.jpg?2

https://forum.mtasa.com/viewtopic.php?f=114&t=97848

2Pac: ''Only God can judge me!''

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...