L L4D2node

CTerrorPlayer::ShowHostDetails

0x009a3b00 · 245 bytes · __thiscall

_ZN13CTerrorPlayer15ShowHostDetailsEv

Decompiled

undefined (1 param)

/* CTerrorPlayer::ShowHostDetails() */

void __thiscall CTerrorPlayer::ShowHostDetails(CTerrorPlayer *this)

{
  char cVar1;
  int iVar2;
  KeyValues *this_00;
  char *pcVar3;
  
  cVar1 = (**(code **)(*(int *)this + 0x778))(this);
  if (cVar1 == '\0') {
    cVar1 = (**(code **)(*engine + 8))(engine);
    if ((cVar1 != '\0') && (g_pStringTableInfoPanel != (int *)0x0)) {
      pcVar3 = "hostfile";
      iVar2 = (**(code **)(*g_pStringTableInfoPanel + 0x34))(g_pStringTableInfoPanel);
      if (iVar2 != 0xffff) {
        this_00 = KeyValues::operator_new((KeyValues *)0x2c,(uint)pcVar3);
                    /* try { // try from 009a3b82 to 009a3b86 has its CatchHandler @ 009a3bfc */
        KeyValues::KeyValues(this_00,"data",(IKeyValuesSystem *)0x0,false);
        KeyValues::SetString(this_00,"title","#L4D_MOTD");
        KeyValues::SetString(this_00,"type","1");
        KeyValues::SetString(this_00,"msg","hostfile");
        (**(code **)(*(int *)this + 0x580))(this,"info",1,this_00);
        KeyValues::deleteThis();
        return;
      }
    }
  }
  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)