ENT.SetupDataTables

From GMod Wiki

Jump to: navigation, search
Event Hook
Hook NameSetupDataTables
SyntaxENT:SetupDataTables( )
DescriptionSets up networked variables for use with an Entity.
ReturnsNil
Lua StateNewerShared.png
BBCode[b][url=wiki.garrysmod.com/?title=ENT.SetupDataTables]ENT.SetupDataTables [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionSets up two float networked variables, TargetZ and Speed
Used onNewerShared.png
Code
function ENT:SetupDataTables()
 
    self:DTVar( "Float", 0, "TargetZ" );
    self:DTVar( "Float", 1, "Speed" );
 
end
OutputN/A


DescriptionUsage after initializing the variables, as seen in the above example.
Used onNewerShared.png
Code
 
self:SetDTFloat(0, 1.0)
self:GetDTFloat(0)
self.dt.TargetZ
 
OutputN/A


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox