L L4D2node

dump_server_demo

0x00820b90 · 143 bytes · __cdecl

_ZL16dump_server_demoRK8CCommand

Decompiled

undefined (1 param)

/* dump_server_demo(CCommand const&) */

void dump_server_demo(CCommand *param_1)

{
  undefined1 *puVar1;
  
  if (g_bAllowServerDemoWrite == '\0') {
    DevMsg("Server demo not allowed now.\n");
    return;
  }
  if (*(int *)param_1 == 2) {
    if (g_pServerDemoSystem != (int *)0x0) {
      g_bAllowServerDemoWrite = 0;
      puVar1 = &DAT_00d539c2;
      if (1 < *(int *)param_1) {
        puVar1 = *(undefined1 **)(param_1 + 0x40c);
      }
      (**(code **)(*g_pServerDemoSystem + 0x10))(g_pServerDemoSystem,0xffffffff,puVar1);
      g_bAllowServerDemoWrite = 1;
      return;
    }
    DevMsg("Server demo system not initialized!\n");
    return;
  }
  DevMsg("Please specify an output filename.\n");
  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)