director_print_player_counts
0x00875980 · 664 bytes · __cdecl
_ZL28director_print_player_countsRK8CCommand
Decompiled
undefined (1 param)
/* director_print_player_counts(CCommand const&) */
void director_print_player_counts(CCommand *param_1)
{
CBasePlayer *pCVar1;
char *pcVar2;
undefined4 uVar3;
int in_GS_OFFSET;
int local_134;
int local_130;
undefined **local_12c;
undefined1 local_128;
undefined1 local_127;
undefined4 local_24;
int local_20;
local_128 = 1;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
local_127 = 0;
local_12c = &PTR_InitQuietTruncation_00c08ee8;
local_24 = 0;
pCVar1 = (CBasePlayer *)UTIL_GetCommandClient();
TransitionedPlayerCount(&local_134,&local_130,2);
if (pCVar1 == (CBasePlayer *)0x0) {
Msg("%d transitioning survivors\n",local_134 - local_130);
uVar3 = UTIL_HumansOnTeam(2,false);
Msg("%d connected survivors\n",uVar3);
TransitionedPlayerCount(&local_134,&local_130,3);
Msg("%d transitioning infected\n",local_134 - local_130);
uVar3 = UTIL_HumansOnTeam(3,false);
Msg("%d connected infected\n",uVar3);
}
else {
pcVar2 = (char *)CFmtStrN<256>::sprintf
((CFmtStrN<256> *)&local_12c,"%d transitioning survivors\n",
local_134 - local_130);
ClientPrint(pCVar1,3,pcVar2,(char *)0x0,(char *)0x0,(char *)0x0,(char *)0x0);
uVar3 = UTIL_HumansOnTeam(2,false);
pcVar2 = (char *)CFmtStrN<256>::sprintf
((CFmtStrN<256> *)&local_12c,"%d connected survivors\n",uVar3);
ClientPrint(pCVar1,3,pcVar2,(char *)0x0,(char *)0x0,(char *)0x0,(char *)0x0);
TransitionedPlayerCount(&local_134,&local_130,3);
pcVar2 = (char *)CFmtStrN<256>::sprintf
((CFmtStrN<256> *)&local_12c,"%d transitioning infected\n",
local_134 - local_130);
ClientPrint(pCVar1,3,pcVar2,(char *)0x0,(char *)0x0,(char *)0x0,(char *)0x0);
uVar3 = UTIL_HumansOnTeam(3,false);
pcVar2 = (char *)CFmtStrN<256>::sprintf
((CFmtStrN<256> *)&local_12c,"%d connected infected\n",uVar3);
ClientPrint(pCVar1,3,pcVar2,(char *)0x0,(char *)0x0,(char *)0x0,(char *)0x0);
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.