L L4D2node

Script_Say

0x00b44580 · 239 bytes · __cdecl

_ZL10Script_SayP9HSCRIPT__PKcb

Decompiled

undefined (3 params)

/* Script_Say(HSCRIPT__*, char const*, bool) */

void Script_Say(HSCRIPT__ *param_1,char *param_2,bool param_3)

{
  code *pcVar1;
  ScriptClassDesc_t *pSVar2;
  int iVar3;
  int in_GS_OFFSET;
  CCommand local_528 [1288];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  CCommand::CCommand(local_528);
  if (param_1 == (HSCRIPT__ *)0x0) {
    CCommand::Tokenize(local_528,param_2,(characterset_t *)0x0);
  }
  else {
    pcVar1 = *(code **)(*g_pScriptVM + 0x68);
    pSVar2 = GetScriptDesc<CBaseEntity>((CBaseEntity *)0x0);
    iVar3 = (*pcVar1)(g_pScriptVM,param_1,pSVar2);
    CCommand::Tokenize(local_528,param_2,(characterset_t *)0x0);
    if (iVar3 != 0) {
      Host_Say(*(edict_t **)(iVar3 + 0x30),local_528,param_3);
      goto LAB_00b44625;
    }
  }
  Host_Say((edict_t *)0x0,local_528,false);
LAB_00b44625:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

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)