SetPedControlState: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(New page: __NOTOC__ {{Client function}} Makes a ped press or release a certain control. ==Syntax== <syntaxhighlight lang="lua"> bool setPedControlState ( ped thePed, string control, bool state ) </syntaxhighlight> ===Require...)
 
No edit summary
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Client function}}
{{Client function}}
Makes a ped press or release a certain control.
{{Needs Example}}
This function makes a [[ped]] press or release a certain control. It doesn't work with the local player, so use [[setControlState]] instead.


==Syntax==
==Syntax==

Revision as of 16:46, 7 November 2014

Accessories-text-editor.png Script Example Missing Function SetPedControlState needs a script example, help out by writing one.

Before submitting check out Editing Guidelines Script Examples.

This function makes a ped press or release a certain control. It doesn't work with the local player, so use setControlState instead.

Syntax

bool setPedControlState ( ped thePed, string control, bool state )

Required Arguments

  • thePed: the ped you want to press or release a control.
  • control: the name of the control of which to change the state. See control names for a list of valid names.
  • state: the new control state. true means pressed, false is released.

Returns

Returns true if successful, false if otherwise.

See Also