3 Müzik Yerine Sadece 1 Müzik Olsun.
Kod:
public fw_TakeDamage(victim, inflictor, attacker, Float:damage)
{
if(is_valid_player(attacker))
{
if(g_takim[attacker] == g_takim[victim] && g_takim[attacker] != 0 && get_cvar_num("mp_friendlyfire"))
{
return HAM_SUPERCEDE
}
if(get_user_team(attacker) == 1 && get_user_team(victim) == 2 && g_alarm && !catisma_aktif)
{
g_alarm = false
new players[32],teroralv
get_players(players,teroralv,"ae","TERRORIST")
g_alive_pris = teroralv
if(g_alive_pris > 1)
{
client_cmd(0,"stopsound")
set_task(0.1,"muzikcal")
renkli_yazi(0,"!n[!t%s!n] !gMahkumlar isyan baslatti",TAG)
renkli_yazi(0,"!n[!t%s!n] !gMahkumlar isyan baslatti",TAG)
}
}
}
return HAM_IGNORED
}
public muzikcal()
{
if(g_muzik)
{
switch(random_num(1,3))
{
case 1 :
{
emit_sound(0, CHAN_AUTO, alarm, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
g_muzik = false
}
case 2 :
{
emit_sound(0, CHAN_AUTO, isyan1, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
g_muzik = false
}
case 3 :
{
emit_sound(0, CHAN_AUTO, isyan2, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
g_muzik = false
}
}
}
}