SetPedAnalogControlState: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 1: Line 1:
{{Client function}}  
{{Client function}}  
__NOTOC__  
__NOTOC__  
Sets an analog state of a specified player's control, as if they pressed or released it.
Sets an analog state of a specified [[ped]]'s control, as if they pressed or released it.
 
This function only works on [[ped]]s, to change the analog control state for a player, please use [[setAnalogControlState]].


==Syntax==  
==Syntax==  

Revision as of 16:54, 5 January 2014

Sets an analog state of a specified ped's control, as if they pressed or released it.

This function only works on peds, to change the analog control state for a player, please use setAnalogControlState.

Syntax

bool setPedAnalogControlState ( ped thePed, string control, float state ) 

Required Arguments

  • thePed: The ped you wish to set the control state of.
  • control: The control that you want to set the state of. See control names for a list of possible controls.
  • state: A float value representing a full analog push ( 1 ) or full release ( 0 ).

Returns

Returns 'true' if the control state was successfully set, 'false' otherwise.

Example

--todo

Requirements

Minimum server version n/a
Minimum client version 1.3.0-9.04185

Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version client="1.3.0-9.04185" />

See Also