CCSPlayer::OutputDamageTaken
0x0065b2c0 · 379 bytes · __thiscall
_ZN9CCSPlayer17OutputDamageTakenEv
Decompiled
undefined (1 param)
/* CCSPlayer::OutputDamageTaken() */
void __thiscall CCSPlayer::OutputDamageTaken(CCSPlayer *this)
{
char *pcVar1;
int iVar2;
undefined4 *puVar3;
int iVar4;
int in_GS_OFFSET;
char local_60 [64];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
iVar4 = *(int *)(this + 0x29ec);
if (iVar4 != -1) {
pcVar1 = (char *)(**(code **)(*(int *)this + 0xb8))(this);
ClientPrint((CBasePlayer *)this,2,"Player: %s1 - Damage Taken\n",pcVar1,(char *)0x0,(char *)0x0,
(char *)0x0);
ClientPrint((CBasePlayer *)this,2,"-------------------------\n",(char *)0x0,(char *)0x0,
(char *)0x0,(char *)0x0);
iVar2 = *(int *)(this + 0x29e0);
do {
puVar3 = (undefined4 *)(iVar2 + iVar4 * 0xc);
pcVar1 = (char *)*puVar3;
if (pcVar1 != (char *)0x0) {
if (*(int *)(pcVar1 + 0x24) == 1) {
V_snprintf(local_60,0x40,"%d in %d hit",*(undefined4 *)(pcVar1 + 0x20),1);
}
else {
V_snprintf(local_60,0x40,"%d in %d hits",*(undefined4 *)(pcVar1 + 0x20),
*(int *)(pcVar1 + 0x24));
}
ClientPrint((CBasePlayer *)this,2,"Damage Taken from \"%s1\" - %s2\n",pcVar1,local_60,
(char *)0x0,(char *)0x0);
iVar2 = *(int *)(this + 0x29e0);
puVar3 = (undefined4 *)(iVar2 + iVar4 * 0xc);
}
iVar4 = puVar3[2];
} while (iVar4 != -1);
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.