Entity.SetTable

From GMod Wiki

Revision as of 05:39, 30 October 2009 by Crazy Quebecer (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax Entity:SetTable( Table table )
Description:
Allows you to set an entity's table to an existing table. This should not be called on scripted entities, as their methods are stored in the entity's table.
Returns: nil
In Object: Entity
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.SetTable]Entity.SetTable [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionGive an entity a table describing it.
Used onNewerServer.png
Code
 
function giveEntTable(ent)
    local myTable={}
    myTable["name"]="Just another entity"
    myTable["count"]=4
    ent:SetTable(myTable)
end
 
OutputN/A


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox