CEntFireAutoCompletionFunctor::CommandCallback
0x00617f40 · 470 bytes · __thiscall
_ZN29CEntFireAutoCompletionFunctor15CommandCallbackERK8CCommand
Decompiled
undefined (2 params)
/* CEntFireAutoCompletionFunctor::CommandCallback(CCommand const&) */
void __thiscall
CEntFireAutoCompletionFunctor::CommandCallback
(CEntFireAutoCompletionFunctor *this,CCommand *param_1)
{
char cVar1;
CBasePlayer *pCVar2;
int iVar3;
CBasePlayer *pCVar4;
long lVar5;
char *pcVar6;
char *pcVar7;
undefined4 uVar8;
float fVar9;
char *local_40 [4];
char *local_30 [3];
undefined4 local_24;
undefined4 local_20;
pCVar2 = (CBasePlayer *)UTIL_GetCommandClient();
if (pCVar2 == (CBasePlayer *)0x0) {
return;
}
cVar1 = (**(code **)(*(int *)pCVar2 + 0x16c))(pCVar2);
if (cVar1 == '\0') {
return;
}
if (*(int *)param_1 < 2) {
ClientPrint(pCVar2,2,"Usage:\n ent_fire <target> [action] [value] [delay]\n",(char *)0x0,
(char *)0x0,(char *)0x0,(char *)0x0);
return;
}
AllocPooledString((char *)local_40);
pcVar7 = "";
if (local_40[0] != (char *)0x0) {
pcVar7 = local_40[0];
}
if ((1 < *(int *)(gpGlobals + 0x14)) &&
(iVar3 = _V_stricmp(pcVar7,"point_servercommand"), iVar3 == 0)) {
cVar1 = (**(code **)(*engine + 8))(engine);
if (cVar1 != '\0') {
return;
}
pCVar4 = (CBasePlayer *)UTIL_GetListenServerHost();
if (pCVar2 != pCVar4) {
return;
}
}
if (*(int *)param_1 < 3) {
pcVar6 = "Use";
}
else {
AllocPooledString((char *)local_40);
pcVar6 = local_40[0];
if (local_40[0] == (char *)0x0) {
pcVar6 = "";
}
if (3 < *(int *)param_1) {
AllocPooledString((char *)local_40);
if (*(int *)param_1 < 5) {
uVar8 = 2;
fVar9 = 0.0;
}
else {
uVar8 = 2;
lVar5 = strtol(*(char **)(param_1 + 0x418),(char **)0x0,10);
fVar9 = (float)lVar5;
}
goto LAB_00618094;
}
}
local_40[0] = (char *)0x0;
uVar8 = 0;
fVar9 = 0.0;
LAB_00618094:
local_24 = 0xffffffff;
local_30[0] = local_40[0];
local_20 = uVar8;
CEventQueue::AddEvent((CEventQueue *)g_EventQueue,pcVar7,pcVar6,local_30,fVar9,pCVar2,pCVar2,0);
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.