L L4D2node

CCSGameRules::GetChatFormat

0x00432e70 · 286 bytes · __thiscall

_ZN12CCSGameRules13GetChatFormatEbP11CBasePlayer

Decompiled

undefined (3 params)

/* CCSGameRules::GetChatFormat(bool, CBasePlayer*) */

char * __thiscall CCSGameRules::GetChatFormat(CCSGameRules *this,bool param_1,CBasePlayer *param_2)

{
  int iVar1;
  char *pcVar2;
  
  if (param_2 != (CBasePlayer *)0x0) {
    if (!param_1) {
      if (param_2[0x104] == (CBasePlayer)0x0) {
        return "Cstrike_Chat_All";
      }
      iVar1 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_2);
      pcVar2 = "Cstrike_Chat_AllDead";
      if (iVar1 == 1) {
        pcVar2 = "Cstrike_Chat_AllSpec";
      }
      return pcVar2;
    }
    iVar1 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_2);
    if (iVar1 == 3) {
      if (param_2[0x104] != (CBasePlayer)0x0) {
        return "Cstrike_Chat_CT_Dead";
      }
      pcVar2 = (char *)(**(code **)(*(int *)this + 0x1ec))(this,1,param_2);
      if (pcVar2 == (char *)0x0) {
        return "Cstrike_Chat_CT";
      }
      if (*pcVar2 == '\0') {
        return "Cstrike_Chat_CT";
      }
      return "Cstrike_Chat_CT_Loc";
    }
    iVar1 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_2);
    if (iVar1 == 2) {
      if (param_2[0x104] != (CBasePlayer)0x0) {
        return "Cstrike_Chat_T_Dead";
      }
      pcVar2 = (char *)(**(code **)(*(int *)this + 0x1ec))(this,1,param_2);
      if (pcVar2 == (char *)0x0) {
        return "Cstrike_Chat_T";
      }
      if (*pcVar2 == '\0') {
        return "Cstrike_Chat_T";
      }
      return "Cstrike_Chat_T_Loc";
    }
    iVar1 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_2);
    if (iVar1 == 1) {
      return "Cstrike_Chat_Spec";
    }
  }
  return (char *)0x0;
}

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)