L L4D2node

CCSPlayer::OutputDamageGiven

0x0065b450 · 376 bytes · __thiscall

_ZN9CCSPlayer17OutputDamageGivenEv

Decompiled

undefined (1 param)

/* CCSPlayer::OutputDamageGiven() */

void __thiscall CCSPlayer::OutputDamageGiven(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 + 0x29c4);
  if (iVar4 != -1) {
    pcVar1 = (char *)(**(code **)(*(int *)this + 0xb8))(this);
    ClientPrint((CBasePlayer *)this,2,"Player: %s1 - Damage Given\n",pcVar1,(char *)0x0,(char *)0x0,
                (char *)0x0);
    ClientPrint((CBasePlayer *)this,2,"-------------------------\n",(char *)0x0,(char *)0x0,
                (char *)0x0,(char *)0x0);
    iVar2 = *(int *)(this + 0x29b8);
    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 Given to \"%s1\" - %s2\n",pcVar1,local_60,
                    (char *)0x0,(char *)0x0);
        iVar2 = *(int *)(this + 0x29b8);
        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 into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)