Entity::type: Difference between revisions

From RAGE Multiplayer Wiki
(Created page with "Returns type of entity. Available types: *player *vehicle *object *pickup *blip")
 
 
(10 intermediate revisions by 7 users not shown)
Line 1: Line 1:
Returns type of entity.
Returns type of entity.


Available types:
==Available types:==
*player
*player
*ped
*vehicle
*vehicle
*object
*object
*pickup
*pickup
*blip
*blip
*checkpoint
*marker
*colshape
*textlabel
==Getter==
* {{RageType|String}}
== Example ==
{{ServersideCode|
<syntaxhighlight lang="javascript">
const entity = mp.players.at(0);
console.log(entity.type) // returns 'player'
</syntaxhighlight>
}}
==See Also==
{{Entity_definition}}
[[Category:Entity API]]
[[Category:Server-side Property]]

Latest revision as of 14:49, 8 August 2020

Returns type of entity.

Available types:

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

Getter

  • String

Example

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

See Also