L L4D2node

users

0x001fb410 · 232 bytes · __cdecl

_ZL5usersRK8CCommand

Decompiled

undefined (1 param)

/* users(CCommand const&) */

void users(CCommand *param_1)

{
  int iVar1;
  char cVar2;
  undefined4 uVar3;
  undefined4 uVar4;
  undefined4 uVar5;
  int *piVar6;
  int iVar7;
  int local_28;
  
  if (DAT_003b7f64 < 2) {
    ConMsg("Can\'t \'users\', not running a server\n");
    return;
  }
  ConMsg("<slot:userid:\"name\">\n");
  if (DAT_003b8080 < 1) {
    local_28 = 0;
  }
  else {
    iVar7 = 0;
    local_28 = 0;
    do {
      while( true ) {
        iVar1 = *(int *)(DAT_003b8074 + iVar7 * 4);
        piVar6 = (int *)(iVar1 + 4);
        if (iVar1 == 0) {
          piVar6 = (int *)0x0;
        }
        cVar2 = (**(code **)(*piVar6 + 0x80))(piVar6);
        if (cVar2 == '\0') break;
        iVar7 = iVar7 + 1;
        uVar3 = (**(code **)(*piVar6 + 0x48))(piVar6);
        uVar4 = (**(code **)(*piVar6 + 0x40))(piVar6);
        uVar5 = (**(code **)(*piVar6 + 0x3c))(piVar6);
        ConMsg("%i:%i:\"%s\"\n",uVar5,uVar4,uVar3);
        local_28 = local_28 + 1;
        if (DAT_003b8080 <= iVar7) goto LAB_001fb4c5;
      }
      iVar7 = iVar7 + 1;
    } while (iVar7 < DAT_003b8080);
  }
LAB_001fb4c5:
  ConMsg("%i users\n",local_28);
  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)