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

Function

getAnalogControlState

An alias of getPedAnalogControlState, kept for compatibility with existing scripts. Returns the analog control strength 0-1.

Syntax

float getAnalogControlState(ped ped, string control)

Arguments

pedped
A player or an NPC.Different type in MTA:SA: string control
controlstring
Control name.Different type in MTA:SA: bool rawValue

Differences from MTA:SA

  • Arguments in a different colour differ from MTA:SA.

In MTA:SA

getAnalogControlState(string control, bool rawValue)

Returns

Value 0-1.

Example

local v = getAnalogControlState(walker, "forwards")

See also