HolyLib Wiki

INetworkStringTable

INetworkStringTable

This class directly represents the INetworkStringTable object in c++

Metatable function Description
__tostring Returns a formated string of the INetworkStringTable -> INetworkStringTable [tableName]
__index Used to allow one to access saved lua data on the object
__newindex Used to allow one to save lua data on the object

Methods

number INetworkStringTable:AddString( string value, boolean isServer = true )
Adds the given string into the stringtable.
boolean INetworkStringTable:ChangedSinceTick( number tickCount )
Returns whether or not the stringtable changed since the given tickcount.
INetworkStringTable:DeleteAllStrings( boolean nukePrecache = false )
Deletes all strings.
boolean INetworkStringTable:DeleteString( number index )
Deletes the string at the given index. This is quiet slow since internally it saves all stringtable values, then fully clears it, and recreates it without the given index.
It will also delete precache data if you delete strings from tables like modelprecache and such.
number INetworkStringTable:FindStringIndex( string value )
Returns the index the string was found at
table INetworkStringTable:GetAllStrings( )
Returns a table containing all strings.
number INetworkStringTable:GetEntryBits( )
Returns the number of bits it uses to network the entries.
number INetworkStringTable:GetMaxStrings( )
Returns the string limit the table has.
Can be raised with INetworkStringTable:SetMaxEntries
number INetworkStringTable:GetNumberUserData( number index )
Returns the userdata from the given index.
number INetworkStringTable:GetNumStrings( )
Returns the number of strings the table has.
number INetworkStringTable:GetPrecacheUserData( number index )
Returns the precache flags from the given index.
INetworkStringTable:GetString( number index )
Returns the string found at the given index.
string, number INetworkStringTable:GetStringUserData( number index )
Returns the userdata from the given index.
table INetworkStringTable:GetTable( )
Returns the lua table used by newindex and index
number INetworkStringTable:GetTableId( )
Returns the table id.
string INetworkStringTable:GetTableName( )
Returns the table name.
boolean INetworkStringTable:IsClientSideAddStringAllowed( )
Returns true if the client is allowed to add strings to this table.
boolean INetworkStringTable:IsFilenames( )
Returns true if this table stores filenames. This value can only be set when creating the table using stringtable.CreateStringTableEx for creation.
boolean INetworkStringTable:IsLocked( )
Returns if this specific table is locked or not.
boolean INetworkStringTable:IsValid( )
Returns weather this object is valid or not.
INetworkStringTable:SetAllowClientSideAddString( boolean bAllowClientSideAddString = false )
Allows/Denies the client from adding additional strings to the table clientside. This is a direct alias to stringtable.SetAllowClientSideAddString
INetworkStringTable:SetLocked( boolean bLocked = false )
Locks or Unlocks this specific table.
INetworkStringTable:SetMaxEntries( number maxStrings )
Sets the entry/string limit to the given number. Raising this will causes issues in some cases where the limit is hardcoded clientside.
Stringtables that this shouldn't be used on:
modelprecache -> Limited by CClientState::model_precache
genericprecache -> Limited by CClientState::generic_precache
soundprecache -> Limited by CClientState::sound_precache
decalprecache -> Limited by CClientState::decal_precache
networkvars -> Limited by the internal net messages gmod uses. (Mainly NW2's networking)
INetworkStringTable:SetNumberUserData( number index, number value )
Sets the userdata for the given index.
INetworkStringTable:SetPrecacheUserData( number index, number flags )
Sets the precache userdata for the given index. This should only be used on precache stringtables.
INetworkStringTable:SetStringUserData( number index, string value, number length = nil )
Sets the userdata for the given index.
INetworkStringTable:SetTick( number tickCount )
Sets the tickcount used for networking.