Entity.GetName

From GMod Wiki

Jump to: navigation, search
Function
Syntax Entity:GetName( )
Description:
Returns the target name of an entity. NOTE: The entity's name is NOT the same as it's Class.
Returns: String
In Object: Entity
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.GetName]Entity.GetName [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionFinds every entity in the world and prints its name.
Used onNewerServer.png
Code
for k, v in pairs(ents.GetAll()) do
print(v:GetName())
end
OutputMany lines of entity names.

Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox