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 intoaddons/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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.