L L4D2node

CVEngineServer::GetClientConVarValue

0x0022ccb0 · 98 bytes · __cdecl

_ZN14CVEngineServer20GetClientConVarValueEiPKc

Decompiled

undefined (2 params)

/* CVEngineServer::GetClientConVarValue(int, char const*) */

undefined1 * CVEngineServer::GetClientConVarValue(int param_1,char *param_2)

{
  int iVar1;
  int *piVar2;
  undefined1 *puVar3;
  
  if ((0 < (int)param_2) && ((int)param_2 <= DAT_003b8080)) {
    iVar1 = *(int *)(DAT_003b8074 + -4 + (int)param_2 * 4);
    piVar2 = (int *)0x0;
    if (iVar1 != 0) {
      piVar2 = (int *)(iVar1 + 4);
    }
                    /* WARNING: Could not recover jumptable at 0x0022cd14. Too many branches */
                    /* WARNING: Treating indirect jump as call */
    puVar3 = (undefined1 *)(**(code **)(*piVar2 + 0x54))();
    return puVar3;
  }
  DevMsg(1,"GetClientConVarValue: player invalid index %i\n",param_2);
  return &DAT_002c79d4;
}

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)