L L4D2node

CEventLog::FormatPlayer

0x00699160 · 296 bytes · __thiscall

_ZNK9CEventLog12FormatPlayerEP11CBaseEntityPci

Decompiled

undefined (4 params)

/* CEventLog::FormatPlayer(CBaseEntity*, char*, int) const */

void __thiscall
CEventLog::FormatPlayer(CEventLog *this,CBaseEntity *param_1,char *param_2,int param_3)

{
  char cVar1;
  undefined1 *puVar2;
  int *piVar3;
  int iVar4;
  undefined4 uVar5;
  undefined1 *puVar6;
  undefined4 local_24;
  char *local_20;
  
  if (param_2 == (char *)0x0) {
    return;
  }
  if (param_3 < 1) {
    return;
  }
  if (param_1 == (CBaseEntity *)0x0) {
    puVar6 = &DAT_00d539c2;
    local_24 = 0;
    puVar2 = &DAT_00d539c2;
    local_20 = "Unknown";
  }
  else {
    cVar1 = (**(code **)(*(int *)param_1 + 0x16c))(param_1);
    if (cVar1 == '\0') {
      puVar6 = &DAT_00d539c2;
      local_24 = 0;
      puVar2 = &DAT_00d539c2;
      local_20 = "Unknown";
    }
    else {
      local_20 = (char *)(**(code **)(*(int *)param_1 + 0xb8))(param_1);
      puVar6 = &DAT_00d539c2;
      local_24 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(param_1 + 0x30));
      puVar2 = (undefined1 *)CBasePlayer::GetNetworkIDString((CBasePlayer *)param_1);
      piVar3 = (int *)CBaseEntity::GetTeam(param_1);
      if (piVar3 != (int *)0x0) {
        puVar6 = (undefined1 *)(**(code **)(*piVar3 + 0x32c))(piVar3);
      }
    }
    iVar4 = (**(code **)(*(int *)param_1 + 0x144))(param_1);
    if (iVar4 != 0) {
      piVar3 = (int *)(**(code **)(*(int *)param_1 + 0x144))(param_1);
      iVar4 = (**(code **)(*piVar3 + 0x52c))(piVar3);
      uVar5 = 0;
      if (iVar4 != 0) {
        uVar5 = *(undefined4 *)(iVar4 + 0x8c);
      }
      goto LAB_00699219;
    }
  }
  uVar5 = 0;
LAB_00699219:
  V_snprintf(param_2,param_3,"\"%s<%i><%s><%s><Area %d>\"",local_20,local_24,puVar2,puVar6,uVar5);
  return;
}

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)