Player::invoke: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
m (Replaced HTML with template)
 
Line 6: Line 6:


==Syntax==
==Syntax==
<div class="header" style="background-color: #408DAE; color: #FFFFFF; border: 2px solid #408DAE;">
{{ServersideCode|
<div style="margin: 10px 10px 10px 10px;"><b>Server-Side</b></div>
<pre>
<syntaxhighlight lang="javascript">
player.invoke(hash, [, ...args])
player.invoke(hash, [, ...args])
</syntaxhighlight>
</pre>
</div>
}}
 
==Example==
==Example==
<div class="header" style="background-color: #408DAE; color: #FFFFFF; border: 2px solid #408DAE;">
{{ServersideCode|
<div style="margin: 10px 10px 10px 10px;"><b>Server-Side</b></div>
<pre>
<syntaxhighlight lang="javascript">
function playerJoinHandle(player)
function playerJoinHandle(player)
{
{
     player.invoke('0xBBAF4B768DDB7572', player, true) // 0xBBAF4B768DDB7572 - FREEZE_ENTITY_POSITION (1.39)
     player.invoke('0xBBAF4B768DDB7572', player, true) // 0xBBAF4B768DDB7572 - FREEZE_ENTITY_POSITION (1.39)
}
}
mp.events.add('playerJoin', playerJoinHandle)
mp.events.add('playerJoin', playerJoinHandle)
</syntaxhighlight>
</pre>
</div>
}}
 
==See Also==
==See Also==
{{Player_block}}
{{Player_block}}

Latest revision as of 11:56, 26 October 2018

Invokes specified native function

Parameters

  • hash: String
  • args: Any

Syntax

Server-Side
player.invoke(hash, [, ...args])

Example

Server-Side
function playerJoinHandle(player)
{
    player.invoke('0xBBAF4B768DDB7572', player, true) // 0xBBAF4B768DDB7572 - FREEZE_ENTITY_POSITION (1.39)
}

mp.events.add('playerJoin', playerJoinHandle)

See Also