Entity.DTVar

From GMod Wiki

Jump to: navigation, search
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: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.DTVar]Entity.DTVar [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionSets up three named DTVars
Used onNewerShared.png
Code
function ENT:SetupDataTables()
	self:DTVar("Int",0,"size");
	self:DTVar("Int",1,"amount");
	self:DTVar("Bool",0,"equippable");
end
OutputN/A


Additional Notes

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox