L L4D2node

tv_stop

0x0016f950 · 104 bytes · __cdecl

_ZL7tv_stopRK8CCommand

Decompiled

undefined (1 param)

/* tv_stop(CCommand const&) */

void tv_stop(CCommand *param_1)

{
  char cVar1;
  undefined4 uVar2;
  
  if (hltv != (int *)0x0) {
    cVar1 = (**(code **)(hltv[1] + 0x58))(hltv + 1);
    if (cVar1 != '\0') {
      uVar2 = (**(code **)(hltv[1] + 0xc))(hltv + 1);
      (**(code **)(*hltv + 0x14))(hltv);
      ConMsg("SourceTV stopped, %i clients disconnected.\n",uVar2);
      return;
    }
  }
  ConMsg("SourceTV not active.\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)