it seems like you're muting and unmuting the menu user instead of the target.
PHP Code:
public handled_give_mic(id, menu, item){
if (item == MENU_EXIT){
menu_destroy(menu);
return;
}
new access, num[7], target;
menu_item_getinfo(menu, item, access, num, charsmax(num), _, _, access);
menu_destroy(menu);
target = str_to_num(num);
if (is_user_connected(target)){
new szName[32];
get_user_name(target, szName, 31); // MAX NAME IS 31 ITS HARDCODED IN THE ENGINE
if(is_muted[target]){
is_muted[target] = false;
client_print(id, print_chat, "%s is no longer muted!", szName);
}
else{
is_muted[target] = true;
client_print(id, print_chat, "%s is muted!", szName);
}
}
else{
chatcolor(id, "Player is not connected!");
}
}
__________________