L L4D2node

unload_all_addons

0x0015e4b0 · 144 bytes · __cdecl

_ZL17unload_all_addonsRK8CCommand

Decompiled

undefined (1 param)

/* unload_all_addons(CCommand const&) */

void unload_all_addons(CCommand *param_1)

{
  int iVar1;
  int in_GS_OFFSET;
  char local_114 [260];
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  (**(code **)(*g_pFileSystem + 0x34))(g_pFileSystem,&DAT_002a0772,0,local_114,0x104);
  iVar1 = _V_strrchr(local_114,';');
  if (iVar1 != 0) {
    V_strncpy(local_114,(char *)(iVar1 + 1),0x104);
  }
  FileSystem_RemoveAllAddonSearchPaths(local_114);
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

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)