AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   [INC] Stringtables (https://forums.alliedmods.net/showthread.php?t=319828)

BHaType 11-21-2019 22:29

[INC] Stringtables
 
1 Attachment(s)
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();
    }



Kxnrl 11-26-2019 19:15

Re: [INC] Stringtables
 
nice work

ReCreator 12-11-2019 16:04

Re: [INC] Stringtables
 
Is it possible to make it for sm 1.9 or later versions?

BHaType 12-12-2019 00:31

Re: [INC] Stringtables
 
Updated

PHP Code:

Updated some sigs
Fixed function this.DeleteStrings 


BHaType 12-12-2019 00:33

Re: [INC] Stringtables
 
Quote:

Originally Posted by ReCreator (Post 2676639)
Is it possible to make it for sm 1.9 or later versions?

Just remove the GameData method from the inc file

Dragokas 12-16-2019 06:47

Re: [INC] Stringtables
 
So, you finally found new sigs for updated L4D1 engine?
Nice!

BHaType 12-16-2019 23:30

Re: [INC] Stringtables
 
Quote:

Originally Posted by Dragokas (Post 2677104)
So, you finally found new sigs for updated L4D1 engine?
Nice!

Yes I got it now should work without errors

extr1m725 01-01-2020 10:13

Re: [INC] Stringtables
 
Hi, when using on the CS: GO server, the server crashes.

BHaType 01-01-2020 18:43

Re: [INC] Stringtables
 
Quote:

Originally Posted by extr1m725 (Post 2678655)
Hi, when using on the CS: GO server, the server crashes.

Show me code and what OS do you have?

extr1m725 01-02-2020 07:57

Re: [INC] Stringtables
 
I took the code from the header just to test it. Windows OS


All times are GMT -4. The time now is 08:26.

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