ForEachTerrorPlayer<CustomFinaleMusic>
0x008f5660 · 247 bytes · __cdecl
_Z19ForEachTerrorPlayerI17CustomFinaleMusicEbRT_
Decompiled
bool (1 param)
/* bool ForEachTerrorPlayer<CustomFinaleMusic>(CustomFinaleMusic&) */
bool ForEachTerrorPlayer<CustomFinaleMusic>(CustomFinaleMusic *param_1)
{
undefined4 uVar1;
char cVar2;
int *piVar3;
undefined4 uVar4;
int iVar5;
iVar5 = 1;
if (0 < *(int *)(gpGlobals + 0x14)) {
do {
piVar3 = (int *)UTIL_PlayerByIndex(iVar5);
if ((((piVar3 != (int *)0x0) && (piVar3[0xc] != 0)) &&
(piVar3[0xc] - *(int *)(gpGlobals + 0x58) >> 4 != 0)) &&
(((cVar2 = (**(code **)(*piVar3 + 0x16c))(piVar3), cVar2 != '\0' && (piVar3[0x7db] != 2))
&& (cVar2 = (**(code **)(*piVar3 + 300))(piVar3), cVar2 != '\0')))) {
uVar1 = *(undefined4 *)param_1;
uVar4 = (**(code **)(*piVar3 + 0xb8))(piVar3);
MusicMsg("%s CustomFinaleMusic: %s\n",uVar4,uVar1);
Music::Play((Music *)(piVar3 + 0xead),*(char **)param_1,0,-1.0,false,false);
}
iVar5 = iVar5 + 1;
} while (iVar5 <= *(int *)(gpGlobals + 0x14));
}
return true;
}
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.