Entity::id: Difference between revisions

From RAGE Multiplayer Wiki
(Fixed grammar)
Line 5: Line 5:


== 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 playerID = mp.players.at(1).id;  
const playerID = mp.players.at(1).id;  
console.log(playerID); // Player ID, e.g. 1 ( ??? )
console.log(playerID); // Player ID, e.g. 1 ( ??? )
</syntaxhighlight>
</syntaxhighlight>
</div>


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

Revision as of 14:16, 16 January 2018

This property is used for getting an entity ID. The ID is a unique identifier for the entity.

Getter

  • Number

Example

Server-Side

const playerID = mp.players.at(1).id; 
console.log(playerID); // Player ID, e.g. 1 ( ??? )

See Also