Entity/DTVar

From Garry's Mod
Revision as of 14:18, 27 February 2013 by Facepunch bot (Talk | contribs)
Jump to: navigation, search
 Entity:DTVar( )

Contents

Description

Sets up a self.dt.NAME alias for a Data Table var

Arguments

string Type

The type of the DTVar being set up. It can be one of the following: 'Int', 'Float', 'Vector', 'Angle', 'Bool', 'Entity' or 'String'

Arguments

number ID

The ID of the DTVar. Can be between 0 and 3

Arguments

string Name

Name by which you will refer to DTVar. It must be a valid variable name. (No spaces!)

Examples

Example

Sets up two float networked variables, TargetZ and Speed

function ENT:SetupDataTables()

 self:DTVar( "Float", 0, "TargetZ" );
 self:DTVar( "Float", 1, "Speed" );

end


Personal tools
Navigation