L L4D2node

PchLanguageToELanguage

0x000a69b0 · 89 bytes · __cdecl

_Z22PchLanguageToELanguagePKc

Decompiled

undefined (1 param)

/* PchLanguageToELanguage(char const*) */

undefined4 PchLanguageToELanguage(char *param_1)

{
  int iVar1;
  int iVar2;
  undefined4 *puVar3;
  
  iVar2 = 0;
  if (param_1 != (char *)0x0) {
    puVar3 = (undefined4 *)(s_LanguageNames + 4);
    do {
      iVar1 = _V_stricmp(param_1,(char *)*puVar3);
      if (iVar1 == 0) {
        return *(undefined4 *)(s_LanguageNames + iVar2 * 0x14 + 0x10);
      }
      iVar2 = iVar2 + 1;
      puVar3 = puVar3 + 5;
    } while (iVar2 != 0x13);
  }
  return 0;
}

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)