Entity::type: Difference between revisions
Felipe10fe (talk | contribs) |
mNo edit summary |
||
| Line 13: | Line 13: | ||
==Getter== | ==Getter== | ||
* | * {{RageType|String}} | ||
== Example == | == Example == | ||
{{ | {{ServersideCode| | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
const entity = mp.players.at(0); | const entity = mp.players.at(0); | ||
console.log(entity.type) // | console.log(entity.type) // returns 'player' | ||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
==See Also== | ==See Also== | ||
{{Entity_definition}} | {{Entity_definition}} | ||
[[Category:Entity API]] | |||
[[Category:Server Property]] | |||
Revision as of 10:10, 30 April 2019
Returns type of entity.
Available types:
- player
- 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'