L L4D2node

CTeam::AwardAchievement

0x00839e80 · 158 bytes · __thiscall

_ZN5CTeam16AwardAchievementEi

Decompiled

undefined (2 params)

/* CTeam::AwardAchievement(int) */

void __thiscall CTeam::AwardAchievement(CTeam *this,int param_1)

{
  int iVar1;
  int iVar2;
  CBasePlayer *pCVar3;
  int iVar4;
  CRecipientFilter local_3c [44];
  
  CRecipientFilter::CRecipientFilter(local_3c);
                    /* try { // try from 00839e9c to 00839f0a has its CatchHandler @ 00839f1e */
  iVar1 = (**(code **)(*(int *)this + 0x354))(this);
  iVar4 = 0;
  if (0 < iVar1) {
    do {
      iVar2 = (**(code **)(*(int *)this + 0x358))(this,iVar4);
      if (iVar2 != 0) {
        pCVar3 = (CBasePlayer *)(**(code **)(*(int *)this + 0x358))(this,iVar4);
        CRecipientFilter::AddRecipient(local_3c,pCVar3);
      }
      iVar4 = iVar4 + 1;
    } while (iVar4 != iVar1);
  }
  UserMessageBegin((IRecipientFilter *)local_3c,"AchievementEvent");
  MessageWriteShort(param_1);
  MessageEnd();
  CRecipientFilter::~CRecipientFilter(local_3c);
  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)