tv_clients
0x0016f730 · 399 bytes · __cdecl
_ZL10tv_clientsRK8CCommand
Decompiled
undefined (1 param)
/* tv_clients(CCommand const&) */
void tv_clients(CCommand *param_1)
{
int *piVar1;
char cVar2;
int *piVar3;
undefined4 uVar4;
undefined4 uVar5;
undefined4 uVar6;
undefined4 uVar7;
int iVar8;
char *pcVar9;
int iVar10;
longdouble lVar11;
longdouble lVar12;
longdouble lVar13;
int local_2c;
if (hltv != 0) {
cVar2 = (**(code **)(*(int *)(hltv + 4) + 0x58))(hltv + 4);
if (cVar2 != '\0') {
iVar10 = 0;
local_2c = 0;
while( true ) {
iVar8 = (**(code **)(*(int *)(hltv + 4) + 0x20))(hltv + 4);
if (iVar8 <= iVar10) break;
piVar1 = *(int **)(*(int *)(hltv + 0x118) + iVar10 * 4);
piVar3 = (int *)(**(code **)(*piVar1 + 0x20))(piVar1);
if (piVar3 != (int *)0x0) {
lVar11 = (longdouble)(**(code **)(*piVar3 + 0x34))(piVar3,0);
lVar12 = (longdouble)(**(code **)(*piVar3 + 0x34))(piVar3,1);
uVar4 = (**(code **)(*piVar3 + 4))(piVar3);
pcVar9 = "(Relay)";
lVar13 = (longdouble)(**(code **)(*piVar3 + 0xc))(piVar3);
uVar5 = COM_FormatSeconds((int)lVar13);
cVar2 = (**(code **)(*piVar1 + 0x7c))(piVar1);
if (cVar2 == '\0') {
pcVar9 = "";
}
uVar6 = (**(code **)(*piVar1 + 0x1c))(piVar1);
uVar7 = (**(code **)(*piVar1 + 0x14))(piVar1);
ConMsg("ID: %i, \"%s\" %s, Time %s, %s, In %.1f, Out %.1f.\n",uVar7,uVar6,pcVar9,uVar5,
uVar4,(double)((float)lVar12 * 0.0009765625),(double)((float)lVar11 * 0.0009765625)
);
local_2c = local_2c + 1;
}
iVar10 = iVar10 + 1;
}
ConMsg("--- Total %i connected clients ---\n",local_2c);
return;
}
}
ConMsg("SourceTV not active.\n");
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.