Raised This Month: $51 Target: $400
 12% 

[INC] Stringtables


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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, 385 views)
__________________
cry

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



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:31.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode