MenuCheckboxItem
MenuCheckboxItem
Section titled “MenuCheckboxItem”A menu item with ‘checkbox’ functionality and a forced checkbox icon on the right.
Example usage
Section titled “Example usage”// checkedValue: when this is set to true, the checkbox will be 'checked' by default.bool checkedValue = false;MenuCheckboxItem item = new MenuCheckboxItem("Checkbox Text", "Checkbox description.", checkedValue);
// Set the style:item.Style = CheckboxStyle.Cross;
// Add a menu item to a menu:menu.AddMenuItem(item);Reacting to a checkbox
Section titled “Reacting to a checkbox”Toggling a checkbox raises the OnCheckboxChange event on its parent menu. Checked has already been updated by the time your handler runs, and the newCheckedState parameter holds the same value.
MenuCheckboxItem godMode = new MenuCheckboxItem("God mode", "Makes you invincible.", false);menu.AddMenuItem(godMode);
menu.OnCheckboxChange += (_menu, _item, _index, _checked) =>{ if (_item == godMode) { SetPlayerInvincible(Game.Player.Handle, _checked); }};A locked checkbox
Section titled “A locked checkbox”Disabled checkboxes are greyed out and can not be toggled, which is useful for showing a state the user is not allowed to change.
menu.AddMenuItem(new MenuCheckboxItem("Premium feature", "Only available to donators.", false){ Enabled = false, LeftIcon = MenuItem.Icon.LOCK});Constructors
Section titled “Constructors”MenuCheckboxItem(string text)
Section titled “MenuCheckboxItem(string text)”Creates an unchecked checkbox without a description.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| text | string | The text displayed on the left side of the item. |
MenuCheckboxItem(string text, bool _checked)
Section titled “MenuCheckboxItem(string text, bool _checked)”Creates a checkbox without a description, with the given checked state.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| text | string | The text displayed on the left side of the item. |
| _checked | boolean | The initial checked state. |
MenuCheckboxItem(string text, string description)
Section titled “MenuCheckboxItem(string text, string description)”Creates an unchecked checkbox with a description.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| text | string | The text displayed on the left side of the item. |
| description | string | The description shown below the menu while this item is selected. |
MenuCheckboxItem(string text, string description, bool _checked)
Section titled “MenuCheckboxItem(string text, string description, bool _checked)”Creates a checkbox with a description and the given checked state.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| text | string | The text displayed on the left side of the item. |
| description | string | The description shown below the menu while this item is selected. |
| _checked | boolean | The initial checked state. |
Properties
Section titled “Properties”| Property | Type | Default value | Description | Optional |
|---|---|---|---|---|
| Checked | boolean | false | The checked state for the checkbox. | No |
| Style | CheckboxStyle | CheckboxStyle.Tick |
The style of this checkbox item when it is “checked”. | No |
Methods
Section titled “Methods”There are no methods available for MenuCheckboxItems.
Checkbox Styles
Section titled “Checkbox Styles”Available checkbox syltes:
| Style | Available in which game? | Default style | Example |
|---|---|---|---|
| CheckboxStyle.Tick | FiveM & RedM | Yes | ![]() |
| CheckboxStyle.Cross | FiveM | No | ![]() |


