L L4D2node

CBaseMultiplayerPlayer::ClientCommand

0x0062c780 · 342 bytes · __thiscall

_ZN22CBaseMultiplayerPlayer13ClientCommandERK8CCommand

Decompiled

undefined (2 params)

/* CBaseMultiplayerPlayer::ClientCommand(CCommand const&) */

undefined4 __thiscall
CBaseMultiplayerPlayer::ClientCommand(CBaseMultiplayerPlayer *this,CCommand *param_1)

{
  int iVar1;
  undefined4 uVar2;
  char *pcVar3;
  
  if (*(int *)param_1 < 1) {
    pcVar3 = "";
  }
  else {
    pcVar3 = *(char **)(param_1 + 0x408);
    if (pcVar3 == "ignoremsg") goto LAB_0062c7b9;
  }
  iVar1 = _V_stricmp(pcVar3,"ignoremsg");
  if (iVar1 != 0) {
    uVar2 = CBasePlayer::ClientCommand((CBasePlayer *)this,param_1);
    return uVar2;
  }
LAB_0062c7b9:
  iVar1 = (*(int *)(this + 0x2368) + 1) % 3;
  *(int *)(this + 0x2368) = iVar1;
  if (iVar1 == 1) {
    ClientPrint((CBasePlayer *)this,3,"#Ignore_Broadcast_Messages",(char *)0x0,(char *)0x0,
                (char *)0x0,(char *)0x0);
    return 1;
  }
  if (iVar1 != 2) {
    if (iVar1 == 0) {
      ClientPrint((CBasePlayer *)this,3,"#Accept_All_Messages",(char *)0x0,(char *)0x0,(char *)0x0,
                  (char *)0x0);
    }
    return 1;
  }
  ClientPrint((CBasePlayer *)this,3,"#Ignore_Broadcast_Team_Messages",(char *)0x0,(char *)0x0,
              (char *)0x0,(char *)0x0);
  return 1;
}

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)