Thread: [Solved] Mute players dont work
View Single Post
Natsheh
Veteran Member
Join Date: Sep 2012
Old 07-24-2021 , 08:14   Re: Mute players dont work
Reply With Quote #2

it seems like you're muting and unmuting the menu user instead of the target.


PHP Code:
public handled_give_mic(idmenuitem){
    
    if (
item == MENU_EXIT){
        
        
menu_destroy(menu);
        return;
    }
    
    new 
accessnum[7], target;
    
menu_item_getinfo(menuitemaccessnumcharsmax(num), __access);
    
menu_destroy(menu);
    
target str_to_num(num);
    
    if (
is_user_connected(target)){
        
        new 
szName[32];
        
get_user_name(targetszName31); // MAX NAME IS 31 ITS HARDCODED IN THE ENGINE
        
        
if(is_muted[target]){        
            
is_muted[target] = false;
            
client_print(idprint_chat"%s is no longer muted!"szName);
        }
        else{
            
is_muted[target] = true;
            
client_print(idprint_chat"%s is muted!"szName);
        }
    }
    
    else{
        
chatcolor(id"Player is not connected!");
    }

__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 07-24-2021 at 08:14.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh