Jokeℝ1472771893 Posted May 17, 2012 Share Posted May 17, 2012 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) Link to comment
Guest Guest4401 Posted May 17, 2012 Share Posted May 17, 2012 Use: bindKey Note: Key of right click is "mouse2" Link to comment
Jokeℝ1472771893 Posted May 17, 2012 Author Share Posted May 17, 2012 function functionName ( player keyPresser, string mouse2, string rp, [ var arguments, ... ] ) ?????????? Link to comment
Guest Guest4401 Posted May 17, 2012 Share Posted May 17, 2012 This is the syntax you should use. bindKey ( player thePlayer, string key, string keyState, string commandName, string arguments ) Link to comment
Jokeℝ1472771893 Posted May 17, 2012 Author Share Posted May 17, 2012 bindKey ( player thePlayer, string mouse2, string mouse2, string rp, string rp ) this? Link to comment
Guest Guest4401 Posted May 17, 2012 Share Posted May 17, 2012 I gave you the syntax, not the script. You have to see the wiki page on how to use it. https://wiki.multitheftauto.com/wiki/BindKey Link to comment
Jokeℝ1472771893 Posted May 17, 2012 Author Share Posted May 17, 2012 pleas give me script Link to comment
mjr Posted May 17, 2012 Share Posted May 17, 2012 function bindCarFix() bindKey (source,"mouse2","down",fixCar,source) end addEventHandler ("onPlayerLogin",getRootElement(),bindCarFix) Link to comment
Smart. Posted May 17, 2012 Share Posted May 17, 2012 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. Link to comment
Jokeℝ1472771893 Posted May 17, 2012 Author Share Posted May 17, 2012 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 Link to comment
Jokeℝ1472771893 Posted May 17, 2012 Author Share Posted May 17, 2012 function bindCarFix() bindKey (source,"mouse2","down",fixCar,source) end addEventHandler ("onPlayerLogin",getRootElement(),bindCarFix) Thnx DUDE Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now