diff --git a/addons/sourcemod/scripting/MyJailbreak/Modules/Warden/mute.sp b/addons/sourcemod/scripting/MyJailbreak/Modules/Warden/mute.sp index 3944b8f4..d075e2c5 100644 --- a/addons/sourcemod/scripting/MyJailbreak/Modules/Warden/mute.sp +++ b/addons/sourcemod/scripting/MyJailbreak/Modules/Warden/mute.sp @@ -91,6 +91,7 @@ public void Mute_OnPluginStart() // Hooks HookEvent("round_end", Mute_Event_RoundEnd); HookEvent("round_start", Mute_Event_RoundStart); + HookEvent("player_team", Mute_Event_PlayerTeam_Post, EventHookMode_Post); } public void Mute_OnConfigsExecuted() @@ -228,6 +229,16 @@ public void Mute_Event_RoundEnd(Event event, const char[] name, bool dontBroadca UnMuteAll(true); } +public void Mute_Event_PlayerTeam_Post(Event event, const char[] szName, bool bDontBroadcast) +{ + int client = GetClientOfUserId(event.GetInt("userid")); + + if (event.GetInt("team") == CS_TEAM_CT) + { + UnMuteClient(client, -1); + } +} + /****************************************************************************** FORWARDS LISTEN ******************************************************************************/ diff --git a/addons/sourcemod/scripting/MyJailbreak/ratio.sp b/addons/sourcemod/scripting/MyJailbreak/ratio.sp index 9e2e2de3..5d52e146 100644 --- a/addons/sourcemod/scripting/MyJailbreak/ratio.sp +++ b/addons/sourcemod/scripting/MyJailbreak/ratio.sp @@ -564,7 +564,7 @@ public Action Command_JoinGuardQueue(int client, int iArgNum) { ForcePlayerSuicide(client); ChangeClientTeam(client, CS_TEAM_CT); - SetClientListeningFlags(client, VOICE_NORMAL); // unmute if sm_hosties or admin has muted prisoners on round start + //SetClientListeningFlags(client, VOICE_NORMAL); // unmute if sm_hosties or admin has muted prisoners on round start MinusDeath(client); CS_RespawnPlayer(client); } @@ -1055,7 +1055,7 @@ public int Handler_AcceptGuardRules(Handle menu, MenuAction action, int param1, if (gc_bRespawn.BoolValue) { - SetClientListeningFlags(client, VOICE_NORMAL); // unmute if sm_hosties or admin has muted prisoners on round start + //SetClientListeningFlags(client, VOICE_NORMAL); // unmute if sm_hosties or admin has muted prisoners on round start MinusDeath(client); CS_RespawnPlayer(client); } @@ -1160,7 +1160,7 @@ public int Handler_GuardQuestions(Handle menu, MenuAction action, int param1, in { ForcePlayerSuicide(client); ChangeClientTeam(client, CS_TEAM_CT); - SetClientListeningFlags(client, VOICE_NORMAL); // unmute if sm_hosties or admin has muted prisoners on round start + //SetClientListeningFlags(client, VOICE_NORMAL); // unmute if sm_hosties or admin has muted prisoners on round start if (gc_bRespawn.BoolValue) { MinusDeath(client); @@ -1199,7 +1199,7 @@ public int Handler_GuardQuestions(Handle menu, MenuAction action, int param1, in { ForcePlayerSuicide(client); ChangeClientTeam(client, CS_TEAM_CT); - SetClientListeningFlags(client, VOICE_NORMAL); // unmute if sm_hosties or admin has muted prisoners on round start + //SetClientListeningFlags(client, VOICE_NORMAL); // unmute if sm_hosties or admin has muted prisoners on round start if (gc_bRespawn.BoolValue) { MinusDeath(client); @@ -1237,7 +1237,7 @@ public int Handler_GuardQuestions(Handle menu, MenuAction action, int param1, in { ForcePlayerSuicide(client); ChangeClientTeam(client, CS_TEAM_CT); - SetClientListeningFlags(client, VOICE_NORMAL); // unmute if sm_hosties or admin has muted prisoners on round start + //SetClientListeningFlags(client, VOICE_NORMAL); // unmute if sm_hosties or admin has muted prisoners on round start if (gc_bRespawn.BoolValue) { MinusDeath(client); @@ -1424,7 +1424,7 @@ void FixTeamRatio() } SetClientPendingTeam(client, CS_TEAM_CT); - SetClientListeningFlags(client, VOICE_NORMAL); // unmute if sm_hosties or admin has muted prisoners on round start + //SetClientListeningFlags(client, VOICE_NORMAL); // unmute if sm_hosties or admin has muted prisoners on round start MinusDeath(client); bMovedPlayers = true; } @@ -1697,7 +1697,7 @@ public int ChangeMenu(Menu menu, MenuAction action, int client, int selection) } ChangeClientTeam(newGuard, CS_TEAM_CT); - SetClientListeningFlags(newGuard, VOICE_NORMAL); + //SetClientListeningFlags(newGuard, VOICE_NORMAL); MinusDeath(newGuard); } }