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 client, int args)
{
container.SetStateCreate(true);
INetworkStringTable newtable = container.CreateStringTable("new_table", 5);
container.SetStateCreate(false);
}
public Action sm_cleantables (int client, int args)
{
int numtables = container.GetNumTables();
INetworkStringTable table;
for (int i; i < numtables; i++)
{
table = INetworkStringTable(i);
table.DeleteStrings();
}
}