G.Entity

From GMod Wiki

Revision as of 21:22, 6 November 2011 by Cereal (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax Entity( Number index )
Where is this used?
Description:
Mainly used for debugging code in the console, retrieves an entity object based upon it's entindex. Works in exactly the same way as ents.GetByIndex and works with any entity type.
Returns: Entity object.
Part of Library: Global Functions
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=G.Entity]G.Entity [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionThis example prints out the entities class when entered into the console
Used onNewerShared.png
Codelua_run print( Entity( 1 ):GetClass() )
Output'player' printed in console.


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox