/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <fakemeta>
new geri_say_hud, geri_sayim, geri_sayim_ses
new g_MsgSync
new const gerisayim_ses[][]=
{
"biohazard/f_1.wav",
"biohazard/f_2.wav",
"biohazard/f_3.wav",
"biohazard/f_4.wav",
"biohazard/f_5.wav",
"biohazard/f_6.wav",
"biohazard/f_7.wav",
"biohazard/f_8.wav",
"biohazard/f_9.wav",
"biohazard/f_10.wav",
"biohazard/start_infect.wav"
}
public plugin_precache()
{
register_plugin("Bio Geri Sayım FIX", "1.2", "ViTaLiTy.")
geri_say_hud = CreateHudSyncObj()
for(new i = 0; i < sizeof gerisayim_ses;i++)
engfunc(EngFunc_PrecacheSound, gerisayim_ses[i])
}
public plugin_init()
{
g_MsgSync = CreateHudSyncObj()
register_event("HLTV","event_new_round","a","1=0","2=0")
}
public event_new_round()
{
remove_task(1444)
geri_sayim = get_cvar_num("bh_starttime")
geri_sayim_ses = 9
geri_say()
}
public geri_say()
{
if(geri_sayim >= 1)
{
set_hudmessage(_, _, _, _, _, 1)
ShowSyncHudMsg(0, g_MsgSync, "[- S[a]w # Clan Zombie Biohazard Efsanesi -]^nEnfeksiyon %d Saniye Sonra Yayilacak",geri_sayim)
set_task(1.0,"geri_say", 1444)
if(geri_sayim <= 10)
{
ses_baslat(0, gerisayim_ses[geri_sayim_ses])
geri_sayim_ses--
}
geri_sayim--
}
else ses_baslat(0, gerisayim_ses[10])
}
stock ses_baslat(p_id, const ses[])
{
if(equal(ses[strlen(ses)-4], ".mp3"))
{
if(p_id == 0)
client_cmd(0,"mp3 play ^"sound/%s^"",ses)
else
{
if(is_user_connected(p_id))
client_cmd(p_id,"mp3 play ^"sound/%s^"",ses)
}
}
else if(equal(ses[strlen(ses)-4], ".wav"))
{
if(p_id == 0)
emit_sound(0, CHAN_AUTO, ses, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
else
{
if(is_user_connected(p_id))
emit_sound(p_id, CHAN_AUTO, ses, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
}
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/