L L4D2node

CKickIssue::ExecuteCommand

0x00a051e0 · 415 bytes · __thiscall

_ZN10CKickIssue14ExecuteCommandEv

Decompiled

undefined (1 param)

/* CKickIssue::ExecuteCommand() */

void __thiscall CKickIssue::ExecuteCommand(CKickIssue *this)

{
  code *pcVar1;
  undefined4 uVar2;
  int in_GS_OFFSET;
  CTerrorPlayer *local_130;
  CFmtStrN<256> local_12c [5];
  undefined1 local_127 [263];
  int local_20;
  
  local_130 = (CTerrorPlayer *)0x0;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  FindPlayerFromDetails(this,(char *)(this + 0x44),&local_130);
  if (local_130 == (CTerrorPlayer *)0x0) {
    if (((this[0x85] != (CKickIssue)0x0) && (0 < *(int *)(sv_vote_kick_ban_duration._28_4_ + 0x30)))
       && (this[0x84] == (CKickIssue)0x0)) {
      pcVar1 = *(code **)(*engine + 0x94);
      CFmtStrN<256>::CFmtStrN
                (local_12c,"banid %d %s;",*(int *)(sv_vote_kick_ban_duration._28_4_ + 0x30),
                 this + 0x85);
      (*pcVar1)(engine,local_127);
    }
  }
  else {
    if ((0 < *(int *)(sv_vote_kick_ban_duration._28_4_ + 0x30)) && (this[0x84] == (CKickIssue)0x0))
    {
      pcVar1 = *(code **)(*engine + 0x94);
      uVar2 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(local_130 + 0x30));
      CFmtStrN<256>::CFmtStrN
                (local_12c,"banid %d %d;",*(undefined4 *)(sv_vote_kick_ban_duration._28_4_ + 0x30),
                 uVar2);
      (*pcVar1)(engine,local_127);
    }
    pcVar1 = *(code **)(*engine + 0x94);
    uVar2 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(local_130 + 0x30));
    CFmtStrN<256>::CFmtStrN(local_12c,"kickid %d You have been voted off;",uVar2);
    (*pcVar1)(engine,local_127);
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  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)