Проблема с мутами SourceBans++

Статус
В этой теме нельзя размещать новые ответы.

Haseek

йфя
Сообщения
472
Реакции
79
Операционная система
Linux
Список плагинов SM
01 "eItems" (0.10) by ESK0 (Original author: SM9)
02 "[Discord] Core" (1.0.9) by CrazyHackGUT aka Kruzya
03 "[Discord] SourceBans + SourceComms" (1.2.2) by CrazyHackGUT aka Kruzya
04 "[Discord] Simple Report System" (1.2.2) by CrazyHackGUT aka Kruzya
05 "[Discord] Admin Session Log" (1.0) by CrazyHackGUT aka Kruzya
06 "SourceBans++ Report Plugin" (1.6.3) by RumbleFrog, SourceBans++ Dev Team
07 "[VIP] Breachcharge" (1.0) by Someone
08 "[LSD] Core" (1.1.7) by d4Ck (vk.com/geliydaun)
09 "SourceBans++: SourceSleuth" (1.6.3) by ecca, SourceBans++ Dev Team
10 "SourceBans++: SourceComms" (1.6.3) by Alex, SourceBans++ Dev Team
11 "Sound Commands" (1.10.0.6502) by AlliedModders LLC
12 "[VIP] Tag" (1.1) by R1KO
13 "[VIP] No Fall Damage" (1.0.1) by R1KO (skype: vova.andrienko1)
14 "[VIP] Fire Damage" (1.0.1) by R1KO
15 "[VIP] Electro Effects" (1.0.3) by R1KO
16 "[VIP] FastReload" (1.0) by BaFeR
17 "[VIP] CHAT (+scp)" (3.1.1) by R1KO
18 "[VIP] NEON (CSS/CSGO)" (1.2) by R1KO & Pheonix (˙·٠●Феникс●٠·˙)
19 "[VIP] Kill Screen" (1.0.2) by R1KO (skype: vova.andrienko1)
20 "[VIP] Healthshot" (1.3) by R1KO (skype: vova.andrienko1) feat. Eneanuch
21 "[VIP] Features Manager" (2.0 DEV) by R1KO
22 "[CS:S/CS:GO] [VIP] Respawn" (1.3) by R1KO
23 "[VIP] Tagrenade" (1.1) by R1KO (skype: vova.andrienko1)
24 "[VIP] Core" (3.0 R) by R1KO
25 "[VIP] Show List" (1.0.0) by iLoco
26 "[CSGO] NOSCOPE ROUND" (1.1) by OneT0uch
27 "Admin Help" (1.10.0.6502) by AlliedModders LLC
28 "[VIP] Command Blocker" (1.0) by FIVE (Discord: FIVE#3136) & Someone
29 "CS:GO Esl Admin ESP (mmcs.pro)" (2.9) by SAZONISCHE
30 "[LSD] TP" (2.0.2) by fr4nch feat. d4Ck
31 "[VIP] Unlimited Ammo" (1.2.5.5b) by SN(Kaneki)
32 "Реклама" (1.5.0) by Phoenix (˙·٠●Феникс●٠·˙)
33 "System Craft" (1.1.2) by MrQout
34 "[LR] Module - TOP by KDR" (v3.1) by Wend4r
35 "[LR] Module - Unusual Kills" (v3.1.6 SR1) by Wend4r
36 "[LR] Module - FakeRank" (v3.1) by RoadSide Romeo & Wend4r
37 "[LR] Module - Vip for Rank" (1.0.4) by SAPSAN 隼
38 "Ghost" (2.0.2) by iLoco
39 "SM Franug CS:GO Agents Chooser" (1.1.6) by Franc1sco franug & Romeo
40 "VoteBKM" (1.0.8) by Drumanid
41 "[Shop] Core" (3.0E2) by FrozDark (Fork by R1KO & White Wolf)
42 "[CS:GO] Weapon Spawner" (1.0.1) by MrQout
43 "Bround" (0.1) by FlexMan
44 "Admin Menu" (1.10.0.6502) by AlliedModders LLC
45 "SM DEV Zones - Teleport" (2.0) by Franc1sco franug
46 "Anti-afk lite" (2.0) by Krabos
47 "[CS:GO/CSS] AbNeR Round End Sounds" (4.0.1) by abnerfs
48 "[Shop] Color Tracers" (2.0.4) by FrozDark & R1KO
49 "[Shop] Duck Speed" (1.0.1) by HolyHender | Credits: Wend4r
50 "[Shop] Ammo weapons" (1.2.1) by inklesspen / Marks
51 "Admin all spec" (1.1) by Dr!fter, babka68
52 "Basic Commands" (1.10.0.6502) by AlliedModders LLC
53 "Player Commands" (1.10.0.6502) by AlliedModders LLC
54 "ResetScore" (1.6) by tuty, babka68
55 "Client Preferences" (1.10.0.6502) by AlliedModders LLC
56 "RemoveExtraKnives" (1.2) by SheriF
57 "[CS:GO] Remove Messages" (2.6) by Fox1qqq
58 "Basic Info Triggers" (1.10.0.6502) by AlliedModders LLC
59 "Duck Speed" (1.0) by Wend4r
60 "Roun End Gravity" (0.1) by Muvik
61 "Admin Communication" (1.1) by Nico Yazawa
62 "[VIP] Shield" (1.3.3 [PUBLIC]) by Faya™ (DS: Faya™#8514)
63 "[VIP] Bhop" (1.0.2) by KOROVKA
64 "SourceBans++: Admin Config Loader" (1.6.3) by AlliedModders LLC, SourceBans++ Dev Team
65 "Block Report" (0.1) by SM9
66 "Multi Vip Test" (1.4) by JDW
67 "Simple Chat Processor (Redux)" (1.1.5) by Simple Plugins, Mini
68 "[VIP] Rainbow Player" (1.0.1) by xstage
69 "[LSD] Weapons" (1.1.1) by d4Ck (vk.com/geliydaun)
70 "Gloves" (1.0.5) by kgns | oyunhost.net
71 "In-game Help Menu" (0.7) by chundo, emsit, joinedsenses,donut1k and fixed by FreedomZ
72 "Nextmap" (1.10.0.6502) by AlliedModders LLC
73 "Reserved Slots" (1.10.0.6502) by AlliedModders LLC
74 "[VIP] Base Functions" (1.3.2) by R1KO, vadrozh
75 "SM DEV Zones" (4.0.2) by Franc1sco, root, Totenfluch
76 "[Levels Ranks] Core" (v3.1.2) by RoadSide Romeo & Wend4r
77 "Basic Chat" (1.10.0.6502) by AlliedModders LLC
78 "Admin File Reader" (1.10.0.6502) by AlliedModders LLC
79 "[VIP] Dissolve Body" (1.2.2) by KOROVKA, R1KO
80 "Rotate server graphic banners" (0.3) by HiTmAnY
81 "Basic Comm Control" (1.10.0.6502) by AlliedModders LLC
82 "ahide.smx"
83 "[LSD] Base Features" (1.1.0) by d4Ck (vk.com/geliydaun)
84 "SourceBans++: Bans Checker" (1.6.3) by psychonic, Ca$h Munny, SourceBans++ Dev Team
85 "[CS:GO] Weapon Stickers" (1.0.15) by quasemago and donut1k
86 "Weapons & Knives" (1.7.1) by kgns | oyunhost.net
87 "[Shop] Vampirism" (1.1) by R1KO
88 "[VIP Module] Bumpmine" (1.2.1) by HILER, Faya™, 1mpulse
89 "[Keys] VIP" (1.3) by R1KO
90 "[Keys] Core" (1.4) by R1KO
91 "Anti-Flood" (1.10.0.6502) by AlliedModders LLC
92 "SourceBans++: Main Plugin" (1.6.3) by SourceBans Development Team, SourceBans++ Dev Team
93 "[Shop] Halo" (1.3.1) by R1KO, ( rewritten Nek.'a 2x2 | ggwp.site )
94 "[LSD] VFM" (1.1.0) by d4Ck (vk.com/geliydaun)
95 "[Shop] Aura" (1.2) by R1KO
Привет. Установил sb++ и заметил что в админ меню помимо мутов от sb++ остались деффолтные муты. Пробовал их убрать отключив плагин basecomm но без него не работают и муты от sb++. Пробовал убрать флаг доступа j у админов который отвечает за выдачу мутов но бесполезно тк от этого флага так-же зависят муты sb++. Можете подсказать как можно офнуть дефолтный мут без влияния на sb++ или изменить флаги доступа к мутам в sb++? 😄
 

Kruzya

Участник
Сообщения
12,970
Реакции
10,921
  • Команда форума
  • #2
 

google>

oldgamers
Сообщения
373
Реакции
210
Привет. Установил sb++ и заметил что в админ меню помимо мутов от sb++ остались деффолтные муты. Пробовал их убрать отключив плагин basecomm но без него не работают и муты от sb++. Пробовал убрать флаг доступа j у админов который отвечает за выдачу мутов но бесполезно тк от этого флага так-же зависят муты sb++. Можете подсказать как можно офнуть дефолтный мут без влияния на sb++ или изменить флаги доступа к мутам в sb++? 😄
самый простой вариант,(закомментировать, вырезать) adminmenu в плагине basecomm.
Сообщения автоматически склеены:

C-подобный:
/**
 * vim: set ts=4 :
 * =============================================================================
 * SourceMod Communication Plugin
 * Provides fucntionality for controlling communication on the server
 *
 * SourceMod (C)2004-2008 AlliedModders LLC.  All rights reserved.
 * =============================================================================
 *
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License, version 3.0, as published by the
 * Free Software Foundation.
 * 1
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
 * details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * As a special exception, AlliedModders LLC gives you permission to link the
 * code of this program (as well as its derivative works) to "Half-Life 2," the
 * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
 * by the Valve Corporation.  You must obey the GNU General Public License in
 * all respects for all other code used.  Additionally, AlliedModders LLC grants
 * this exception to all derivative works.  AlliedModders LLC defines further
 * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
 * or <http://www.sourcemod.net/license.php>.
 *
 * Version: $Id$
 */

#include <sourcemod>
#include <sdktools>
#undef REQUIRE_PLUGIN
//#include <adminmenu>
#include <colors>

#pragma semicolon 1
#pragma newdecls required

public Plugin myinfo =
{
    name = "Basic Comm Control",
    author = "AlliedModders LLC",
    description = "Provides methods of controlling communication.",
    version = SOURCEMOD_VERSION,
    url = "http://www.sourcemod.net/"
};

enum struct PlayerState {
    bool isMuted; // Is the player muted?
    bool isGagged; // Is the player gagged?
    int gagTarget;
}

PlayerState playerstate[MAXPLAYERS+1];

ConVar g_Cvar_Deadtalk;                // Holds the handle for sm_deadtalk
ConVar g_Cvar_Alltalk;                // Holds the handle for sv_alltalk
bool g_Hooked = false;                // Tracks if we've hooked events for deadtalk

#include "basecomm/gag.sp"
#include "basecomm/natives.sp"
#include "basecomm/forwards.sp"

public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max)
{
    CreateNative("BaseComm_IsClientGagged", Native_IsClientGagged);
    CreateNative("BaseComm_IsClientMuted",  Native_IsClientMuted);
    CreateNative("BaseComm_SetClientGag",   Native_SetClientGag);
    CreateNative("BaseComm_SetClientMute",  Native_SetClientMute);
    RegPluginLibrary("basecomm");
    
    return APLRes_Success;
}

public void OnPluginStart()
{
    LoadTranslations("common.phrases");
    LoadTranslations("basecomm.phrases");
    
    g_Cvar_Deadtalk = CreateConVar("sm_deadtalk", "0", "Controls how dead communicate. 0 - Off. 1 - Dead players ignore teams. 2 - Dead players talk to living teammates.", 0, true, 0.0, true, 2.0);
    g_Cvar_Alltalk = FindConVar("sv_alltalk");
    
    RegAdminCmd("sm_mute", Command_Mute, ADMFLAG_CHAT, "sm_mute <player> - Removes a player's ability to use voice.");
    RegAdminCmd("sm_gag", Command_Gag, ADMFLAG_CHAT, "sm_gag <player> - Removes a player's ability to use chat.");
    RegAdminCmd("sm_silence", Command_Silence, ADMFLAG_CHAT, "sm_silence <player> - Removes a player's ability to use voice or chat.");
    
    RegAdminCmd("sm_unmute", Command_Unmute, ADMFLAG_CHAT, "sm_unmute <player> - Restores a player's ability to use voice.");
    RegAdminCmd("sm_ungag", Command_Ungag, ADMFLAG_CHAT, "sm_ungag <player> - Restores a player's ability to use chat.");
    RegAdminCmd("sm_unsilence", Command_Unsilence, ADMFLAG_CHAT, "sm_unsilence <player> - Restores a player's ability to use voice and chat.");   
    
    g_Cvar_Deadtalk.AddChangeHook(ConVarChange_Deadtalk);
    g_Cvar_Alltalk.AddChangeHook(ConVarChange_Alltalk);

}

public void ConVarChange_Deadtalk(ConVar convar, const char[] oldValue, const char[] newValue)
{
    if (g_Cvar_Deadtalk.IntValue)
    {
        HookEvent("player_spawn", Event_PlayerSpawn, EventHookMode_Post);
        HookEvent("player_death", Event_PlayerDeath, EventHookMode_Post);
        g_Hooked = true;
    }
    else if (g_Hooked)
    {
        UnhookEvent("player_spawn", Event_PlayerSpawn);
        UnhookEvent("player_death", Event_PlayerDeath);       
        g_Hooked = false;
    }
}

public bool OnClientConnect(int client, char[] rejectmsg, int maxlen)
{
    playerstate[client].isGagged = false;
    playerstate[client].isMuted = false;
    
    return true;
}

public Action OnClientSayCommand(int client, const char[] command, const char[] sArgs)
{
    if (client && playerstate[client].isGagged)
    {
        return Plugin_Stop;
    }
    
    return Plugin_Continue;
}

public void ConVarChange_Alltalk(ConVar convar, const char[] oldValue, const char[] newValue)
{
    int mode = g_Cvar_Deadtalk.IntValue;
    
    for (int i = 1; i <= MaxClients; i++)
    {
        if (!IsClientInGame(i))
        {
            continue;
        }
        
        if (playerstate[i].isMuted)
        {
            SetClientListeningFlags(i, VOICE_MUTED);
        }
        else if (g_Cvar_Alltalk.BoolValue)
        {
            SetClientListeningFlags(i, VOICE_NORMAL);
        }
        else if (!IsPlayerAlive(i))
        {
            if (mode == 1)
            {
                SetClientListeningFlags(i, VOICE_LISTENALL);
            }
            else if (mode == 2)
            {
                SetClientListeningFlags(i, VOICE_TEAM);
            }
        }
    }
}

public void Event_PlayerSpawn(Event event, const char[] name, bool dontBroadcast)
{
    int client = GetClientOfUserId(event.GetInt("userid"));
    
    if (!client)
    {
        return;   
    }
    
    if (playerstate[client].isMuted)
    {
        SetClientListeningFlags(client, VOICE_MUTED);
    }
    else
    {
        SetClientListeningFlags(client, VOICE_NORMAL);
    }
}

public void Event_PlayerDeath(Event event, const char[] name, bool dontBroadcast)
{
    int client = GetClientOfUserId(event.GetInt("userid"));
    
    if (!client)
    {
        return;   
    }
    
    if (playerstate[client].isMuted)
    {
        SetClientListeningFlags(client, VOICE_MUTED);
        return;
    }
    
    if (g_Cvar_Alltalk.BoolValue)
    {
        SetClientListeningFlags(client, VOICE_NORMAL);
        return;
    }
    
    int mode = g_Cvar_Deadtalk.IntValue;
    if (mode == 1)
    {
        SetClientListeningFlags(client, VOICE_LISTENALL);
    }
    else if (mode == 2)
    {
        SetClientListeningFlags(client, VOICE_TEAM);
    }
}
Сообщения автоматически склеены:

удали
C-подобный:
#include <colors>
Сообщения автоматически склеены:

ну и в комментариях по ссылке что давал оратор выше, тоже вырезают или да, как вариант вообще заменить на его.
 

Вложения

  • basecomm.sp
    6.4 КБ · Просмотры: 5
Последнее редактирование:
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу