Hei guys.. wanted to ask is this possible?
PHP Code:
new bool:g_mute[33];
public plugin_init()
{
set_task(120.0, "ShowMessage");
register_clcmd("say /us", "cmdToggle")
return PLUGIN_CONTINUE
}
public cmdToggle(i){
g_mute[i] = !g_mute[i];
if ((g_mute[i] = true)) {
client_cmd(i, "setinfo ^"mute^" ^"off^"")
}
else if ((g_mute[i] = false)) {
client_cmd(i, "setinfo ^"mute^" ^"on^"")
}
ColorChat(i, "^3You have^4 %sabled^3 sounds",(g_mute[i] ? "en":"dis") );
}
public ShowMessage(i) {
if((g_mute[i] = true)) {
ColorChat(i, "^3To turn ^4OFF^3 sounds - say ^1/us");
}
else {
ColorChat(i, "^3To turn ^4ON^3 sounds - say ^1/us");
}
}
__________________