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

Function

getPedAnalogControlState

Returns the strength of a ped's analog control (0-1) set with setPedAnalogControlState. 0 means the control is not pressed.

Syntax

float getPedAnalogControlState(ped ped, string control)

Arguments

pedped
A player or an NPC.
controlstring
Control name.

Differences from MTA:SA

  • These MTA:SA arguments are not here: bool rawValue

In MTA:SA

getPedAnalogControlState(ped thePed, string controlName, bool rawValue)

Returns

Value 0-1.

Example

outputServerLog(getPedAnalogControlState(walker, "forwards"))

See also