CKickIssue::CanCallVote
0x00a059e0 · 391 bytes · __thiscall
_ZN10CKickIssue11CanCallVoteEiPKcPc
Decompiled
undefined (4 params)
/* CKickIssue::CanCallVote(int, char const*, char*) */
char __thiscall CKickIssue::CanCallVote(CKickIssue *this,int param_1,char *param_2,char *param_3)
{
char cVar1;
char cVar2;
CBaseEntity *this_00;
int iVar3;
int iVar4;
CBasePlayer *pCVar5;
CTerrorPlayer *local_20 [4];
cVar1 = CBaseIssue::CanCallVote((CBaseIssue *)this,param_1,param_2,param_3);
if (cVar1 != '\0') {
if (*(int *)(sv_vote_issue_kick_allowed._28_4_ + 0x30) == 0) {
V_strncpy(param_3,"Server has disabled that Issue.",0x60);
return '\0';
}
local_20[0] = (CTerrorPlayer *)0x0;
FindPlayerFromDetails(this,param_2,local_20);
this_00 = (CBaseEntity *)UTIL_EntityByIndex(param_1);
if (local_20[0] == (CTerrorPlayer *)0x0) {
V_strncpy(param_3,"Requires valid player.",0x60);
cVar1 = '\0';
}
else if (this_00 != (CBaseEntity *)0x0) {
iVar3 = CBaseEntity::GetTeamNumber((CBaseEntity *)local_20[0]);
iVar4 = CBaseEntity::GetTeamNumber(this_00);
if (iVar4 == 3) {
cVar1 = iVar3 == 3;
}
else {
cVar1 = iVar3 - 1U < 2;
}
if (local_20[0] != (CTerrorPlayer *)0x0) {
cVar2 = (**(code **)(*(int *)this_00 + 0x16c))(this_00);
pCVar5 = (CBasePlayer *)0x0;
if (cVar2 != '\0') {
pCVar5 = (CBasePlayer *)this_00;
}
cVar2 = CBasePlayer::IsSplitScreenPartner((CBasePlayer *)local_20[0],pCVar5);
if ((cVar2 != '\0') ||
((cVar2 = (**(code **)(*engine + 8))(engine), cVar2 == '\0' &&
(((*(int *)(local_20[0] + 0x30) != 0 &&
(*(int *)(local_20[0] + 0x30) - *(int *)(gpGlobals + 0x58) >> 4 == 1)) ||
((iVar3 = CBasePlayer::GetSplitScreenPlayerOwner((CBasePlayer *)local_20[0]),
iVar3 != 0 &&
((*(int *)(iVar3 + 0x30) != 0 &&
(*(int *)(iVar3 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4 == 1)))))))))) {
cVar1 = '\0';
}
}
}
}
return cVar1;
}
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.