Entity::model: Difference between revisions

From RAGE Multiplayer Wiki
(Fixed incorrect colours on example)
Line 7: Line 7:


== Example ==
== Example ==
<div class="header" style="background-color: #408DAE; color: #FFFFFF; border: 2px solid #408DAE;">
{{ServerSide}}
<div style="margin: 10px 10px 10px 10px;"><b>Server-Side</b></div>
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
const model = player.model;
const model = player.model;
Line 14: Line 13:
player.model = mp.joaat('player_zero');
player.model = mp.joaat('player_zero');
</syntaxhighlight>
</syntaxhighlight>
</div>
 




<div class="header" style="background-color: #AE4040; color: #FFFFFF; border: 2px solid #AE4040;">
<div class="header" style="background-color: #AE4040; color: #FFFFFF; border: 2px solid #AE4040;">
<div style="margin: 10px 10px 10px 10px;"><b>Client-Side</b></div>
<div style="margin: 10px 10px 10px 10px;"><b>Client-Side</b></div>
</div>
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
const model = player.model;
const model = player.model;
Line 24: Line 24:
player.model = mp.game.joaat('player_zero');
player.model = mp.game.joaat('player_zero');
</syntaxhighlight>
</syntaxhighlight>
</div>


==See Also==
==See Also==
{{Entity_block}}
{{Entity_block}}

Revision as of 14:21, 16 January 2018

This property is used for setting or getting an entity's model.

Getter

  • Number

Setter

  • Number

Example

Server-Side

const model = player.model;
console.log(model) // return e.g. 867126926
player.model = mp.joaat('player_zero');


Client-Side
const model = player.model;
alert(model) // return e.g. 867126926
player.model = mp.game.joaat('player_zero');

See Also