Skip to content

Commit

Permalink
Bugfix Ref. #9
Browse files Browse the repository at this point in the history
*Fixed a native Call Bug with SB Material Admin
  • Loading branch information
DJPlaya committed Jun 5, 2020
1 parent 0995cba commit 06bd0f0
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
Binary file modified plugins/forlix_floodcheck_redux.smx
Binary file not shown.
2 changes: 1 addition & 1 deletion scripting/1.10/FFCR/voiceloopback.sp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void FFCR_UnMute(int iClient, bool bAction)
GetClientAuthId(iClient, AuthId_Steam3, cSteamID, 16);
GetClientIP(iClient, cIP, MAX_IPPORT_LEN); // No Port
GetClientName(iClient, cName, 32);
if (!MAOffSetClientMuteType(iClient, cSteamID, cIP, cName, MSG_LOOPBACK_MUTE, bAction ? MA_MUTE : MA_UNMUTE, 0))
if (!MAOffSetClientMuteType(0, cSteamID, cIP, cName, MSG_LOOPBACK_MUTE, bAction ? MA_MUTE : MA_UNMUTE, 0))
{
LogError("[Error] Failed to perform an SB Material Admin %s on '%L', he has been %s regularly instead", bAction ? "mute" : "unmute", iClient, bAction ? "muted" : "unmuted")
MALog(MA_LogAction, "[Error] Failed to perform an SB Material Admin %s on '%L', he has been %s regularly instead", bAction ? "mute" : "unmute", iClient, bAction ? "muted" : "unmuted");
Expand Down
6 changes: 3 additions & 3 deletions scripting/1.10/forlix_floodcheck_redux.sp
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ public Action FFCR_TEST(int iClient, char cArgs)
for (int iTarget = 1; iTarget < MaxClients; iTarget++)
{
ReplyToCommand(iClient, "[Debug][FFCR] Client '%L' is %s", iTarget, FFCR_IsClientMuted(iTarget) ? "Muted" : "Unmuted");
ReplyToCommand(iClient, "[Debug][FFCR] Setting Client to muted...");
FFCR_UnMute(iTarget, true);
ReplyToCommand(iClient, "[Debug][FFCR] Client '%L' is %s", iTarget, FFCR_IsClientMuted(iTarget) ? "Muted" : "Unmuted");
ReplyToCommand(iClient, "[Debug][FFCR] Setting Client to %s", FFCR_IsClientMuted(iTarget) ? "Unmuted" : "Muted");
FFCR_UnMute(iTarget, !FFCR_IsClientMuted(iTarget));
ReplyToCommand(iClient, "[Debug][FFCR] Client '%L' now is %s", iTarget, FFCR_IsClientMuted(iTarget) ? "Muted" : "Unmuted");
}
}

Expand Down
2 changes: 1 addition & 1 deletion scripting/1.8/FFCR/voiceloopback.sp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void FFCR_UnMute(int iClient, bool bAction)
GetClientAuthId(iClient, AuthId_Steam3, cSteamID, 16);
GetClientIP(iClient, cIP, MAX_IPPORT_LEN); // No Port
GetClientName(iClient, cName, 32);
if (!MAOffSetClientMuteType(iClient, cSteamID, cIP, cName, MSG_LOOPBACK_MUTE, bAction ? MA_MUTE : MA_UNMUTE, 0))
if (!MAOffSetClientMuteType(0, cSteamID, cIP, cName, MSG_LOOPBACK_MUTE, bAction ? MA_MUTE : MA_UNMUTE, 0))
{
LogError("[Error] Failed to perform an SB Material Admin %s on '%L', he has been %s regularly instead", bAction ? "mute" : "unmute", iClient, bAction ? "muted" : "unmuted")
MALog(MA_LogAction, "[Error] Failed to perform an SB Material Admin %s on '%L', he has been %s regularly instead", bAction ? "mute" : "unmute", iClient, bAction ? "muted" : "unmuted");
Expand Down
12 changes: 9 additions & 3 deletions scripting/1.8/forlix_floodcheck_redux.sp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
//
// Copyright (c) 2008-2013 Dominik Friedrichs


//- Compiler Options -//

#pragma newdecls optional


//- Includes -//

#include <sdktools>
Expand Down Expand Up @@ -200,9 +206,9 @@ public Action FFCR_TEST(int iClient, char cArgs)
for (int iTarget = 1; iTarget < MaxClients; iTarget++)
{
ReplyToCommand(iClient, "[Debug][FFCR] Client '%L' is %s", iTarget, FFCR_IsClientMuted(iTarget) ? "Muted" : "Unmuted");
ReplyToCommand(iClient, "[Debug][FFCR] Setting Client to muted...");
FFCR_UnMute(iTarget, true);
ReplyToCommand(iClient, "[Debug][FFCR] Client '%L' is %s", iTarget, FFCR_IsClientMuted(iTarget) ? "Muted" : "Unmuted");
ReplyToCommand(iClient, "[Debug][FFCR] Setting Client to %s", FFCR_IsClientMuted(iTarget) ? "Unmuted" : "Muted");
FFCR_UnMute(iTarget, !FFCR_IsClientMuted(iTarget));
ReplyToCommand(iClient, "[Debug][FFCR] Client '%L' now is %s", iTarget, FFCR_IsClientMuted(iTarget) ? "Muted" : "Unmuted");
}
}

Expand Down

0 comments on commit 06bd0f0

Please sign in to comment.