L L4D2node

CGameRules::GetChatPrefix

0x0045eb40 · 64 bytes · __thiscall

_ZN10CGameRules13GetChatPrefixEbP11CBasePlayer

Decompiled

undefined (3 params)

/* CGameRules::GetChatPrefix(bool, CBasePlayer*) */

char * __thiscall CGameRules::GetChatPrefix(CGameRules *this,bool param_1,CBasePlayer *param_2)

{
  char cVar1;
  char *pcVar2;
  
  if (param_2 != (CBasePlayer *)0x0) {
    cVar1 = (**(code **)(*(int *)param_2 + 300))(param_2);
    if (cVar1 == '\0') {
      pcVar2 = "*DEAD*(TEAM)";
      if (!param_1) {
        pcVar2 = "*DEAD*";
      }
      return pcVar2;
    }
  }
  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)