L L4D2node

CTerrorPlayer::IsWielding

0x00996410 · 44 bytes · __thiscall

_ZNK13CTerrorPlayer10IsWieldingE10CSWeaponID

Decompiled

undefined (2 params)

/* CTerrorPlayer::IsWielding(CSWeaponID) const */

bool __thiscall CTerrorPlayer::IsWielding(CTerrorPlayer *this,int param_2)

{
  int *piVar1;
  int iVar2;
  bool bVar3;
  
  piVar1 = (int *)CCSPlayer::GetActiveCSWeapon((CCSPlayer *)this);
  bVar3 = false;
  if (piVar1 != (int *)0x0) {
    iVar2 = (**(code **)(*piVar1 + 0x638))(piVar1);
    bVar3 = iVar2 == param_2;
  }
  return bVar3;
}

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)