ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. isControlEnabled

Function

isControlEnabled

Server and clientInput and controlsIdentical to MTA:SA

Checks whether a game control is enabled (not blocked with toggleControl or toggleAllControls).

Syntax

Server

bool isControlEnabled(player thePlayer, string control)

Client

bool isControlEnabled(string control)

Arguments

thePlayerplayer
The player (server only).
controlstring
The control name.

Returns

true when the control works.

Example

if not isControlEnabled("fire") then
    dxDrawText("Tu nie wolno strzelać", 20, 340)
end

See also