CC_Find_Ent_Index
0x00601030 · 151 bytes · __cdecl
_Z17CC_Find_Ent_IndexRK8CCommand
Decompiled
undefined (1 param)
/* CC_Find_Ent_Index(CCommand const&) */
void CC_Find_Ent_Index(CCommand *param_1)
{
long lVar1;
int iVar2;
undefined1 *puVar3;
undefined1 *puVar4;
if (1 < *(int *)param_1) {
lVar1 = strtol(*(char **)(param_1 + 0x40c),(char **)0x0,10);
iVar2 = UTIL_EntityByIndex(lVar1);
if (iVar2 == 0) {
Msg("Found no entity at %d.\n",lVar1);
}
else {
puVar4 = *(undefined1 **)(iVar2 + 0x154);
if (puVar4 == (undefined1 *)0x0) {
puVar4 = &DAT_00d539c2;
}
puVar3 = &DAT_00d539c2;
if (*(undefined1 **)(iVar2 + 0x7c) != (undefined1 *)0x0) {
puVar3 = *(undefined1 **)(iVar2 + 0x7c);
}
Msg(" \'%s\' : \'%s\' (entindex %d) \n",puVar3,puVar4,lVar1);
}
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.