isControlEnabled
Client
Tells whether one of the local player's controls is on.
Also exists on the server, with its own implementation: isControlEnabled
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
bindKey("f2", "down", function()
toggleControl("enter_exit", not isControlEnabled("enter_exit"))
end)