# isControlEnabled (Client)

> Tells whether one of the local player's controls is on.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Controls
- **URL**: https://wiki.mymp.gg/en/isControlEnabled-client
- **Counterpart**: Also exists on the server, with its own implementation: [isControlEnabled (Server)](https://wiki.mymp.gg/en/isControlEnabled-server.md)

## Syntax

```lua
bool isControlEnabled(string control)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `control` | `string` | The control's name, case insensitive. |

## Returns

`true` if the control is on. `false` if it was turned off with `toggleControl` or `toggleAllControls`, or if the control name does not exist.

## Example

```lua
bindKey("f2", "down", function()
    toggleControl("enter_exit", not isControlEnabled("enter_exit"))
end)
```

## See also

- [toggleControl (Client)](https://wiki.mymp.gg/en/toggleControl-client.md): Turns one of the local player's controls on or off. A control that is off does not reach the game, even with its key held down.
- [toggleAllControls (Client)](https://wiki.mymp.gg/en/toggleAllControls-client.md): Turns all of the local player's controls on or off at once.
- [getControlState (Client)](https://wiki.mymp.gg/en/getControlState-client.md): Tells whether one of a ped's controls is pressed, such as forwards, fire or accelerate.
- [isControlEnabled (Server)](https://wiki.mymp.gg/en/isControlEnabled-server.md): Tells whether one of a player's controls is on, going by what the server sent to their client.
