> For the complete documentation index, see [llms.txt](https://lscripts.gitbook.io/lscripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lscripts.gitbook.io/lscripts/scripts/l-carmenu/exports.md).

# Exports

Client side exports, meant for other resources that need to block the menu for a moment, for example while a player is cuffed, in a minigame or downed.

### SetMenuEnabled

```lua
exports['l-carmenu']:SetMenuEnabled(false)
exports['l-carmenu']:SetMenuEnabled(true)
```

`false` blocks the keybind and the command, and closes the menu right away if it is open. Anything else enables it again.

The flag is not saved anywhere, it resets to enabled when the resource or the client restarts.

### IsMenuEnabled

```lua
local enabled = exports['l-carmenu']:IsMenuEnabled()
```

Returns the current flag.

### Example

Block the menu while a player is handcuffed:

```lua
RegisterNetEvent('yourscript:cuffed', function(state)
    exports['l-carmenu']:SetMenuEnabled(not state)
end)
```
