Player::taskHandsUp: Difference between revisions

From RAGE Multiplayer Wiki
m (Replaced HTML with template)
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.
==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==
<div class="header" style="background-color: #AE4040; color: #FFFFFF; border: 2px solid #AE4040;">
{{ClientsideCode|
<div style="margin: 10px 10px 10px 10px;"><b>Client-Side</b></div>
<pre>
<syntaxhighlight lang="javascript" highlight="5">
// 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>
</div>
}}


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

Revision as of 13:15, 26 October 2018

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.

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