addAction when key is pressed?
So I'm just making a simple scroll menu that I can use on this ArmA 3 Life server as their anti-cheat somehow sees when I open my other menu.
I have it working, but it adds like 4 actions to open the menu and when it opens doesn't get rid of the 4 open menu actions, so I want to have a keybind so that it adds the actions and then the action to close the menu which will remove the actions.
Basically, thats the first part of the script and it adds like 4 options to open the menu and it's terrible :P. So how can I add a keybind to add the actions
I have it working, but it adds like 4 actions to open the menu and when it opens doesn't get rid of the 4 open menu actions, so I want to have a keybind so that it adds the actions and then the action to close the menu which will remove the actions.
Code:
skruffys_scroll_menu = player addAction ["<t color='#FF0000'>Open Menu</t>", {call openmenu}];
openmenu = {
player removeAction skruffys_scroll_menu_open_menu;
skruffys_scroll_menu_toggle_esp = player addAction ["<t color='#40FF00'>Toggle ESP</t>", {call playesp}];
skruffys_scroll_menu_toggle_vehiclegod = player addAction ["<t color='#40FF00'>Toggle Vehicle God</t>", {call vehiclegod}];
skruffys_scroll_menu_toggle_playergod = player addAction ["<t color='#40FF00'>Toggle Player God</t>", {call playergod}];
skruffys_scroll_menu_give_cash = player addAction ["<t color='#40FF00'>Give Cash</t>", {call givecash}];
skruffys_scroll_menu_close_menu = player addAction ["<t color='#FF0000'>Close Menu</t>", {call closemenu}];
};

