This calls 3 functions at once but you can find the signature and only call "CStringPool::FreeAll()"
Code
PHP Code:
#pragma semicolon 1
#pragma newdecls required
#include <sourcemod>
#include <sdktools>
#define ADDRESS(%1) view_as<Address>(%1)
Address g_GameStringPool;
public void OnPluginStart()
{
GameData data = new GameData("gamedata");
g_GameStringPool = data.GetAddress("g_GameStringPool");
#if defined LINUX
g_GameStringPool += ADDRESS(0x13029F0);
#endif
delete data;
RegConsoleCmd("free", free);
}
public Action free ( int a1, int a2 )
{
/*
FreeAll();
PurgeDeferredDeleteList();
CGameString::IncrementSerialNumber();
*/
Handle hFPC = CreateCall (g_GameStringPool, 7); // linux 7 - 9 idk
SDKCall (hFPC, ADDRESS(g_GameStringPool));
delete hFPC;
}
Handle CreateCall ( Address pInstance, int offset )
{
StartPrepSDKCall (SDKCall_Raw);
PrepSDKCall_SetAddress (Dereference(Dereference(pInstance), offset * 4));
PrepSDKCall_SetReturnInfo(SDKType_PlainOldData, SDKPass_Plain);
return EndPrepSDKCall();
}
Address Dereference ( Address ptr, int offset = 0, NumberType type = NumberType_Int32 ) { return ADDRESS(LoadFromAddress(ptr + ADDRESS(offset), type)); }
Gamedata
PHP Code:
"Games"
{
"csgo"
{
"Addresses"
{
"g_GameStringPool"
{
"signature" "g_GameStringPool"
"windows"
{
"read" "10"
}
}
}
"Signatures"
{
"g_GameStringPool"
{
"library" "server"
"windows" "\x55\x8B\xEC\x51\x8D\x45\xFC\xC7\x45\xFC\x2A\x2A\x2A\x2A\x50\xFF\x35"
"linux" "\x55\x89\xE5\x53\x83\xEC\x14\xE8\x2A\x2A\x2A\x2A\x89\x04\x24"
}
}
}
}
I didn't check because I don't have csgo
__________________