Entity::model: Difference between revisions
(Fixed incorrect colours on example) |
|||
| Line 7: | Line 7: | ||
== Example == | == Example == | ||
{{ServerSide}} | |||
<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 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> | ||
==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');