_Evo_ Posted June 6, 2018 Share Posted June 6, 2018 In MTASA, getBoundControls function isnt exist? or wiki example isnt works well? Link to comment
NeXuS™ Posted June 6, 2018 Share Posted June 6, 2018 It exists, and works perfectly. Maybe there is an error in your code. Maybe try to post it in here so we can help you further. Link to comment
Z4Zy Posted June 6, 2018 Share Posted June 6, 2018 try to add below code into the existing script , Client Side :- local controlTable = { "fire", "next_weapon", "previous_weapon", "forwards", "backwards", "left", "right", "zoom_in", "zoom_out", "change_camera", "jump", "sprint", "look_behind", "crouch", "action", "walk", "aim_weapon", "conversation_yes", "conversation_no", "group_control_forwards", "group_control_back", "enter_exit", "vehicle_fire", "vehicle_secondary_fire", "vehicle_left", "vehicle_right", "steer_forward", "steer_back", "accelerate", "brake_reverse", "radio_next", "radio_previous", "radio_user_track_skip", "horn", "sub_mission", "handbrake", "vehicle_look_left", "vehicle_look_right", "vehicle_look_behind", "vehicle_mouse_look", "special_control_left", "special_control_right", "special_control_down", "special_control_up" } function getBoundControls (key) local controls = {} for _,control in ipairs(controlTable) do for k in pairs(getBoundKeys(control)) do if (k == key) then controls[control] = true end end end return controls end Link to comment
_Evo_ Posted June 7, 2018 Author Share Posted June 7, 2018 (edited) On 6/6/2018 at 20:19, NeXuS™ said: It exists, and works perfectly. Maybe there is an error in your code. Maybe try to post it in here so we can help you further. yeah thank you, i've just only checked that function and in wiki example isnt works well. actually Example 2 23 hours ago, DeadthStrock said: try to add below code into the existing script , Client Side :- local controlTable = { "fire", "next_weapon", "previous_weapon", "forwards", "backwards", "left", "right", "zoom_in", "zoom_out", "change_camera", "jump", "sprint", "look_behind", "crouch", "action", "walk", "aim_weapon", "conversation_yes", "conversation_no", "group_control_forwards", "group_control_back", "enter_exit", "vehicle_fire", "vehicle_secondary_fire", "vehicle_left", "vehicle_right", "steer_forward", "steer_back", "accelerate", "brake_reverse", "radio_next", "radio_previous", "radio_user_track_skip", "horn", "sub_mission", "handbrake", "vehicle_look_left", "vehicle_look_right", "vehicle_look_behind", "vehicle_mouse_look", "special_control_left", "special_control_right", "special_control_down", "special_control_up" } function getBoundControls (key) local controls = {} for _,control in ipairs(controlTable) do for k in pairs(getBoundKeys(control)) do if (k == key) then controls[control] = true end end end return controls end try 2nd example on wiki Edited June 7, 2018 by _Evo_ 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