PHP Code:
#include <amxmodx>
new yasak[33]
public plugin_init()
{
register_plugin("RoundSound","1.0","PaintLancer")
register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin")
register_event("HLTV", "elbasi", "a", "1=0", "2=0")
register_clcmd("say /ac","ac")
register_clcmd("say /kapat","kapat")
}
public elbasi()
{
set_task( 2.0, "stopsound" )
}
public t_win()
{
set_task(0.1, "kontrol")
}
public ac(id)
{
yasak[id] = 0
}
public kapat(id)
{
yasak[id] = 1
}
public kontrol(id)
{
if(yasak[id] == 1)
{
client_printc(id, "!t[-!g Hasik[TR] !t-] !nEl Sonu Muzigi Acmak Icin Say'dan !t/ac !nYazmalisiniz !")
}
else if(yasak[id] == 0)
{
muzik(id)
client_printc(id, "!t[-!g Hasik[TR] !t-] !nEl Sonu Muzigi Kapatmak Icin Say'dan !t/kapat !nYazmalisiniz !")
}
}
public muzik(id)
{
client_cmd(id,"spk misc/118music")
}
public plugin_precache()
{
precache_sound("misc/118music.wav")
return PLUGIN_CONTINUE
}
stock client_printc(const id, const input[], any:...)
{
new count = 1, players[32];
static msg[191];
vformat(msg, 190, input, 3);
replace_all(msg, 190, "!n", "^x01");
replace_all(msg, 190, "!g", "^x04");
replace_all(msg, 190, "!t", "^x03");
if (id) players[0] = id; else get_players(players, count, "ch"); {
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}
Hello, friends I have added the code to turn off / off the music to turn off the music, but the music does not turn off when I write / turn off