Raised This Month: $12 Target: $400
 3% 

[REQ] Can somebody edit this plugin please?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ASKER_CZ
BANNED
Join Date: Nov 2016
Old 03-25-2017 , 17:27   [REQ] Can somebody edit this plugin please?
Reply With Quote #1

Hello, i found this MUTE ALL plugin and im asking, if can somebody edit it to more comfortable?

Now its configured like when you write !muteall, it shows in chat example [!muteall @dead or @alive or @all] (same with unmuteall) . And its pretty annoying . So im asking if can somebody make version, where you just write !muteall and will mute everybody?

CODE IS HERE : Please make it, im sure lot of people will appreciate it
PHP Code:
#include <sourcemod>
#include <sdktools>

#define PLUGIN_VERSION "2.0"

public Plugin:myinfo 
{
    
name "Mute All",
    
author "",
    
description "Mutes all players",
    
version PLUGIN_VERSION,
    
url ""
}

public 
OnPluginStart()
{
    
CreateConVar("sm_muteall_vers"PLUGIN_VERSION"MuteAll version"FCVAR_NOTIFY|FCVAR_PLUGIN|FCVAR_DONTRECORD);
    
    
RegAdminCmd("sm_muteall"Command_MuteAllADMFLAG_GENERIC"Mute all");
    
RegAdminCmd("sm_unmuteall"Command_UnmuteAllADMFLAG_GENERIC"Unmute all");
}

public 
Action:Command_MuteAll(clientargs)
{
    
///////////////////////////////////////////////////////
    //Test The arguments to make sure it is a valid command
    ///////////////////////////////////////////////////////
    
if (args 1)
    {
        
ReplyToCommand(client"[SM] Usage: sm_muteall <@dead or @alive or @all>");
        return 
Plugin_Handled;    
    }
    new 
caseNum;
    new 
String:szArg[65];
    
    
GetCmdArg(1szArgsizeof(szArg));
    
    
/////////////////////////////////////////////////
    //Set the appropriate case based on the arguments
    /////////////////////////////////////////////////
    
if(strcmp(szArg"@dead"false) == 0)
        
caseNum=0;
    else if(
strcmp(szArg"@alive"false) == 0)
        
caseNum=1;
    else if(
strcmp(szArg"@all"false) == 0)
        
caseNum=2;
    else 
        
caseNum=3;
    
    
/////////////////////////
    //Perform the actual task
    /////////////////////////
    
switch(caseNum)
    {
        case 
0
        {
            for (new 
1<= MaxClientsi++)
            {
                if (
IsClientInGame(i) && !IsFakeClient(i) && !IsPlayerAlive(i))
                {
                    if (!
CheckCommandAccess(i"sm_muteall"ADMFLAG_GENERIC))
                    {
                        
SetClientListeningFlags(iVOICE_MUTED);
                    }              
                }
            }
            
ShowActivity2(client"[SM]""%N muted dead players"client);
        }
        case 
1:
        {
            for (new 
1<= MaxClientsi++)
            {
                if (
IsClientInGame(i) && !IsFakeClient(i) && IsPlayerAlive(i))
                {
                    if (!
CheckCommandAccess(i"sm_muteall"ADMFLAG_GENERIC))
                    {
                        
SetClientListeningFlags(iVOICE_MUTED);
                    }              
                }
            }
            
ShowActivity2(client"[SM]""%N muted alive players"client);
        }
        case 
2:
        {
            for (new 
1<= MaxClientsi++)
            {
                if (
IsClientInGame(i) && !IsFakeClient(i))
                {
                    if (!
CheckCommandAccess(i"sm_muteall"ADMFLAG_GENERIC))
                    {
                        
SetClientListeningFlags(iVOICE_MUTED);
                    }              
                }
            }
            
ShowActivity2(client"[SM]""%N muted all players"client);
        }
        case 
3ReplyToCommand(client"[SM] Usage: sm_muteall <@dead or @alive or @all>"); 
    }
    return 
Plugin_Handled;
}

public 
Action:Command_UnmuteAll(clientargs)
{
    
///////////////////////////////////////////////////////
    //Test The arguments to make sure it is a valid command
    ///////////////////////////////////////////////////////
    
if (args 1)
    {
        
ReplyToCommand(client"[SM] Usage: sm_unmuteall <@dead or @alive or @all>");
        return 
Plugin_Handled;    
    }
    
    new 
caseNum;
    new 
String:szArg[65];
    
    
GetCmdArg(1szArgsizeof(szArg));
    
    
/////////////////////////////////////////////////
    //Set the appropriate case based on the arguments
    /////////////////////////////////////////////////
    
if(strcmp(szArg"@dead"false) == 0)
        
caseNum=0;
    else if(
strcmp(szArg"@alive"false) == 0)
        
caseNum=1;
    else if(
strcmp(szArg"@all"false) == 0)
        
caseNum=2;
    else 
        
caseNum=3;
    
    
/////////////////////////
    //Perform the actual task
    /////////////////////////
    
switch(caseNum)
    {
        case 
0:
        {
            for (new 
1<= MaxClientsi++)
            {
                if (
IsClientInGame(i) && !IsFakeClient(i) && !IsPlayerAlive(i))
                {
                    if (!
CheckCommandAccess(i"sm_unmuteall"ADMFLAG_GENERIC))
                    {
                        
SetClientListeningFlags(iVOICE_NORMAL);
                    }              
                }
            }
            
ShowActivity2(client"[SM]""%N unmuted dead players"client);
        }
        case 
1:
        {
            for (new 
1<= MaxClientsi++)
            {
                if (
IsClientInGame(i) && !IsFakeClient(i) && IsPlayerAlive(i))
                {
                    if (!
CheckCommandAccess(i"sm_unmuteall"ADMFLAG_GENERIC))
                    {
                        
SetClientListeningFlags(iVOICE_NORMAL);
                    }              
                }
            }
            
ShowActivity2(client"[SM]""%N unmuted alive players"client);
        }
        case 
2:
        {
            for (new 
1<= MaxClientsi++)
            {
                if (
IsClientInGame(i) && !IsFakeClient(i))
                {
                    if (!
CheckCommandAccess(i"sm_unmuteall"ADMFLAG_GENERIC))
                    {
                        
SetClientListeningFlags(iVOICE_NORMAL);
                    }              
                }
            }
            
ShowActivity2(client"[SM]""%N unmuted all players"client);
        }
        case 
3ReplyToCommand(client"[SM] Usage: sm_unmuteall <@dead or @alive or @all>");
    }
    return 
Plugin_Handled;

ASKER_CZ is offline
B3none
AlliedModders Donor
Join Date: Oct 2016
Location: United Kingdom
Old 03-25-2017 , 18:03   Re: [REQ] Can somebody edit this plugin please?
Reply With Quote #2

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

#define PLUGIN_VERSION "2.0"

public Plugin:myinfo 
{
    
name "Mute All",
    
author "",
    
description "Mutes all players",
    
version PLUGIN_VERSION,
    
url ""
}

public 
OnPluginStart()
{
    
CreateConVar("sm_muteall_vers"PLUGIN_VERSION"MuteAll version"FCVAR_NOTIFY|FCVAR_DONTRECORD);
    
    
RegAdminCmd("sm_muteall"Command_MuteAllADMFLAG_GENERIC"Mute all");
    
RegAdminCmd("sm_unmuteall"Command_UnmuteAllADMFLAG_GENERIC"Unmute all");
}

public 
Action:Command_MuteAll(clientargs)
{
    for (new 
1<= MaxClientsi++)
    {
        if (
IsClientInGame(i) && !IsFakeClient(i))
        {
            if (!
CheckCommandAccess(i"sm_muteall"ADMFLAG_GENERIC))
            {
                
SetClientListeningFlags(iVOICE_MUTED);
            }               
        }
    }
    
ShowActivity2(client"[SM]""%N muted all players"client);
    return 
Plugin_Handled;
}

public 
Action:Command_UnmuteAll(clientargs)
{
    for (new 
1<= MaxClientsi++)
    {
        if (
IsClientInGame(i) && !IsFakeClient(i))
        {
            if (!
CheckCommandAccess(i"sm_unmuteall"ADMFLAG_GENERIC))
            {
                
SetClientListeningFlags(iVOICE_NORMAL);
            }              
        }
    }
    
ShowActivity2(client"[SM]""%N unmuted all players"client);
    return 
Plugin_Handled;

__________________

Last edited by B3none; 03-25-2017 at 18:04.
B3none is offline
B3none
AlliedModders Donor
Join Date: Oct 2016
Location: United Kingdom
Old 03-25-2017 , 18:05   Re: [REQ] Can somebody edit this plugin please?
Reply With Quote #3

Should work, give it a go Any more issues just add me on steam
__________________
B3none is offline
B3none
AlliedModders Donor
Join Date: Oct 2016
Location: United Kingdom
Old 03-25-2017 , 18:34   Re: [REQ] Can somebody edit this plugin please?
Reply With Quote #4

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

#define PLUGIN_VERSION "2.0"

public Plugin:myinfo 
{
    
name "Mute All",
    
author "- Edits by B3none",
    
description "Mutes all players",
    
version PLUGIN_VERSION,
    
url ""
}

public 
OnPluginStart()
{
    
CreateConVar("sm_muteall_vers"PLUGIN_VERSION"MuteAll version"FCVAR_NOTIFY|FCVAR_DONTRECORD);
    
    
//------------ ALL MUTE ------------//
    
RegAdminCmd("sm_muteall"Command_MuteAllADMFLAG_GENERIC"Mute all");
    
RegAdminCmd("sm_unmuteall"Command_UnmuteAllADMFLAG_GENERIC"Unmute all");
    
    
//------------ ALIVE MUTE ------------//
    
RegAdminCmd("sm_muteallalive"Command_MuteAllAliveADMFLAG_GENERIC"Mute all alive players");
    
RegAdminCmd("sm_unmuteallalive"Command_UnmuteAllAliveADMFLAG_GENERIC"Unmute all alive players");
    
    
//------------ DEAD MUTE ------------//
    
RegAdminCmd("sm_mutealldead"Command_MuteAllDeadADMFLAG_GENERIC"Mute all dead players");
    
RegAdminCmd("sm_unmutealldead"Command_UnmuteAllDeadADMFLAG_GENERIC"Unmute all dead players");
}

//------------ ALL MUTE ------------//
public Action:Command_MuteAll(clientargs)
{
    for (new 
1<= MaxClientsi++)
    {
        if (
IsClientInGame(i) && !IsFakeClient(i))
        {
            if (!
CheckCommandAccess(i"sm_muteall"ADMFLAG_GENERIC))
            {
                
SetClientListeningFlags(iVOICE_MUTED);
            }               
        }
    }
    
    
ShowActivity2(client"[SM]""%N muted all players"client);
    
    return 
Plugin_Handled;
}

public 
Action:Command_UnmuteAll(clientargs)
{
    for (new 
1<= MaxClientsi++)
    {
        if (
IsClientInGame(i) && !IsFakeClient(i))
        {
            if (!
CheckCommandAccess(i"sm_unmuteall"ADMFLAG_GENERIC))
            {
                
SetClientListeningFlags(iVOICE_NORMAL);
            }              
        }
    }
    
ShowActivity2(client"[SM]""%N unmuted all players"client);
    return 
Plugin_Handled;
}

//------------ DEAD MUTE ------------//
public Action:Command_MuteAllDead(clientargs)
{
    for (new 
1<= MaxClientsi++)
    {
        if (
IsClientInGame(i) && !IsFakeClient(i) && !IsPlayerAlive(i))
        {
            if (!
CheckCommandAccess(i"sm_mutealldead"ADMFLAG_GENERIC))
            {
                
SetClientListeningFlags(iVOICE_MUTED);
            }              
        }
    }
    
ShowActivity2(client"[SM]""%N muted dead players"client);
    return 
Plugin_Handled;
}

public 
Action:Command_UnmuteAllDead(clientargs)
{
    for (new 
1<= MaxClientsi++)
    {
        if (
IsClientInGame(i) && !IsFakeClient(i) && !IsPlayerAlive(i))
        {
            if (!
CheckCommandAccess(i"sm_mutealldead"ADMFLAG_GENERIC))
            {
                
SetClientListeningFlags(iVOICE_NORMAL);
            }              
        }
    }
    
ShowActivity2(client"[SM]""%N unmuted dead players"client);
    return 
Plugin_Handled;
}

//------------ ALIVE MUTE ------------//
public Action:Command_MuteAllAlive(clientargs)
{
    for (new 
1<= MaxClientsi++)
    {
        if (
IsClientInGame(i) && !IsFakeClient(i) && IsPlayerAlive(i))
        {
            if (!
CheckCommandAccess(i"sm_muteallalive"ADMFLAG_GENERIC))
            {
                
SetClientListeningFlags(iVOICE_MUTED);
            }              
        }
    }
    
ShowActivity2(client"[SM]""%N muted alive players"client);
    return 
Plugin_Handled;
}

public 
Action:Command_UnmuteAllAlive(clientargs)
{
    for (new 
1<= MaxClientsi++)
    {
        if (
IsClientInGame(i) && !IsFakeClient(i) && IsPlayerAlive(i))
        {
            if (!
CheckCommandAccess(i"sm_muteallalive"ADMFLAG_GENERIC))
            {
                
SetClientListeningFlags(iVOICE_NORMAL);
            }              
        }
    }
    
ShowActivity2(client"[SM]""%N unmuted alive players"client);
    return 
Plugin_Handled;

If you still want all of the old funtions as seperate commands then use the code above
__________________

Last edited by B3none; 03-25-2017 at 18:35.
B3none is offline
ASKER_CZ
BANNED
Join Date: Nov 2016
Old 03-25-2017 , 18:58   Re: [REQ] Can somebody edit this plugin please?
Reply With Quote #5

Its not working :/ It mutes nobody
ASKER_CZ is offline
B3none
AlliedModders Donor
Join Date: Oct 2016
Location: United Kingdom
Old 03-25-2017 , 21:43   Re: [REQ] Can somebody edit this plugin please?
Reply With Quote #6

Add me on steam and I will look at it
__________________
B3none is offline
B3none
AlliedModders Donor
Join Date: Oct 2016
Location: United Kingdom
Old 03-25-2017 , 21:47   Re: [REQ] Can somebody edit this plugin please?
Reply With Quote #7

PHP Code:

#include <sourcemod> 
#include <sdktools> 

#define PLUGIN_VERSION "2.0" 

public Plugin:myinfo =  

    
name "Mute All"
    
author ""
    
description "Mutes all players"
    
version PLUGIN_VERSION
    
url "" 


public 
OnPluginStart() 

    
CreateConVar("sm_muteall_vers"PLUGIN_VERSION"MuteAll version"FCVAR_NOTIFY|FCVAR_PLUGIN|FCVAR_DONTRECORD); 
     
    
RegAdminCmd("sm_muteall"Command_MuteAllADMFLAG_GENERIC"Mute all"); 
    
RegAdminCmd("sm_unmuteall"Command_UnmuteAllADMFLAG_GENERIC"Unmute all"); 


public 
Action:Command_MuteAll(clientargs

    
/////////////////////////////////////////////////////// 
    //Test The arguments to make sure it is a valid command 
    /////////////////////////////////////////////////////// 
    
if (args 1
    { 
        
ReplyToCommand(client"[SM] Usage: sm_muteall <@dead or @alive or @all>"); 
        return 
Plugin_Handled;     
    } 
    new 
caseNum
    new 
String:szArg[65]; 
     
    
GetCmdArg(1szArgsizeof(szArg)); 
     
    
///////////////////////////////////////////////// 
    //Set the appropriate case based on the arguments 
    ///////////////////////////////////////////////// 
    
if(strcmp(szArg"@dead"false) == 0
        
caseNum=0
    else if(
strcmp(szArg"@alive"false) == 0
        
caseNum=1
    else if(
strcmp(szArg"@all"false) == 0
        
caseNum=2
    else  
        
caseNum=2
     
    
///////////////////////// 
    //Perform the actual task 
    ///////////////////////// 
    
switch(caseNum
    { 
        case 
0:  
        { 
            for (new 
1<= MaxClientsi++) 
            { 
                if (
IsClientInGame(i) && !IsFakeClient(i) && !IsPlayerAlive(i)) 
                { 
                    if (!
CheckCommandAccess(i"sm_muteall"ADMFLAG_GENERIC)) 
                    { 
                        
SetClientListeningFlags(iVOICE_MUTED); 
                    }               
                } 
            } 
            
ShowActivity2(client"[SM]""%N muted dead players"client); 
        } 
        case 
1
        { 
            for (new 
1<= MaxClientsi++) 
            { 
                if (
IsClientInGame(i) && !IsFakeClient(i) && IsPlayerAlive(i)) 
                { 
                    if (!
CheckCommandAccess(i"sm_muteall"ADMFLAG_GENERIC)) 
                    { 
                        
SetClientListeningFlags(iVOICE_MUTED); 
                    }               
                } 
            } 
            
ShowActivity2(client"[SM]""%N muted alive players"client); 
        } 
        case 
2
        { 
            for (new 
1<= MaxClientsi++) 
            { 
                if (
IsClientInGame(i) && !IsFakeClient(i)) 
                { 
                    if (!
CheckCommandAccess(i"sm_muteall"ADMFLAG_GENERIC)) 
                    { 
                        
SetClientListeningFlags(iVOICE_MUTED); 
                    }               
                } 
            } 
            
ShowActivity2(client"[SM]""%N muted all players"client); 
        } 
        case 
3ReplyToCommand(client"[SM] Usage: sm_muteall <@dead or @alive or @all>");  
    } 
    return 
Plugin_Handled


public 
Action:Command_UnmuteAll(clientargs

    
/////////////////////////////////////////////////////// 
    //Test The arguments to make sure it is a valid command 
    /////////////////////////////////////////////////////// 
    
if (args 1
    { 
        
ReplyToCommand(client"[SM] Usage: sm_unmuteall <@dead or @alive or @all>"); 
        return 
Plugin_Handled;     
    } 
     
    new 
caseNum
    new 
String:szArg[65]; 
     
    
GetCmdArg(1szArgsizeof(szArg)); 
     
    
///////////////////////////////////////////////// 
    //Set the appropriate case based on the arguments 
    ///////////////////////////////////////////////// 
    
if(strcmp(szArg"@dead"false) == 0
        
caseNum=0
    else if(
strcmp(szArg"@alive"false) == 0
        
caseNum=1
    else if(
strcmp(szArg"@all"false) == 0
        
caseNum=2
    else  
        
caseNum=2
     
    
///////////////////////// 
    //Perform the actual task 
    ///////////////////////// 
    
switch(caseNum
    { 
        case 
0
        { 
            for (new 
1<= MaxClientsi++) 
            { 
                if (
IsClientInGame(i) && !IsFakeClient(i) && !IsPlayerAlive(i)) 
                { 
                    if (!
CheckCommandAccess(i"sm_unmuteall"ADMFLAG_GENERIC)) 
                    { 
                        
SetClientListeningFlags(iVOICE_NORMAL); 
                    }               
                } 
            } 
            
ShowActivity2(client"[SM]""%N unmuted dead players"client); 
        } 
        case 
1
        { 
            for (new 
1<= MaxClientsi++) 
            { 
                if (
IsClientInGame(i) && !IsFakeClient(i) && IsPlayerAlive(i)) 
                { 
                    if (!
CheckCommandAccess(i"sm_unmuteall"ADMFLAG_GENERIC)) 
                    { 
                        
SetClientListeningFlags(iVOICE_NORMAL); 
                    }               
                } 
            } 
            
ShowActivity2(client"[SM]""%N unmuted alive players"client); 
        } 
        case 
2
        { 
            for (new 
1<= MaxClientsi++) 
            { 
                if (
IsClientInGame(i) && !IsFakeClient(i)) 
                { 
                    if (!
CheckCommandAccess(i"sm_unmuteall"ADMFLAG_GENERIC)) 
                    { 
                        
SetClientListeningFlags(iVOICE_NORMAL); 
                    }               
                } 
            } 
            
ShowActivity2(client"[SM]""%N unmuted all players"client); 
        } 
        case 
3ReplyToCommand(client"[SM] Usage: sm_unmuteall <@dead or @alive or @all>"); 
    } 
    return 
Plugin_Handled


How about this? I just changed the default swith case to be "@all"
__________________
B3none is offline
ASKER_CZ
BANNED
Join Date: Nov 2016
Old 03-25-2017 , 22:26   Re: [REQ] Can somebody edit this plugin please?
Reply With Quote #8

Thanks (b3none) . You got my database from rankme because you told me you can help me and then was threating my with IP of VPN. Very intelligent. Lol. No im kidding. You are retarded as fuck.

Last edited by ASKER_CZ; 03-25-2017 at 22:27.
ASKER_CZ is offline
B3none
AlliedModders Donor
Join Date: Oct 2016
Location: United Kingdom
Old 03-25-2017 , 22:42   Re: [REQ] Can somebody edit this plugin please?
Reply With Quote #9

B3none -> Offers to help you with database
B3none -> Helps you modify a plugin

ASKER_CZ -> Joins my servers
ASKER_CZ -> Ridecules my servers
ASKER_CZ -> Ridecules my plugins

I'm not here to bicker, I do not like people taking advantage.
I'm not too sure what you expect to happen after you laugh at my whole community?
__________________
B3none is offline
OSWO
Senior Member
Join Date: Jul 2015
Location: United Kingdom, London
Old 03-26-2017 , 10:29   Re: [REQ] Can somebody edit this plugin please?
Reply With Quote #10

Change VPN then? rofl.
__________________
SourceTimer | WeaponSkins++ | BasePlugins++ https://github.com/OSCAR-WOS
OSWO 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 08:54.


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