show_addon_load_order
0x0015e030 · 225 bytes · __cdecl
_ZL21show_addon_load_orderRK8CCommand
Decompiled
undefined (1 param)
/* show_addon_load_order(CCommand const&) */
void show_addon_load_order(CCommand *param_1)
{
undefined4 uVar1;
CUtlMemory<unsigned_char,int> *this;
int iVar2;
int iVar3;
int local_30 [8];
local_30[0] = 0;
local_30[1] = 0;
local_30[2] = 0;
local_30[3] = 0;
local_30[4] = 0;
/* try { // try from 0015e06d to 0015e108 has its CatchHandler @ 0015e111 */
(**(code **)(*g_pFileSystem + 0x1b8))(g_pFileSystem,(CUtlMemory<CUtlString,int> *)local_30);
if (local_30[3] == 0) {
Msg("No custom addon files are loaded!\n");
}
iVar2 = 0;
if (0 < local_30[3]) {
do {
uVar1 = CUtlString::Get((CUtlString *)(iVar2 * 0x10 + local_30[0]));
Msg(&DAT_002c6892,uVar1);
iVar2 = iVar2 + 1;
} while (iVar2 < local_30[3]);
}
iVar2 = local_30[3] + -1;
iVar3 = iVar2 * 0x10;
if (-1 < iVar2) {
do {
iVar2 = iVar2 + -1;
this = (CUtlMemory<unsigned_char,int> *)(local_30[0] + iVar3);
iVar3 = iVar3 + -0x10;
CUtlMemory<unsigned_char,int>::Purge(this);
} while (iVar2 != -1);
}
local_30[3] = 0;
CUtlMemory<CUtlString,int>::Purge((CUtlMemory<CUtlString,int> *)local_30);
local_30[4] = local_30[0];
CUtlMemory<CUtlString,int>::Purge((CUtlMemory<CUtlString,int> *)local_30);
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.