script
0x00b43930 · 239 bytes · __cdecl
_ZL6scriptRK8CCommand
Decompiled
undefined (1 param)
/* script(CCommand const&) */
void script(CCommand *param_1)
{
CCommand CVar1;
char cVar2;
char *pcVar3;
CCommand *pCVar4;
CCommand *pCVar5;
pcVar3 = "";
if (1 < *(int *)param_1) {
pcVar3 = *(char **)(param_1 + 0x40c);
}
if (*pcVar3 != '\0') {
if (g_pScriptVM == (int *)0x0) {
Msg();
return;
}
cVar2 = UTIL_IsCommandIssuedByServerAdmin();
if (cVar2 != '\0') {
pCVar5 = (CCommand *)&DAT_00d539c2;
if (*(int *)param_1 != 0) {
pCVar5 = param_1 + 8;
}
pCVar4 = pCVar5 + 6;
CVar1 = pCVar5[6];
while (CVar1 == (CCommand)0x20) {
pCVar4 = pCVar4 + 1;
CVar1 = *pCVar4;
}
if (CVar1 != (CCommand)0x0) {
if (CVar1 != (CCommand)0x22) {
(**(code **)(*g_pScriptVM + 0x28))(g_pScriptVM,pCVar4,1);
return;
}
CVar1 = pCVar4[1];
pCVar5 = pCVar4 + 1;
while (CVar1 != (CCommand)0x22) {
pCVar5 = pCVar5 + 1;
CVar1 = *pCVar5;
}
*pCVar5 = (CCommand)0x0;
(**(code **)(*g_pScriptVM + 0x28))(g_pScriptVM,pCVar4 + 1,1);
*pCVar5 = (CCommand)0x22;
}
}
return;
}
Msg();
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.