View Single Post
Author Message
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Old 11-21-2019 , 22:29   [INC] Stringtables
Reply With Quote #1

Not so long ago I made a plugin Stringtables control and thought that it is better to make a methodmap and add support for other games not only L4D2 (As soon as possible I will try to add other games)

You can create your own tables and store data in it, but keep in mind that all tables are destroyed if the map end.

Currently supported: all source engine games

Example
PHP Code:
#pragma semicolon 1
#pragma newdecls required
 
#include <sourcemod>
#include <sdktools>

#include <stringtables_data>

INetworkStringTableContainer container;

public 
void OnPluginStart()
{
    
container INetworkStringTableContainer();
    
    
RegConsoleCmd("sm_createtable"sm_createtable);
    
RegConsoleCmd("sm_cleartables"sm_cleantables);
}

public 
Action sm_createtable (int clientint args)
{
    
container.SetStateCreate(true);
    
INetworkStringTable newtable container.CreateStringTable("new_table"5);
    
container.SetStateCreate(false);
}

public 
Action sm_cleantables (int clientint args)
{
    
int numtables container.GetNumTables();
    
    
INetworkStringTable table;
    
    for (
int inumtablesi++)
    {
        
table INetworkStringTable(i);
        
table.DeleteStrings();
    }

Attached Files
File Type: inc stringtables_data.inc (11.4 KB, 387 views)
__________________
cry

Last edited by BHaType; 07-13-2021 at 22:08.
BHaType is offline
Send a message via AIM to BHaType