Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#define PLUGIN "Annoucement messages"
#define VERSION "1.0"
#define AUTHOR "stigma"
new iKill[33] = 0
new bool:FirstBlood
new const WickedSickSound[] = "Announce/WhickedSick.wav"
new const UnStoppableSound[] = "Announce/Unstoppable.wav"
new const UltraKillSound[] = "Announce/UltraKill.wav"
new const TripleKillSound[] = "Announce/Triple_kill.wav"
new const TeamKillerSound[] = "Announce/Team_Killer.wav"
new const SpawnKillerSound[] = "Announce/Spawn_killer.wav"
new const ScoreSound[] = "Announce/Score.wav"
new const RedDominateSound[] = "Announce/red_team_dominating.wav"
new const RampageSound[] = "Announce/Rampage.wav"
new const OwnageSound[] = "Announce/Ownage.wav"
new const MultiKillSound[] = "Announce/MultiKill.wav"
new const MonsterKillSound[] = "Announce/monster_kill.wav"
new const KillingSpreeSound[] = "Announce/Killing_Spree.wav"
new const HolyShitSound[] = "Announce/HolyShit_F.wav"
new const HeadShotSound[] = "Announce/HeadShot.wav"
new const HeadHunterSound[] = "Announce/HeadHunter.wav"
new const GodLikeSound[] = "Announce/GodLike.wav"
new const FirstBloodSound[] = "Announce/first_blood.wav"
new const EagleEyeSound[] = "Announce/EagleEye.wav"
new const DoubleKillSound[] = "Announce/Double_Kill.wav"
new const DominatingSound[] = "Announce/Dominating.wav"
new const BlueDominateSound[] = "Announce/blue_team_dominating.wav"
public plugin_precache() {
precache_sound(DoubleKillSound) // Sound 2
precache_sound(TripleKillSound) // Sound 3
precache_sound(MultiKillSound) // Sound 5
precache_sound(KillingSpreeSound) // Sound 7
precache_sound(UltraKillSound) // Sound 9
precache_sound(MonsterKillSound) // Sound 10
precache_sound(DominatingSound) // Sound 12
precache_sound(GodLikeSound) // Sound 13
precache_sound(RampageSound) // Sound 15
precache_sound(WickedSickSound) // Sound 17
precache_sound(TeamKillerSound) // Team Mate killed
precache_sound(SpawnKillerSound) // Someone killed within 10 secs
precache_sound(ScoreSound) // Task
precache_sound(RedDominateSound) // Terroists is dominating
precache_sound(OwnageSound) // Team Owning
precache_sound(HolyShitSound) // 1 shot, 2 kill
precache_sound(HeadShotSound) // HeadShot
precache_sound(HeadHunterSound) // AWM Headshot
precache_sound(FirstBloodSound) // First Kill
precache_sound(EagleEyeSound) // Deagle Face
precache_sound(BlueDominateSound) // Counter-Terroists is dominating
precache_sound(UnStoppableSound)
}
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("HLTV", "NewRound", "a", "1=0", "2=0")
register_event("DeathMsg","Death","a")
}
public NewRound(id) {
FirstBlood = false
client_print(0,print_chat,"%d", iKill[id])
}
public Death(id) {
set_hudmessage(0, 100, 155, 0.00, 0.35, 3, 1.0, 4.0, 0.5, 0.05, 1)
new killer = read_data(1)
new victim = read_data(2)
new headshot = read_data(3)
new WeaponName[20]
new WeaponID = get_weaponid(WeaponName)
read_data(4,WeaponName,19)
new vicname[33]
get_user_name(victim,vicname,32)
new killername[33]
get_user_name(killer,killername,32)
if (get_user_team(killer) == get_user_team(victim)) {
client_cmd(0,"play %s", TeamKillerSound)
show_hudmessage(0,"%s killed a team mate!", killername)
iKill[killer] = 0
return PLUGIN_HANDLED
}
if (get_user_team(killer) != get_user_team(victim)) {
if (FirstBlood = false) {
client_cmd(0,"play %s", FirstBloodSound)
FirstBlood = true
iKill[killer] += 1
set_task(0.1, "HudEvent", id)
return PLUGIN_HANDLED
}
if (headshot) {
client_cmd(0,"play %s", HeadShotSound)
show_hudmessage(id,"Headshot!")
iKill[killer] += 1
set_task(0.1, "HudEvent", id)
return PLUGIN_HANDLED
}
if (WeaponID = CSW_DEAGLE && headshot) {
client_cmd(0,"play %s", EagleEyeSound)
show_hudmessage(id,"%s has an Eagle eye!")
iKill[killer] += 1
set_task(0.1, "HudEvent", id)
return PLUGIN_HANDLED
}
iKill[killer] += 1
}
}
public HudEvent(id) {
set_hudmessage(0, 100, 155, 0.00, 0.40, 3, 1.0, 4.0, 0.5, 0.05, 2)
new killer = read_data(1)
new killername[33]
get_user_name(killer,killername,32)
if (iKill[killer] = 2) {
client_cmd(id,"play %s",DoubleKillSound)
show_hudmessage(id,"Double Kill!")
} else if (iKill[killer] = 3) {
client_cmd(id,"play %s",TripleKillSound)
show_hudmessage(id,"Triple Kill!")
} else if (iKill[killer] = 5) {
client_cmd(id,"play %s",MultiKillSound)
show_hudmessage(id,"Multi Kill!")
} else if (iKill[killer] = 7) {
client_cmd(0,"play %s",KillingSpreeSound)
show_hudmessage(0,"%s is on a Killing Spree!", killername)
} else if (iKill[killer] = 9) {
client_cmd(id,"play %s",UltraKillSound)
show_hudmessage(id,"Ultra Kill!")
} else if (iKill[killer] = 10) {
client_cmd(0,"play %s",MonsterKillSound)
show_hudmessage(0,"M-M-M-MONSTER KILL!!!")
} else if (iKill[killer] = 11) {
client_cmd(0,"play %s",DominatingSound)
show_hudmessage(0,"%s is Dominating!", killername)
} else if (iKill[killer] = 12) {
client_cmd(0,"play %s",GodLikeSound)
show_hudmessage(0,"%s is Godlike!", killername)
} else if (iKill[killer] = 14) {
client_cmd(0,"play %s",RampageSound)
show_hudmessage(0,"%s is on a Rampage!", killername)
} else if (iKill[killer] = 15) {
client_cmd(0,"play %s",WickedSickSound)
show_hudmessage(0,"WHICKED SICK!!!^n%s has killed 15 without dying!", killername)
}
return PLUGIN_CONTINUE
}