Globals::invoke: Difference between revisions

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


==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">
<pre>
mp.game.invoke(hash, [, ...args])
mp.game.invoke(hash, [, ...args])
</syntaxhighlight>
</pre>


==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">
mp.game.invoke('0xBBAF4B768DDB7572', mp.players.local.handle, true); // 0xBBAF4B768DDB7572 - FREEZE_ENTITY_POSITION (1.39)
mp.game.invoke('0xBBAF4B768DDB7572', player, true) // 0xBBAF4B768DDB7572 - FREEZE_ENTITY_POSITION (1.39)
</pre>
</syntaxhighlight>
}}
</div>


[[Category:Clientside API]]
[[Category:Clientside API]]

Revision as of 13:29, 26 October 2018

Invokes specified native function

Parameters

  • hash: String
  • args: Any

Syntax

mp.game.invoke(hash, [, ...args])

Example

Client-Side
mp.game.invoke('0xBBAF4B768DDB7572', mp.players.local.handle, true); // 0xBBAF4B768DDB7572 - FREEZE_ENTITY_POSITION (1.39)