Entity::type: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
No edit summary
Line 10: Line 10:
*marker
*marker
*colshape
*colshape
== Example ==
<div class="header" style="background-color: #408DAE; color: #FFFFFF; border: 2px solid #408DAE;">
<div style="margin: 10px 10px 10px 10px;"><b>Server-Side</b></div>
<syntaxhighlight lang="javascript">
const entity = mp.players.at(0);
console.log(entity.type) // return 'player'
</syntaxhighlight>
</div>


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

Revision as of 14:17, 13 May 2017

Returns type of entity.

Available types:

  • player
  • vehicle
  • object
  • pickup
  • blip
  • checkpoint
  • marker
  • colshape

Example

Server-Side
const entity = mp.players.at(0);
console.log(entity.type) // return 'player'

See Also