#include <amxmodx>
enum _:DeathSoundSettings
{
i_ConsecutiveKill,
szSoundToPlay[63],
szSendChatToAll[63]
}
new const LeagueDeathSounds[][DeathSoundSettings] =
{
{ 1, "misc/leaguesounds/File0016.wav", "&x01megölt egy ellenfelet." },
{ 2, "misc/leaguesounds/File0006.wav", "&x01Kettős gyilkosság." },
{ 3, "misc/leaguesounds/File0037.wav", "&x01Hármas gyilkosság." },
{ 4, "misc/leaguesounds/File0032.wav", "&x01Négyszeres gyilkosság." },
{ 5, "misc/leaguesounds/File0030.wav", "&x01Ötszörös gyilkosság." },
{ 6, "misc/leaguesounds/File0126.wav", "&x01Hatszoros gyilkosság." },
{ 7, "misc/leaguesounds/File0002.wav", "&x01Ász." },
{ 10, "misc/leaguesounds/File0059.wav", "&x01Gyilkológép." },
{ 13, "misc/leaguesounds/File0065.wav", "&x01Tombol." },
{ 16, "misc/leaguesounds/File0070.wav", "&x01Megállíthatatlán." },
{ 19, "misc/leaguesounds/File0073.wav", "&x01Legyőzhetetlen." },
{ 22, "misc/leaguesounds/File0086.wav", "&x01Legendás." },
{ 25, "misc/leaguesounds/File0079.wav", "&x01Istenszabású." }
}
new g_CurrentKill[33], DEATHSOUND;
new const ShutDownSound[] = { "misc/leaguesounds/File0054.wav" };
new const ShutDownChatMsg[] = { "&x04 Megállítva." };
public plugin_init()
{
register_plugin("League of Legends Sounds", "1.0", "JackEyedJones");
register_event("DeathMsg", "OnPlayerKilled", "a");
}
public plugin_precache()
{
for(new AllSounds = 0; AllSounds < sizeof(LeagueDeathSounds); AllSounds++)
{
precache_sound(LeagueDeathSounds[AllSounds][szSoundToPlay]);
precache_sound(ShutDownSound);
}
}
public OnPlayerKilled()
{
new victim = read_data(2), attacker = get_user_attacker(victim), szAttackerName[63];
get_user_name(attacker, szAttackerName, charsmax(szAttackerName));
if(!is_user_connected(victim) || is_user_alive(victim))
return PLUGIN_CONTINUE;
if(is_user_alive(attacker) && !is_user_alive(victim))
{
g_CurrentKill[attacker]++;
for(DEATHSOUND = 0; DEATHSOUND < sizeof(LeagueDeathSounds); DEATHSOUND++)
{
if(g_CurrentKill[attacker] == LeagueDeathSounds[DEATHSOUND][i_ConsecutiveKill])
{
if(g_CurrentKill[victim] == g_CurrentKill[attacker])
{
client_cmd(0, "stopsound; spk ^"%s^"", ShutDownSound);
g_CurrentKill[victim] = 0;
set_hudmessage(random(255), random(255), random(255), .holdtime = 1.5);
show_hudmessage(0, "%s %s", szAttackerName, ShutDownChatMsg);
return PLUGIN_CONTINUE;
}
client_cmd(0, "stopsound; spk ^"%s^"", LeagueDeathSounds[DEATHSOUND][szSoundToPlay]);
set_hudmessage(random(255), random(255), random(255), .holdtime = 1.5);
show_hudmessage(0, "%s %s", szAttackerName, LeagueDeathSounds[DEATHSOUND][szSendChatToAll]);
}
}
g_CurrentKill[victim] = 0;
}
return PLUGIN_CONTINUE;
}