L L4D2node

CServerDemo::LookupModelName

0x00596210 · 43 bytes · __thiscall

_ZNK11CServerDemo15LookupModelNameEi

Decompiled

undefined (2 params)

/* CServerDemo::LookupModelName(int) const */

char * __thiscall CServerDemo::LookupModelName(CServerDemo *this,int param_1)

{
  char *pcVar1;
  
  if ((-1 < param_1) && (param_1 < *(int *)(this + 0x110))) {
    pcVar1 = CUtlString::operator_cast_to_char_
                       ((CUtlString *)(param_1 * 0x10 + *(int *)(this + 0x104)));
    return pcVar1;
  }
  return (char *)0x0;
}

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)