- Documentation
- Server functions
- 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"))