Entity.SetName
From GMod Wiki
| Function | |
| Syntax | Entity:SetName( String targetname ) |
| Description: | |
| Sets the target name of an entity. NOTE: The entity's name is NOT the same as it's Class. | |
| Returns: | nil |
| In Object: | Entity |
| Realm: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Entity.SetName]Entity.SetName [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
| Description | Names every prop_physics 'Carl'. |
|---|---|
| Used on | |
| Code | for k,v in pairs( ents.FindByClass("prop_physics")) do v:SetName("Carl") end |
| Output | Names every prop_physics 'Carl' . |