L L4D2node

CChangeMapNowIssue::CanCallVote

0x00b42270 · 302 bytes · __thiscall

_ZN18CChangeMapNowIssue11CanCallVoteEiPKcPc

Decompiled

undefined (4 params)

/* CChangeMapNowIssue::CanCallVote(int, char const*, char*) */

undefined4 __thiscall
CChangeMapNowIssue::CanCallVote(CChangeMapNowIssue *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_now_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_00b4230c;
  iVar2 = _V_stricmp(param_2,pcVar3);
  if (iVar2 != 0) {
    return uVar1;
  }
LAB_00b4230c:
  V_strncpy(param_3,"Already on that map.",0x60);
  return 0;
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)