#include <amxmodx>
new const numery_nut[][] = {"rso_01.mp3","rso_02.mp3","rso_03.mp3","rso_04.mp3","rso_05.mp3",
"rso_06.mp3","rso_07.mp3","rso_08.mp3","rso_09.mp3","rso_10.mp3",
"rso_11.mp3","rso_12.mp3","rso_13.mp3","rso_14.mp3","rso_15.mp3",
"rso_16.mp3","rso_17.mp3"}
new folder_rs[] = "rs_otwock"
new bool:mute[33];
new numer;
public plugin_init()
{
register_plugin("Rs","1","CheQ")
register_event("SendAudio", "RoundSound", "a", "2&%!MRAD_ctwin") ;
register_event("SendAudio", "RoundSound", "a", "2&%!MRAD_terwin");
register_clcmd("say /mute","MuteRS")
numer = 0;
}
public plugin_precache()
{
for(new i = 0; i < sizeof numery_nut; i++)
{
new adres[64];
format(adres,63,"sound/%s/%s",folder_rs,numery_nut[i])
precache_generic(adres)
}
}
public client_connect(id)
{
mute[id] = false;
}
public MuteRS(id)
{
if(mute[id])
{
client_print(id,print_chat,"Wlaczyles RS. Aby go wylaczyc wpisz ponownie /mute")
mute[id] = false;
}
else
{
client_print(id,print_chat,"Wylaczyles RS. Aby go wlaczyc wpisz ponownie /mute")
mute[id] = true;
client_cmd(id,"stopsound");
client_cmd(id,"mp3 stop");
}
}
public RoundSound()
{
numer = random_num(0, sizeof numery_nut);
new Players[32],num;
get_players(Players,num)
for(new ajdi = 0;ajdi<num;++ajdi)
{
client_cmd(ajdi,"stopsound");
client_cmd(ajdi,"mp3 stop");
if(!mute[ajdi])
Graj(ajdi)
}
}
public Graj(id)
{
client_cmd(id,"mp3 play sound/%s/%s",folder_rs,numery_nut[numer])
}
Użytkownik CheQ edytował ten post 04.12.2011 10:39


Dodatki SourceMod



Temat jest zamknięty














