Entity.EntIndex
From GMod Wiki
| Function | |
| Syntax | Entity:EntIndex( ) |
| Description: | |
| Returns the ID an entity is using - this was entid in GMod 9. | |
| Returns: | Integer |
| In Object: | Entity |
| Realm: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Entity.EntIndex]Entity.EntIndex [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Additional Notes
- This returns -1 on clientside-only entities (such as dead player ragdolls and ClientsideModels).
- Useful for sending entities through console commands. Send the entity id, then convert it back by using the global Entity() function.