L L4D2node

VOX_LookupSentenceByIndex

0x000f1230 · 206 bytes · __cdecl

_Z25VOX_LookupSentenceByIndexPciPi

Decompiled

undefined (3 params)

/* VOX_LookupSentenceByIndex(char*, int, int*) */

char * VOX_LookupSentenceByIndex(char *param_1,int param_2,int *param_3)

{
  int iVar1;
  char *pcVar2;
  undefined1 *puVar3;
  int in_GS_OFFSET;
  char local_40;
  char local_3f [31];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = VOX_GroupIndexFromName(param_1);
  if (-1 < iVar1) {
    iVar1 = VOX_GroupPickSequential(iVar1,&local_40,0x1f,param_2,1);
    if (-1 < iVar1) {
      pcVar2 = local_3f;
      if (local_40 != '!') {
        pcVar2 = &local_40;
      }
      pcVar2 = (char *)VOX_LookupString(pcVar2,0,0,0,0);
      puVar3 = (undefined1 *)_V_strstr(pcVar2," ");
      if (puVar3 != (undefined1 *)0x0) {
        *puVar3 = 0;
      }
      if (param_3 != (int *)0x0) {
        *param_3 = iVar1;
      }
      goto LAB_000f12d9;
    }
  }
  pcVar2 = (char *)0x0;
LAB_000f12d9:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return 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)