L L4D2node

StringToUpgrade

0x0051f920 · 63 bytes · __cdecl

_Z15StringToUpgradePKc

Decompiled

undefined (1 param)

/* StringToUpgrade(char const*) */

int StringToUpgrade(char *param_1)

{
  char *pcVar1;
  int iVar2;
  undefined1 *puVar3;
  
  pcVar1 = "INCENDIARY_AMMO";
  puVar3 = s_upgradeNames;
  do {
    if (param_1 != (char *)0x0) {
      iVar2 = _V_stricmp(param_1,pcVar1);
      if (iVar2 == 0) break;
    }
    puVar3 = (undefined1 *)((int)puVar3 + 8);
    pcVar1 = *(char **)puVar3;
  } while (pcVar1 != (char *)0x0);
  return *(int *)((int)puVar3 + 4);
}

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)