kasya85 Posted June 29, 2017 Posted June 29, 2017 Help, please. getPedControlState is not working getPedControlState(localPlayer, "radar_move_south") getPedControlState(localPlayer, "radar_move_north") getPedControlState(localPlayer, "radar_move_west") getPedControlState(localPlayer, "radar_move_east") code: function drawMap() if getPedControlState(localPlayer, "radar_move_north") then --action elseif getPedControlState(localPlayer, "radar_move_south") then --action elseif getPedControlState(localPlayer, "radar_move_west") then --action elseif getPedControlState(localPlayer, "radar_move_east") then --action end end end addEventHandler("onClientRender",getRootElement(),drawMap)
pa3ck Posted June 29, 2017 Posted June 29, 2017 MTA hard-coded commands The following are names of hard-coded MTA commands which do not use bindKey, but can act as bindKey by using them in an addCommandHandler. Other than that, this control list will only work with the functions toggleControl and toggleAllControls. Please note that toggleControl can't disable screenshot. Probably you can't use "radar_move_x" with getPedControlState since they're MTA hard-coded commands.
kasya85 Posted June 29, 2017 Author Posted June 29, 2017 28 minutes ago, pa3ck said: MTA hard-coded commands The following are names of hard-coded MTA commands which do not use bindKey, but can act as bindKey by using them in an addCommandHandler. Other than that, this control list will only work with the functions toggleControl and toggleAllControls. Please note that toggleControl can't disable screenshot. Probably you can't use "radar_move_x" with getPedControlState since they're MTA hard-coded commands. I need an example
xMKHx Posted June 29, 2017 Posted June 29, 2017 You can find all MTA Contro Names here https://wiki.multitheftauto.com/wiki/Control_names
pa3ck Posted June 29, 2017 Posted June 29, 2017 20 minutes ago, xMKHx said: You can find all MTA Contro Names here https://wiki.multitheftauto.com/wiki/Control_names No offence, but you are just copy-pasting links and stuff, did you actually check that link yourself? 47 minutes ago, kasya85 said: I need an example In my post I referenced MTA wiki, but I'll quote it again, this control list will only work with the functions toggleControl and toggleAllControls So I guess you can't use it with getPedControlState. The code you posted should work with every other controls, but not these ones. So whatever you tried to achieve, you'll need to find a different solution or if you tell us your goal, we might be able to help you. 1
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