Garry's Mod Wiki

Revision Difference

WEAPON:SetupDataTables#512186

<function name="SetupDataTables" parent="WEAPON" type="hook">⤶ <ishook>yes</ishook>⤶ <description>Called when the SWEP should set up its [ Data Tables](/gmod/Networking_Entities).</description>⤶ <realm>Shared</realm>⤶ </function>⤶ ⤶ <example>⤶ <description>Sets up networked variables, adds functions SetDamage, GetDamage, SetMuzzlePos and GetMuzzlePos.</description>⤶ <code>⤶ function SWEP:SetupDataTables()⤶ self:NetworkVar( "Float", 0, "Damage" )⤶ self:NetworkVar( "Vector", 0, "MuzzlePos" )⤶ end⤶ </code>⤶ ⤶ </example>