L L4D2node

CUtlString::Format

0x00b817a0 · 119 bytes · __thiscall

_ZN10CUtlString6FormatEPKcz

Decompiled

undefined (2 params)

/* CUtlString::Format(char const*, ...) */

int __thiscall CUtlString::Format(CUtlString *this,char *param_1,...)

{
  int iVar1;
  int in_GS_OFFSET;
  char local_1020 [4095];
  undefined1 local_21;
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = vsnprintf(local_1020,0xfff,param_1,&stack0x0000000c);
  if (iVar1 < 0) {
    local_21 = 0;
    iVar1 = 0xfff;
  }
  Set(this,local_1020);
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar1;
  }
                    /* 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)