#include <sourcemod> #include <sdktools> #include <cstrike> #pragma newdecls required Handle g_FreeAll; public void OnPluginStart() { Handle gamedata = LoadGameConfigFile("memorycrash.games"); StartPrepSDKCall(SDKCall_Static); PrepSDKCall_SetFromConf(gamedata, SDKConf_Virtual, "CStringPool::FreeAll"); PrepSDKCall_SetReturnInfo(SDKType_Bool, SDKPass_Plain); g_FreeAll = EndPrepSDKCall(); delete gamedata; HookEvent("round_prestart", Event_RoundPreStart); } public void Event_RoundPreStart(Event event, const char[] name, bool dontBroadcast) { SDKCall(g_FreeAll); }
Linux: \x55\x89\xE5\x56\x53\x83\xEC\x10\x8B\x75\x08\x8D\x46\x04 Windows: \x55\x8B\xEC\x83\xEC\x0C\x8D\x45\x08 (not sure)