Entity. tostring

From GMod Wiki

Jump to: navigation, search
Function
Syntax Entity:__tostring( )
Description:
Returns information about an entity as string. This function gets called when you use G.tostring on an entity.
Returns: String
In Object: Entity
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity. tostring]Entity. tostring [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionPrints first player's name to console.
Used onNewerShared.png
Code
print(Entity(1):__tostring())
OutputPlayer [1][First player's name here]

Additional Notes

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox