Raised This Month: $344 Target: $400
 86%   Almost there!

Solved [CSGO][PAID] Plugin for any server that there is


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
G0dFulL.
Member
Join Date: Jun 2020
Location: Romania
Old 08-14-2020 , 06:21   [CSGO][PAID] Plugin for any server that there is
Reply With Quote #1

Hello everyone. Im here to ask for a plugin that could be useful for every awp server or any server that there is .
So basically when theres one alive in a team (CT/T) Auto mute the DEAD people until next round and also a hint message for the dead ones like <font color='FF0000'> YOU ARE MUTED UNTIL THE NEXT ROUND</font> .
So that the person trying to clutch can hear the steps.
If you can do this please reply here asap

I would love you to see what i tried so far but im not that good as a coder and it doesnt work that well (Bcz i did this with a friend just trying coz we we re bored, plz dont make fun of this just because we have 0 exp)
PHP Code:
 #include <sourcemod>
#include <sdktools>
#include <cstrike>

#define PLUGIN_VERSION "1.0"

#pragma semicolon 1
#pragma newdecls required

public void OnPluginStart()
{
    
HookEvent("player_death"Event_OnPlayerDeath);
    
HookEvent("round_end"RoundEndEventHookMode_Post);
}

public 
void Event_OnPlayerDeath(Event event, const char[] namebool bDb)
{
    
int client GetClientOfUserId(event.GetInt("userid"));

    {
        
ServerCommand("sv_deadtalk 0");
        
PrintHintTextToAll("--<font color='#FF0000'>[1VX] ClutchTime</font>, Everyone is<font color='#FF0000'> MUTED</font>--");
    }

    if(
IsClientInGame(client)) {
        if(
GetTeamClientCount(CS_TEAM_T) == || GetTeamClientCount(CS_TEAM_CT) == 1) {
          
GetTeamClientCount(CS_TEAM_T), GetTeamClientCount(CS_TEAM_CT);
        }
    }
}

public 
Action RoundEnd(Handle event, const char[] namebool dontBroadcast)
{
    
ServerCommand("sv_deadtalk 1");

__________________
My Discord: G0dFulL#4405 | My Community

Last edited by G0dFulL.; 08-15-2020 at 09:30.
G0dFulL. is offline
Cruze
Veteran Member
Join Date: May 2017
Old 08-14-2020 , 07:22   Re: [CSGO][REQ] Plugin for any server that there is
Reply With Quote #2

PHP Code:
#include <sourcemod>
#include <sdktools>
#include <cstrike>

#undef REQUIRE_PLUGIN
#include <sourcecomms>
#include <basecomm>
#define REQUIRE_PLUGIN

#pragma semicolon 1
#pragma newdecls required

bool g_Muted;
bool g_bSourceCommsg_bBaseComms;

public 
Plugin myinfo =
{
    
name "Mute All Players On Clutch Scene",
    
author "Cruze",
    
description "Mute All Player When There Is 1 V/S X Situation.",
    
version "1.1",
    
url "http://steamcommunity.com/profiles/76561198132924835"
};

public 
void OnPluginStart()
{
    
HookEvent("player_death"Event_OnPlayerDeath);
    
HookEvent("round_start"Event_OnRoundStart);
    
HookEvent("round_end"Event_OnRoundEnd);
}

public 
void OnAllPluginsLoaded()
{
    
g_bSourceComms LibraryExists("sourcecomms++");
    
g_bBaseComms LibraryExists("basecomm");
}

public 
void OnLibraryAdded(const char[] name)
{
    if(
StrEqual(name"sourcecomms++"))
    {
        
g_bSourceComms true;
    }
    else if(
StrEqual(name"basecomm"))
    {
        
g_bBaseComms true;
    }
}

public 
void OnLibraryRemoved(const char[] name)
{
    if(
StrEqual(name"sourcecomms++"))
    {
        
g_bSourceComms false;
    }
    else if(
StrEqual(name"basecomm"))
    {
        
g_bBaseComms false;
    }
}

public 
void OnMapStart()
{
    
g_Muted false;
}

public 
Action Event_OnPlayerDeath(Event event, const char[] namebool dbc)
{
    
int client GetClientOfUserId(event.GetInt("userid"));

    if(
client && client <= MaxClients)
    {
        if(
GetTeamClientCount(CS_TEAM_T) == && GetTeamClientCount(CS_TEAM_CT) > 0)
        {
            
PrintToChatAll("It's %ix%i"GetTeamClientCount(CS_TEAM_T), GetTeamClientCount(CS_TEAM_CT));
            if(
g_Muted)
            {
                return 
Plugin_Continue;
            }
            for(
int i 1<= MaxClientsi++)
            {
                if(!
IsClientInGame(i))
                {
                    continue;
                }
                
SetClientListeningFlags(iVOICE_MUTED);
            }
            
g_Muted true;
        }
        else if(
GetTeamClientCount(CS_TEAM_CT) == && GetTeamClientCount(CS_TEAM_T) > 0)
        {
            
PrintToChatAll("It's %ix%i"GetTeamClientCount(CS_TEAM_CT), GetTeamClientCount(CS_TEAM_T));
            if(
g_Muted)
            {
                return 
Plugin_Continue;
            }
            for(
int i 1<= MaxClientsi++)
            {
                if(!
IsClientInGame(i))
                {
                    continue;
                }
                
SetClientListeningFlags(iVOICE_MUTED);
            }
            
g_Muted true;
        }
    }
    return 
Plugin_Continue;
}

public 
Action Event_OnRoundStart(Event event, const char[] namebool dbc)
{
    
g_Muted false;
}

public 
Action Event_OnRoundEnd(Event event, const char[] namebool dbc)
{
    for(
int i 1<= MaxClientsi++)
    {
        if(!
IsClientInGame(i))
        {
            continue;
        }
        if(
GetClientListeningFlags(i) == VOICE_MUTED)
        {
            if(
g_bSourceComms)
            {
                if(
SourceComms_GetClientMuteType(i) == bNot)
                {
                    
SetClientListeningFlags(iVOICE_NORMAL);
                }
                return 
Plugin_Continue;
            }
            if(
g_bBaseComms)
            {
                if(!
BaseComm_IsClientMuted(i))
                {
                    
SetClientListeningFlags(iVOICE_NORMAL);
                }
                return 
Plugin_Continue;
            }
            
SetClientListeningFlags(iVOICE_NORMAL);
        }
    }
    
g_Muted false;
    return 
Plugin_Continue;

Untested. It was requested by someone in discord
__________________
Taking paid private requests! Add me on steam/discord!
AlliedModders Releases | Github | Private Plugins | Steam | Discord
Cruze is offline
G0dFulL.
Member
Join Date: Jun 2020
Location: Romania
Old 08-14-2020 , 08:55   Re: [CSGO][REQ] Plugin for any server that there is
Reply With Quote #3

Quote:
Originally Posted by Cruze View Post
PHP Code:
#include <sourcemod>
#include <sdktools>
#include <cstrike>

#undef REQUIRE_PLUGIN
#include <sourcecomms>
#include <basecomm>
#define REQUIRE_PLUGIN

#pragma semicolon 1
#pragma newdecls required

bool g_Muted;
bool g_bSourceCommsg_bBaseComms;

public 
Plugin myinfo =
{
    
name "Mute All Players On Clutch Scene",
    
author "Cruze",
    
description "Mute All Player When There Is 1 V/S X Situation.",
    
version "1.1",
    
url "http://steamcommunity.com/profiles/76561198132924835"
};

public 
void OnPluginStart()
{
    
HookEvent("player_death"Event_OnPlayerDeath);
    
HookEvent("round_start"Event_OnRoundStart);
    
HookEvent("round_end"Event_OnRoundEnd);
}

public 
void OnAllPluginsLoaded()
{
    
g_bSourceComms LibraryExists("sourcecomms++");
    
g_bBaseComms LibraryExists("basecomm");
}

public 
void OnLibraryAdded(const char[] name)
{
    if(
StrEqual(name"sourcecomms++"))
    {
        
g_bSourceComms true;
    }
    else if(
StrEqual(name"basecomm"))
    {
        
g_bBaseComms true;
    }
}

public 
void OnLibraryRemoved(const char[] name)
{
    if(
StrEqual(name"sourcecomms++"))
    {
        
g_bSourceComms false;
    }
    else if(
StrEqual(name"basecomm"))
    {
        
g_bBaseComms false;
    }
}

public 
void OnMapStart()
{
    
g_Muted false;
}

public 
Action Event_OnPlayerDeath(Event event, const char[] namebool dbc)
{
    
int client GetClientOfUserId(event.GetInt("userid"));

    if(
client && client <= MaxClients)
    {
        if(
GetTeamClientCount(CS_TEAM_T) == && GetTeamClientCount(CS_TEAM_CT) > 0)
        {
            
PrintToChatAll("It's %ix%i"GetTeamClientCount(CS_TEAM_T), GetTeamClientCount(CS_TEAM_CT));
            if(
g_Muted)
            {
                return 
Plugin_Continue;
            }
            for(
int i 1<= MaxClientsi++)
            {
                if(!
IsClientInGame(i))
                {
                    continue;
                }
                
SetClientListeningFlags(iVOICE_MUTED);
            }
            
g_Muted true;
        }
        else if(
GetTeamClientCount(CS_TEAM_CT) == && GetTeamClientCount(CS_TEAM_T) > 0)
        {
            
PrintToChatAll("It's %ix%i"GetTeamClientCount(CS_TEAM_CT), GetTeamClientCount(CS_TEAM_T));
            if(
g_Muted)
            {
                return 
Plugin_Continue;
            }
            for(
int i 1<= MaxClientsi++)
            {
                if(!
IsClientInGame(i))
                {
                    continue;
                }
                
SetClientListeningFlags(iVOICE_MUTED);
            }
            
g_Muted true;
        }
    }
    return 
Plugin_Continue;
}

public 
Action Event_OnRoundStart(Event event, const char[] namebool dbc)
{
    
g_Muted false;
}

public 
Action Event_OnRoundEnd(Event event, const char[] namebool dbc)
{
    for(
int i 1<= MaxClientsi++)
    {
        if(!
IsClientInGame(i))
        {
            continue;
        }
        if(
GetClientListeningFlags(i) == VOICE_MUTED)
        {
            if(
g_bSourceComms)
            {
                if(
SourceComms_GetClientMuteType(i) == bNot)
                {
                    
SetClientListeningFlags(iVOICE_NORMAL);
                }
                return 
Plugin_Continue;
            }
            if(
g_bBaseComms)
            {
                if(!
BaseComm_IsClientMuted(i))
                {
                    
SetClientListeningFlags(iVOICE_NORMAL);
                }
                return 
Plugin_Continue;
            }
            
SetClientListeningFlags(iVOICE_NORMAL);
        }
    }
    
g_Muted false;
    return 
Plugin_Continue;

Untested. It was requested by someone in discord
Thanks, i will go try it right now
__________________
My Discord: G0dFulL#4405 | My Community
G0dFulL. is offline
G0dFulL.
Member
Join Date: Jun 2020
Location: Romania
Old 08-14-2020 , 09:17   Re: [CSGO][REQ] Plugin for any server that there is
Reply With Quote #4

Quote:
Originally Posted by Cruze View Post
PHP Code:
#include <sourcemod>
#include <sdktools>
#include <cstrike>

#undef REQUIRE_PLUGIN
#include <sourcecomms>
#include <basecomm>
#define REQUIRE_PLUGIN

#pragma semicolon 1
#pragma newdecls required

bool g_Muted;
bool g_bSourceCommsg_bBaseComms;

public 
Plugin myinfo =
{
    
name "Mute All Players On Clutch Scene",
    
author "Cruze",
    
description "Mute All Player When There Is 1 V/S X Situation.",
    
version "1.1",
    
url "http://steamcommunity.com/profiles/76561198132924835"
};

public 
void OnPluginStart()
{
    
HookEvent("player_death"Event_OnPlayerDeath);
    
HookEvent("round_start"Event_OnRoundStart);
    
HookEvent("round_end"Event_OnRoundEnd);
}

public 
void OnAllPluginsLoaded()
{
    
g_bSourceComms LibraryExists("sourcecomms++");
    
g_bBaseComms LibraryExists("basecomm");
}

public 
void OnLibraryAdded(const char[] name)
{
    if(
StrEqual(name"sourcecomms++"))
    {
        
g_bSourceComms true;
    }
    else if(
StrEqual(name"basecomm"))
    {
        
g_bBaseComms true;
    }
}

public 
void OnLibraryRemoved(const char[] name)
{
    if(
StrEqual(name"sourcecomms++"))
    {
        
g_bSourceComms false;
    }
    else if(
StrEqual(name"basecomm"))
    {
        
g_bBaseComms false;
    }
}

public 
void OnMapStart()
{
    
g_Muted false;
}

public 
Action Event_OnPlayerDeath(Event event, const char[] namebool dbc)
{
    
int client GetClientOfUserId(event.GetInt("userid"));

    if(
client && client <= MaxClients)
    {
        if(
GetTeamClientCount(CS_TEAM_T) == && GetTeamClientCount(CS_TEAM_CT) > 0)
        {
            
PrintToChatAll("It's %ix%i"GetTeamClientCount(CS_TEAM_T), GetTeamClientCount(CS_TEAM_CT));
            if(
g_Muted)
            {
                return 
Plugin_Continue;
            }
            for(
int i 1<= MaxClientsi++)
            {
                if(!
IsClientInGame(i))
                {
                    continue;
                }
                
SetClientListeningFlags(iVOICE_MUTED);
            }
            
g_Muted true;
        }
        else if(
GetTeamClientCount(CS_TEAM_CT) == && GetTeamClientCount(CS_TEAM_T) > 0)
        {
            
PrintToChatAll("It's %ix%i"GetTeamClientCount(CS_TEAM_CT), GetTeamClientCount(CS_TEAM_T));
            if(
g_Muted)
            {
                return 
Plugin_Continue;
            }
            for(
int i 1<= MaxClientsi++)
            {
                if(!
IsClientInGame(i))
                {
                    continue;
                }
                
SetClientListeningFlags(iVOICE_MUTED);
            }
            
g_Muted true;
        }
    }
    return 
Plugin_Continue;
}

public 
Action Event_OnRoundStart(Event event, const char[] namebool dbc)
{
    
g_Muted false;
}

public 
Action Event_OnRoundEnd(Event event, const char[] namebool dbc)
{
    for(
int i 1<= MaxClientsi++)
    {
        if(!
IsClientInGame(i))
        {
            continue;
        }
        if(
GetClientListeningFlags(i) == VOICE_MUTED)
        {
            if(
g_bSourceComms)
            {
                if(
SourceComms_GetClientMuteType(i) == bNot)
                {
                    
SetClientListeningFlags(iVOICE_NORMAL);
                }
                return 
Plugin_Continue;
            }
            if(
g_bBaseComms)
            {
                if(!
BaseComm_IsClientMuted(i))
                {
                    
SetClientListeningFlags(iVOICE_NORMAL);
                }
                return 
Plugin_Continue;
            }
            
SetClientListeningFlags(iVOICE_NORMAL);
        }
    }
    
g_Muted false;
    return 
Plugin_Continue;

Untested. It was requested by someone in discord
Im back. I tried it and restarted my server. Everyone can still talk. No errors in logs or from sm plugins list i dont know why
__________________
My Discord: G0dFulL#4405 | My Community
G0dFulL. is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:08.


Powered by vBulletin®
Copyright ©2000 - 2022, vBulletin Solutions, Inc.
Theme made by Freecode