El_Matador Posted June 14, 2012 Share Posted June 14, 2012 Hello all, whether it is possible or I would ask for help in the implementation of a short script that works by blocking running on the "shift" or "space" (as one who has set about sprinting), by simply clicking in and went slowly went by clicking ALT would be slightly faster (trot), I would ask for help. Sorry for my bad english (70% translator). Link to comment
Castillo Posted June 14, 2012 Share Posted June 14, 2012 You can disable a control with: toggleControl. Link to comment
El_Matador Posted June 14, 2012 Author Share Posted June 14, 2012 Ok , so what i cna use this function ? Link to comment
TwiX! Posted June 14, 2012 Share Posted June 14, 2012 Ok , so what i cna use this function ? you can check wiki and learn lua there have examples Link to comment
El_Matador Posted June 14, 2012 Author Share Posted June 14, 2012 I used this but i can't run this , always errors and warnings , not work Link to comment
TwiX! Posted June 14, 2012 Share Posted June 14, 2012 maybe you show your code? and errors in /debugscript 3? Link to comment
El_Matador Posted June 14, 2012 Author Share Posted June 14, 2012 Debugscript : And code : bool toggleControl ( player thePlayer, string sprint, bool disabled ) Link to comment
TwiX! Posted June 14, 2012 Share Posted June 14, 2012 Debugscript : And code : bool toggleControl ( player thePlayer, string sprint, bool disabled ) see examplex on wiki Link to comment
El_Matador Posted June 14, 2012 Author Share Posted June 14, 2012 I see, but the example is about vehicle fire. function disableFireForHydra ( theVehicle, seat, jacked ) if ( getElementModel ( theVehicle ) == 520 ) then -- if they entered a hydra toggleControl ( source, "vehicle_secondary_fire", false ) -- disable their fire key else -- if they entered another vehicle toggleControl ( source, "vehicle_secondary_fire", true ) -- enable their fire key end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), disableFireForHydra ) I looking for slow walking in key "w" and small run on the ALT + W. Link to comment
TwiX! Posted June 15, 2012 Share Posted June 15, 2012 MAN USE WIKI, I NOT WILL MAKE CODE FOR YOU https://wiki.multitheftauto.com/wiki/Control_names 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