Code:
new i
const a = 33
new mute[a] = {1, ...}
public aocvoice31(id){
client_print(0,print_chat,"%L",LANG_PLAYER,"ATTACK_ATTACK")
for (i=1; i<=32; i++)
{
if (mute[i] == 1) {
emit_sound(i,CHAN_VOICE,"31.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
}
else {
return PLUGIN_CONTINUE
}
}
}
public mutevoice(id)
{
mute[id] = 0
client_print(id,print_chat,"%L",LANG_PLAYER,"YOU_MUTE")
}
public unmutevoice(id)
{
mute[id] = 1
client_print(id,print_chat,"%L",LANG_PLAYER,"YOU_UNMUTE")
}
i wrote this code suspose to able player to emit sound
they can type "say 11" to emit sound to everyone
and now i want they can type "!mute" to make the sound stop
cannot hear anymore
but these code does no effect when i typed !mute
is there any mistake ?
thank you