Raised This Month: $32 Target: $400
 8% 

Mute menu


Post New Thread Reply   
 
Thread Tools Display Modes
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 02-27-2009 , 18:58   Re: Mute menu
Reply With Quote #21

You can use this version

PHP Code:
#include <amxmodx>
#include <fakemeta>

new bool:g_mute[33][33]
new 
g_menuchoose[33][33]

public 
plugin_init()
{
    
register_plugin("Voice Manager""1.0""ReymonARG/Cheap_Suit")
    
register_clcmd("say /mute""chat")
    
register_clcmd("say_team /mute""chat")
    
    
register_forward(FM_Voice_SetClientListening"fwd_voice_setclientlistening")
}

public 
client_connect(id)
{
    for(new 
0<= 32; ++i
        
g_mute[id][i] = false
}

public 
fwd_voice_setclientlistening(receiversenderlisten
{
    if(
receiver == sender)
        return 
FMRES_IGNORED
    
    
if(g_mute[receiver][sender])
    {
        
engfunc(EngFunc_SetClientListeningreceiversender0)
        return 
FMRES_SUPERCEDE
    
}
    return 
FMRES_IGNORED
}

public 
chat(id)
{
    
openmenu(id0)
    return 
PLUGIN_HANDLED
}

stock openmenu(idpage)
{        
    new 
menu menu_create("\r[Kz-Arg] \yMute Menu""menuaccion")
    new 
textmenu[64], count 1
    
    
for(new 1<= 32 i++)
    {
        if( !
is_user_connected(i) || is_user_bot(i) || is_user_hltv(i) )
            continue;
        
        new 
name[32], num[2]
        
get_user_name(iname31)
        
num_to_str(countnum1)
        
g_menuchoose[id][count++] = i
        formatex
(textmenu63"%s%s %s"id == "\d" "\w"nameg_mute[id][i] ? "\y(Muted)" "")
        
menu_additem(menutextmenunum0)
    }
    
    
menu_display(idmenupage)
    
    return 
PLUGIN_HANDLED;
}

public 
menuaccion(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        return 
PLUGIN_HANDLED
    
}
    
    new 
data[2], iName[64]
    new 
accesscallback
    
    menu_item_getinfo
(menuitemaccessdata1iName63callback)
    
    new 
g_menuchoose[id][str_to_num(data)]
    
    if( 
!= id )
        
g_mute[id][i] = !g_mute[id][i]
    
    
openmenu(id0)
    return 
PLUGIN_HANDLED

__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
IneedHelp
Veteran Member
Join Date: Mar 2007
Location: Argentina
Old 02-27-2009 , 19:41   Re: Mute menu
Reply With Quote #22

It's the same..you only changed the menu system
__________________
IneedHelp is offline
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 02-27-2009 , 20:29   Re: Mute menu
Reply With Quote #23

Quote:
Originally Posted by IneedHelp View Post
It's the same..you only changed the menu system
Yes.. Because if they have problem with menu. well i update. xd
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
CardCaptor
Junior Member
Join Date: Sep 2008
Old 02-27-2009 , 20:38   Re: Mute menu
Reply With Quote #24

The plugin works perfectly when sv_alltalk is set to 1. But when sv_alltalk is set to 0 only the CT team cam mute/unmute players, the TT team have a menuo without players.
CardCaptor is offline
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 02-27-2009 , 20:57   Re: Mute menu
Reply With Quote #25

Quote:
Originally Posted by CardCaptor View Post
The plugin works perfectly when sv_alltalk is set to 1. But when sv_alltalk is set to 0 only the CT team cam mute/unmute players, the TT team have a menuo without players.
With my code or with Cheap_Suit code?
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
CardCaptor
Junior Member
Join Date: Sep 2008
Old 02-27-2009 , 21:04   Re: Mute menu
Reply With Quote #26

Quote:
Originally Posted by AntiBots View Post
You can use this version

PHP Code:
#include <amxmodx>
#include <fakemeta>
 
new bool:g_mute[33][33]
new 
g_menuchoose[33][33]
 
public 
plugin_init()
{
    
register_plugin("Voice Manager""1.0""ReymonARG/Cheap_Suit")
    
register_clcmd("say /mute""chat")
    
register_clcmd("say_team /mute""chat")
 
    
register_forward(FM_Voice_SetClientListening"fwd_voice_setclientlistening")
}
 
public 
client_connect(id)
{
    for(new 
0<= 32; ++i
        
g_mute[id][i] = false
}
 
public 
fwd_voice_setclientlistening(receiversenderlisten
{
    if(
receiver == sender)
        return 
FMRES_IGNORED
 
    
if(g_mute[receiver][sender])
    {
        
engfunc(EngFunc_SetClientListeningreceiversender0)
        return 
FMRES_SUPERCEDE
    
}
    return 
FMRES_IGNORED
}
 
public 
chat(id)
{
    
openmenu(id0)
    return 
PLUGIN_HANDLED
}
 
stock openmenu(idpage)
{        
    new 
menu menu_create("\r[Kz-Arg] \yMute Menu""menuaccion")
    new 
textmenu[64], count 1
 
    
for(new 1<= 32 i++)
    {
        if( !
is_user_connected(i) || is_user_bot(i) || is_user_hltv(i) )
            continue;
 
        new 
name[32], num[2]
        
get_user_name(iname31)
        
num_to_str(countnum1)
        
g_menuchoose[id][count++] = i
        formatex
(textmenu63"%s%s %s"id == "\d" "\w"nameg_mute[id][i] ? "\y(Muted)" "")
        
menu_additem(menutextmenunum0)
    }
 
    
menu_display(idmenupage)
 
    return 
PLUGIN_HANDLED;
}
 
public 
menuaccion(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        return 
PLUGIN_HANDLED
    
}
 
    new 
data[2], iName[64]
    new 
accesscallback
 
    menu_item_getinfo
(menuitemaccessdata1iName63callback)
 
    new 
g_menuchoose[id][str_to_num(data)]
 
    if( 
!= id )
        
g_mute[id][i] = !g_mute[id][i]
 
    
openmenu(id0)
    return 
PLUGIN_HANDLED

This version works just perfect. But it doesn´t mute. It also has a problem with mutting some admines.

Last edited by CardCaptor; 02-27-2009 at 21:42.
CardCaptor is offline
phasetehman
Member
Join Date: Feb 2009
Old 02-28-2009 , 01:21   Re: Mute menu
Reply With Quote #27

Hey guys, I have a question. (apperantly i post everything in the wrong sections and they lock the topic) so I was told to post this question here. Anyways..... *angry face* I need some help. I made a change to the mute menu. I wanted it when u type /mute to show the menu but to say at the top

www.fearczclan.com Select player to mute them

So i edited this line

new len = format(menubody, 511, "\www.fearczclan.com Select player to mute them^n^n")
However, in game I get this for example

www.fearczclan.com Select player to mute them

d# Bob
d# Eric
d# Steve
0. Exit

So basically there is no number next to the person's name to select them. Any thoughts or ideas to fix this
phasetehman is offline
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 02-28-2009 , 01:40   Re: Mute menu
Reply With Quote #28

You are using amx_super? Or other plugin of voice manager?
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
phasetehman
Member
Join Date: Feb 2009
Old 02-28-2009 , 01:53   Re: Mute menu
Reply With Quote #29

the voice manager! mutemenu.amxx ;)
phasetehman is offline
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 02-28-2009 , 01:56   Re: Mute menu
Reply With Quote #30

Quote:
Originally Posted by phasetehman View Post
the voice manager! mutemenu.amxx ;)
My question dont for you..

But you have to edit the register_menu in plugin_init to.
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
Reply



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 19:09.


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