L L4D2node

CTerrorPlayer::CheatImpulseCommands

0x009ddfb0 · 369 bytes · __thiscall

_ZN13CTerrorPlayer20CheatImpulseCommandsEi

Decompiled

undefined (2 params)

/* CTerrorPlayer::CheatImpulseCommands(int) */

void __thiscall CTerrorPlayer::CheatImpulseCommands(CTerrorPlayer *this,int param_1)

{
  if (param_1 != 0x65) {
    CCSPlayer::CheatImpulseCommands((CCSPlayer *)this,param_1);
    return;
  }
  if (*(int *)(*(int *)(sv_cheats + 0x1c) + 0x30) == 0) {
    return;
  }
  gEvilImpulse101 = 1;
  CBaseCombatCharacter::GiveAmmo((int)this,(char *)0x9c4,true);
  CBaseCombatCharacter::GiveAmmo((int)this,(char *)0x9c4,true);
  CBaseCombatCharacter::GiveAmmo((int)this,(char *)0x9c4,true);
  CBaseCombatCharacter::GiveAmmo((int)this,(char *)0x9c4,true);
  CBaseCombatCharacter::GiveAmmo((int)this,(char *)0x9c4,true);
  CBaseCombatCharacter::GiveAmmo((int)this,(char *)0x9c4,true);
  CBaseCombatCharacter::GiveAmmo((int)this,(char *)0x9c4,true);
  CBaseCombatCharacter::GiveAmmo((int)this,(char *)0x9c4,true);
  CBaseCombatCharacter::GiveAmmo((int)this,(char *)0x9c4,true);
  gEvilImpulse101 = 0;
  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)