kick_transitioning
0x008f5a10 · 283 bytes · __cdecl
_ZL18kick_transitioningRK8CCommand
Decompiled
undefined (1 param)
/* kick_transitioning(CCommand const&) */
void kick_transitioning(CCommand *param_1)
{
CBaseEntity *pCVar1;
char cVar2;
long lVar3;
int iVar4;
int iVar5;
cVar2 = UTIL_IsCommandIssuedByServerAdmin();
if ((cVar2 != '\0') && (*(int *)param_1 == 2)) {
iVar5 = 0;
lVar3 = strtol(*(char **)(param_1 + 0x40c),(char **)0x0,10);
if (0 < DAT_0100e518) {
do {
iVar4 = KeyValues::GetInt(*(KeyValues **)(g_SavedPlayers + iVar5 * 4),"userID",0);
if (lVar3 == iVar4) {
KeyValues::deleteThis();
iVar4 = (DAT_0100e518 - iVar5) + -1;
if (0 < iVar4) {
_V_memmove((void *)(g_SavedPlayers + iVar5 * 4),(void *)(g_SavedPlayers + 4 + iVar5 * 4)
,iVar4 * 4);
}
DAT_0100e518 = DAT_0100e518 + -1;
break;
}
iVar5 = iVar5 + 1;
} while (iVar5 < DAT_0100e518);
}
if (0 < DAT_00fa9a14) {
iVar4 = 0;
pCVar1 = (CBaseEntity *)*g_TransitioningPlayers;
iVar5 = *(int *)(pCVar1 + 0x1a48);
while( true ) {
if (lVar3 == iVar5) {
UTIL_Remove(pCVar1);
return;
}
iVar4 = iVar4 + 1;
if (iVar4 == DAT_00fa9a14) break;
pCVar1 = (CBaseEntity *)g_TransitioningPlayers[iVar4];
iVar5 = *(int *)(pCVar1 + 0x1a48);
}
}
}
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.