tv_msg
0x00171450 · 192 bytes · __cdecl
_ZL6tv_msgRK8CCommand
Decompiled
undefined (1 param)
/* tv_msg(CCommand const&) */
void tv_msg(CCommand *param_1)
{
char cVar1;
IGameEvent *pIVar2;
CCommand *pCVar3;
if (hltv != (CHLTVServer *)0x0) {
cVar1 = (**(code **)(*(int *)(hltv + 4) + 0x58))(hltv + 4);
if (cVar1 != '\0') {
pIVar2 = (IGameEvent *)
(**(code **)(s_GameEventManager + 0x1c))(&s_GameEventManager,"hltv_message",1,0);
if (pIVar2 != (IGameEvent *)0x0) {
pCVar3 = (CCommand *)&DAT_002c79d4;
if (*(int *)(param_1 + 4) != 0) {
pCVar3 = param_1 + *(int *)(param_1 + 4) + 8;
}
(**(code **)(*(int *)pIVar2 + 0x3c))(pIVar2,&DAT_002b16af,pCVar3);
CHLTVServer::BroadcastEventLocal(hltv,pIVar2,false);
(**(code **)(s_GameEventManager + 0x2c))(&s_GameEventManager,pIVar2);
}
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.