Player::getsJacker: Difference between revisions

From RAGE Multiplayer Wiki
(→‎Example: Simple example for use of Player::getsJacker because I was confused with the use of this method and tested it out.)
m (→‎Example: added js tag)
 
(One intermediate revision by the same user not shown)
Line 9: Line 9:


<div class="header" style="background-color: #00FF00; color: #FFFFFF; border: 2px solid #00FF00;">
<div class="header" style="background-color: #00FF00; color: #FFFFFF; border: 2px solid #00FF00;">
<div style="margin: 10px;"><b>Client-Side</b></div>
<div style="margin: 10px;"><b>Client-Side JS</b></div>
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
/* Player::getsJacker */
/* Player::getsJacker */
let localPlayerJacker = mp.players.local.getsJacker();
let localPlayerJacker = mp.players.local.getsJacker();


/* CLIENT-SIDE ADDARMOURTO localPlayerJacker ADD
/* CLIENT-SIDE ADDARMOURTO localPlayerJacker ADDS 25 ARMOUR TO PLAYER. */
* ADDS 25 ARMOUR TO PLAYER.
*/
mp.players.at(localPlayerJacker).addArmourTo(25);
mp.players.at(localPlayerJacker).addArmourTo(25);
</syntaxhighlight>
</syntaxhighlight>
</div>
</div>

Latest revision as of 19:01, 16 May 2019

Syntax

player.getsJacker();

Required Arguments

Return value

  • Ped handle or object

Example

This example will use the returned value from Player::getsJacker to add 25 armour to the specified entity (client-side). - 2019-5-16

Client-Side JS
/* Player::getsJacker */
let localPlayerJacker = mp.players.local.getsJacker();

/* CLIENT-SIDE ADDARMOURTO localPlayerJacker ADDS 25 ARMOUR TO PLAYER. */
mp.players.at(localPlayerJacker).addArmourTo(25);

See also