voice_mute
0x0005d550 · 210 bytes · __cdecl
_ZL10voice_muteRK8CCommand
Decompiled
undefined (1 param)
/* voice_mute(CCommand const&) */
void voice_mute(CCommand *param_1)
{
char cVar1;
undefined4 uVar2;
int in_GS_OFFSET;
int local_9c;
int local_98;
undefined1 local_94 [132];
int local_10;
local_10 = *(int *)(in_GS_OFFSET + 0x14);
if (*(int *)param_1 == 2) {
uVar2 = V_atoi(*(char **)(param_1 + 0x40c));
cVar1 = (**(code **)(**(int **)(g_pMatchExtensions + 0x5c) + 0x20))
(*(int **)(g_pMatchExtensions + 0x5c),uVar2,&local_9c);
if (cVar1 != '\0') {
if (local_98 != 0 || local_9c != 0) {
(**(code **)(*(int *)g_pMatchVoice + 0x14))(g_pMatchVoice,local_9c,local_98,1);
Msg("%s is now muted.\n",local_94);
goto LAB_0005d57a;
}
}
Msg("Player# is invalid or refers to a bot, please use \"voice_show_mute\" command.\n");
}
Msg(
"Example usage: voice_mute player# - where player# is a number that you can find with \"voice_show_mute\" command.\n"
);
LAB_0005d57a:
if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* 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.