L L4D2node

CBasePlayer::ShowCrosshair

0x007b1c60 · 93 bytes · __thiscall

_ZN11CBasePlayer13ShowCrosshairEb

Decompiled

undefined (2 params)

/* CBasePlayer::ShowCrosshair(bool) */

void __thiscall CBasePlayer::ShowCrosshair(CBasePlayer *this,bool param_1)

{
  uint uVar1;
  uint uVar2;
  
  uVar1 = *(uint *)(this + 0x1a7c);
  if (param_1) {
    uVar2 = uVar1 & 0xfffffeff;
    if (uVar1 == uVar2) {
      return;
    }
  }
  else {
    uVar2 = uVar1 | 0x100;
    if (uVar1 == uVar2) {
      return;
    }
  }
  (**(code **)(*(int *)(this + 0x1a40) + 4))(this + 0x1a40,this + 0x1a7c);
  *(uint *)(this + 0x1a7c) = uVar2;
  return;
}

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)