AMARANT Posted January 25, 2014 Share Posted January 25, 2014 Is there any way to reverse controls in MTA? I mean replace "forwards" bind with "backwards" bind temporarily, etc. Link to comment
DiSaMe Posted January 25, 2014 Share Posted January 25, 2014 toggleControl bindKey setControlState Link to comment
AMARANT Posted January 25, 2014 Author Share Posted January 25, 2014 When I tried to set control enabled with setControlState, my player was always running. Controls "forwards" and "backwards" work like that, unfortunately. But I need them to be pressed just once. Like you press "W" or "S" on your keyboard. Link to comment
Moderators IIYAMA Posted January 25, 2014 Moderators Share Posted January 25, 2014 Try something like this. toggleControl("forwards",false) toggleControl("backwards",false) local converterToBoolean = {["down"]=false,["up"]=true} local controlManagement = function (key,state) setControlState(key,converterToBoolean[state]) end bindKey("forwards","both",controlManagement) bindKey("backwards","both",controlManagement) 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