L L4D2node

MakeButtonSound

0x006361c0 · 105 bytes · __cdecl

_Z15MakeButtonSoundi

Decompiled

undefined (1 param)

/* MakeButtonSound(int) */

int MakeButtonSound(int param_1)

{
  int in_GS_OFFSET;
  int iVar1;
  char *pcVar2;
  char local_410 [1024];
  int local_10;
  
  pcVar2 = local_410;
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  V_snprintf(pcVar2,0x400,"Buttons.snd%d");
  iVar1 = param_1;
  AllocPooledString((char *)param_1);
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return param_1;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail(iVar1,pcVar2);
}

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)