CBaseIssue::CanCallVote
0x00b3f450 · 183 bytes · __thiscall
_ZN10CBaseIssue11CanCallVoteEiPKcPc
Decompiled
undefined (4 params)
/* CBaseIssue::CanCallVote(int, char const*, char*) */
undefined4 __thiscall
CBaseIssue::CanCallVote(CBaseIssue *this,int param_1,char *param_2,char *param_3)
{
code *pcVar1;
CBaseEntity *this_00;
int iVar2;
undefined4 uVar3;
int *piVar4;
undefined4 uVar5;
int iVar6;
if (param_1 == -1) {
return 0;
}
this_00 = (CBaseEntity *)UTIL_EntityByIndex(param_1);
if (this_00 != (CBaseEntity *)0x0) {
pcVar1 = *(code **)(*(int *)this + 0x1c);
iVar2 = CBaseEntity::GetTeamNumber(this_00);
iVar6 = 2;
if (iVar2 != 1) {
iVar6 = iVar2;
}
uVar3 = (*pcVar1)(this,iVar6);
if ((char)uVar3 == '\0') {
piVar4 = (int *)CBaseEntity::GetTeam(this_00);
if (piVar4 != (int *)0x0) {
uVar5 = (**(code **)(*piVar4 + 0x32c))(piVar4);
V_snprintf(param_3,0x60,"The %s team cannot call this vote.",uVar5);
return uVar3;
}
V_strncpy(param_3,"Your team cannot call this vote.",0x60);
return uVar3;
}
}
return 1;
}
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.