Player::taskHandsUp: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
In the scripts, p3 was always -1.<br><br>p3 seems to be duration or timeout of turn animation.<br>Also facingPed can be 0 or -1 so ped will just raise hands up.
In the scripts, p3 was always -1.<br><br>p3 seems to be duration or timeout of turn animation.<br>Also facingPed can be 0 or -1 so ped will just raise hands up. If p3 is 0 and there is no facingPed, the player will face north.
 
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">player.taskHandsUp(duration, facingPed, p3, p4);</syntaxhighlight>
<pre>player.taskHandsUp(duration, facingPed, p3, p4);</pre>
 
=== Required Arguments ===
=== Required Arguments ===
*'''duration:''' int
*'''duration:''' int
Line 7: Line 9:
*'''p3:''' int
*'''p3:''' int
*'''p4:''' Boolean
*'''p4:''' Boolean
===Return value===
===Return value===
*'''Undefined'''
*'''Undefined'''
==Example==
==Example==
<syntaxhighlight lang="javascript">
{{ClientsideCode|
<pre>
// This will place hands up constantly
// This will place hands up constantly
var localPlayer = mp.players.local;
var localPlayer = mp.players.local;


localPlayer.taskHandsUp(-1, localPlayer.handle, 0, false);
localPlayer.taskHandsUp(-1, localPlayer.handle, 0, false);
</syntaxhighlight>
</pre>
}}


==See also==
==See also==
{{Player_function_c}}
{{Player_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]

Latest revision as of 21:59, 9 April 2019

In the scripts, p3 was always -1.

p3 seems to be duration or timeout of turn animation.
Also facingPed can be 0 or -1 so ped will just raise hands up. If p3 is 0 and there is no facingPed, the player will face north.

Syntax

player.taskHandsUp(duration, facingPed, p3, p4);

Required Arguments

  • duration: int
  • facingPed: Ped handle or object
  • p3: int
  • p4: Boolean

Return value

  • Undefined

Example

Client-Side
// This will place hands up constantly
var localPlayer = mp.players.local;

localPlayer.taskHandsUp(-1, localPlayer.handle, 0, false);

See also