ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. getControlState

Function

getControlState

ServerInput and controlsIdentical to MTA:SA

Returns the control state set with setControlState.

Syntax

bool getControlState(player thePlayer, string control)

Arguments

thePlayerplayer
The player.
controlstring
The control name.

Returns

true when the control is pressed.

Example

if getControlState(player, "accelerate") then
    outputChatBox("Tempomat włączony", player)
end

See also