MapEntity_ExtractValue
0x00468e90 · 174 bytes · __cdecl
_Z22MapEntity_ExtractValuePKcS0_Pc
Decompiled
undefined (3 params)
/* MapEntity_ExtractValue(char const*, char const*, char*) */
undefined4 MapEntity_ExtractValue(char *param_1,char *param_2,char *param_3)
{
int iVar1;
char *pcVar2;
undefined4 uVar3;
int in_GS_OFFSET;
char local_820 [2048];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
while ((param_1 != (char *)0x0 &&
(pcVar2 = (char *)MapEntity_ParseToken(param_1,local_820), local_820[0] != '}'))) {
iVar1 = strcmp(local_820,param_2);
if (iVar1 == 0) {
MapEntity_ParseToken(pcVar2,local_820);
V_strncpy(param_3,local_820,0x800);
uVar3 = 1;
goto LAB_00468f01;
}
param_1 = (char *)MapEntity_ParseToken(pcVar2,local_820);
}
uVar3 = 0;
LAB_00468f01:
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return uVar3;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.