Entity.DTVar
From GMod Wiki
Function | |
Syntax | Entity:DTVar( String Type, Integer Key, String KeyName ) |
Description: | |
Sets up a named DTVar on a scripted entity. Must be set in ENT:SetupDataTables() or SWEP:SetupDataTables() in a shared file. | |
Returns: | nil |
In Object: | Entity |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Entity.DTVar]Entity.DTVar [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Sets up three named DTVars |
---|---|
Used on | |
Code | function ENT:SetupDataTables() self:DTVar("Int",0,"size"); self:DTVar("Int",1,"amount"); self:DTVar("Bool",0,"equippable"); end |
Output | N/A |
Additional Notes
- DTVar is limited to 4 per type.