CServerPlugin::CreateMessage
0x00209b10 · 310 bytes · __thiscall
_ZN13CServerPlugin13CreateMessageEP7edict_t11DIALOG_TYPEP9KeyValuesP22IServerPluginCallbacks
Decompiled
undefined (5 params)
/* CServerPlugin::CreateMessage(edict_t*, DIALOG_TYPE, KeyValues*, IServerPluginCallbacks*) */
void __thiscall
CServerPlugin::CreateMessage
(CServerPlugin *this,edict_t *param_1,undefined4 param_3,int param_4,int *param_5)
{
code *pcVar1;
char cVar2;
undefined4 uVar3;
int iVar4;
int *piVar5;
SVC_Menu local_74 [100];
if (param_1 == (edict_t *)0x0) {
ConMsg("Invaid pEntity\n");
}
else if (param_4 == 0) {
ConMsg("No data keyvalues provided\n");
}
else {
if (param_5 != (int *)0x0) {
if (*(undefined4 **)(this + 0x18) != (undefined4 *)0x0) {
pcVar1 = *(code **)**(undefined4 **)(this + 0x18);
uVar3 = (**(code **)(*param_5 + 0x10))(param_5);
cVar2 = (*pcVar1)(*(undefined4 *)(this + 0x18),uVar3,param_1,param_3,param_4);
if (cVar2 == '\0') {
ConMsg("Disallowed by game dll\n");
return;
}
}
iVar4 = NUM_FOR_EDICT(param_1);
if ((0 < iVar4) && (iVar4 <= DAT_003b8080)) {
iVar4 = *(int *)(DAT_003b8074 + -4 + iVar4 * 4);
piVar5 = (int *)0x0;
if (iVar4 != 0) {
piVar5 = (int *)(iVar4 + 4);
}
SVC_Menu::SVC_Menu(local_74,param_3,param_4);
/* try { // try from 00209bea to 00209bec has its CatchHandler @ 00209c61 */
(**(code **)(*piVar5 + 0x78))(piVar5,local_74,0,0);
SVC_Menu::~SVC_Menu(local_74);
return;
}
ConMsg("Invalid entity\n");
return;
}
ConMsg("No plugin provided\n");
}
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.