Jump to content

[HELP]How to bind this?


Recommended Posts

Posted
function fixCar (player,command) 
    skin = getPedSkin (player) 
         if ( skin == 50 ) then 
            local vehicle = getPedOccupiedVehicle(player) 
                if (vehicle) then 
            fixVehicle(vehicle) 
            takePlayerMoney(player,100) 
        end 
    end 
end 
addCommandHandler("repair" , fixCar) 
addCommandHandler("rp" , fixCar) 

how to bind rp to right_click[if player press right_click(repair)

Guest Guest4401
Posted

Use:

bindKey 

Note: Key of right click is "mouse2"

Guest Guest4401
Posted

This is the syntax you should use.

bindKey ( player thePlayer, string key, string keyState, string commandName, string arguments ) 

Posted
function bindCarFix() 
    bindKey (source,"mouse2","down",fixCar,source) 
end 
  
addEventHandler ("onPlayerLogin",getRootElement(),bindCarFix) 
  

Posted

Joker, you won't be able to run a server or whatever you are trying to do if you don't want to learn lua.

You can't expect us to help you when you are doing nothing yourself.

Posted

Joker, you won't be able to run a server or whatever you are trying to do if you don't want to learn lua.

You can't expect us to help you when you are doing nothing yourself.

I do just whant to learn it but i need examples to learn it :|:|:|

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