To change what a menu displays, you can use menuitemvar, menuitemtextinput, or menuitemslider. menuitemcheckbox displays a 1/0 variable in the form of a checked box.
To have a menu change variables in your script, just have the command that changes that variable as the command argument for any menuitem that has it.
Example:
The docs don't currently document menuitemslider's arguments, but they are this:
menuitemslider (description) (min) (max) (value to set slider to) (change increments) (list of things to display for each step) (command to execute on change)
The "list of things to display for each step" argument can be left blank to simply allow the numerical value to be displayed.
menuitemvar's description field can be based on cubescript evaluations. Its arguments are:
menuitemvar (evaluate and display) (command to execute when selected) (command to execute when hovered over)
menuitemkeyinput can be used to change keybinds in-game:
menuitemkeyinput (description of the command to be bound) (command to be bound)
Example:
To have a menu change variables in your script, just have the command that changes that variable as the command argument for any menuitem that has it.
Example:
[SELECT ALL] Code:
menuitemslider [Crosshair size: ] 0 50 $crosshairsize 5 [] [crosshairsize $arg1]
menuitemslider (description) (min) (max) (value to set slider to) (change increments) (list of things to display for each step) (command to execute on change)
The "list of things to display for each step" argument can be left blank to simply allow the numerical value to be displayed.
menuitemvar's description field can be based on cubescript evaluations. Its arguments are:
menuitemvar (evaluate and display) (command to execute when selected) (command to execute when hovered over)
menuitemkeyinput can be used to change keybinds in-game:
menuitemkeyinput (description of the command to be bound) (command to be bound)
Example:
[SELECT ALL] Code:
menuitemkeyinput [Switch to grenades] [grenadesCustCrosshair]