L L4D2node

CSentence::LanguageForName

0x000db540 · 77 bytes · __cdecl

_ZN9CSentence15LanguageForNameEPKc

Decompiled

undefined (1 param)

/* CSentence::LanguageForName(char const*) */

int CSentence::LanguageForName(char *param_1)

{
  int iVar1;
  undefined1 *puVar2;
  int iVar3;
  
  puVar2 = g_CCLanguageLookup;
  iVar3 = 0;
  do {
    iVar1 = _V_stricmp(*(char **)(puVar2 + 4),param_1);
    if (iVar1 == 0) {
      return iVar3;
    }
    iVar3 = iVar3 + 1;
    puVar2 = puVar2 + 0xb;
  } while (iVar3 != 0xc);
  return -1;
}

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)