CChangeMapLaterIssue::CanCallVote
0x00b423b0 · 302 bytes · __thiscall
_ZN20CChangeMapLaterIssue11CanCallVoteEiPKcPc
Decompiled
undefined (4 params)
/* CChangeMapLaterIssue::CanCallVote(int, char const*, char*) */
undefined4 __thiscall
CChangeMapLaterIssue::CanCallVote
(CChangeMapLaterIssue *this,int param_1,char *param_2,char *param_3)
{
undefined4 uVar1;
int iVar2;
char *pcVar3;
uVar1 = CBaseIssue::CanCallVote((CBaseIssue *)this,param_1,param_2,param_3);
if ((char)uVar1 == '\0') {
return uVar1;
}
if (*(int *)(sv_vote_issue_change_map_later_allowed._28_4_ + 0x30) == 0) {
V_strncpy(param_3,"Server has disabled that Issue.",0x60);
return 0;
}
if ((param_2 == "") || (iVar2 = _V_stricmp(param_2,""), iVar2 == 0)) {
V_strncpy(param_3,"Needs map name arg.",0x60);
return 0;
}
iVar2 = (**(code **)(*engine + 4))(engine,param_2);
if (iVar2 == 0) {
V_strncpy(param_3,"No such map.",0x60);
return 0;
}
pcVar3 = *(char **)(gpGlobals + 0x3c);
if (pcVar3 == (char *)0x0) {
pcVar3 = "";
}
else if (param_2 == pcVar3) goto LAB_00b4244c;
iVar2 = _V_stricmp(param_2,pcVar3);
if (iVar2 != 0) {
return uVar1;
}
LAB_00b4244c:
V_strncpy(param_3,"Already on that map.",0x60);
return 0;
}
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.