#include <amxmodx>
#include <amxmisc>
#include <dhudmessage>
#define PLUGIN_NAME "Ultimate KillStreak Advanced"
#define PLUGIN_VERSION "0.7"
#define PLUGIN_AUTHOR "SAMURAI"
new g_roundCount
new kills[33] = {0,...};
new deaths[33] = {0,...};
new firstblood
new kill[31][24];
#define LEVELS 12
#define hsounds 6
#define knsounds 3
#define fbsounds 3
#define prpsounds 5
#define suicidesounds 3
#define maxdbsounds 2
#define TASK_CLEAR_KILL 100
new hsenable
new knifeenable
new firstbloodenable
new nadecvar
new suicidecvar
new cvardouble
new rnstartcvar
new killstreaktype
new levels[15] = {3, 4, 6, 8, 10, 12, 14, 15, 16, 18, 20, 22, }
new sounds[12][] =
{
"mappa/triplekill",
"mappa/multikill",
"mappa/ultrakill",
"mappa/combowhore",
"mappa/killingspree",
"mappa/megakill",
"mappa/holyshit",
"mappa/ludicrouskill",
"mappa/rampage",
"mappa/unstoppable",
"mappa/monsterkill",
};
new messages[11][] =
{
"%s: Triple Kill !",
"%s: Multi Kill !",
"%s: Ultra Kill !",
"%s: Combowhore !",
"%s: KillingSpree !",
"%s: Mega Kill !",
"%s: Holy Shit !",
"%s: Ludicrous Kill !",
"%s: Rampage !",
"%s: Unstoppable !",
"%s: M o n s t e R K i L L ! ! !"
};
new hslist[hsounds][] =
{
"mappa/headshot1",
"mappa/headshot2",
"mappa/headshot3",
"mappa/headshot4",
"mappa/headshot5",
"mappa/headshot6"
}
new fblist[fbsounds][]=
{
"mappa/firstblood1",
"mappa/firstblood2",
"mappa/firstblood3"
}
new preplist[prpsounds][]=
{
"mappa/prepare1",
"mappa/prepare2",
"mappa/prepare3",
"mappa/prepare4",
"mappa/prepare5"
}
new fbmessages[3][]=
{
"%s Meg van az elso ver !!",
"%s olt elsonek !!",
"%s Adta le az elso lovest !!"
}
new hsmessages[4][]=
{
"%s Leszedte %s fejet !!",
"%s Fejbe durrantota %s -t !!",
"%s Agy velon lotte %s -t !!",
"%s Adott %s -nak egy csoda szep fejlovest !!"
}
new knlist[knsounds][]=
{
"mappa/humiliation1",
"mappa/humiliation2",
"mappa/humiliation3"
}
new knmessages[3][]=
{
"%s Meg keselte %s -t !!",
"%s Brutalisan leszurta %s -t !!",
"%s Le szurta %s -t !!"
}
new nademessages[3][]=
{
"%s Ki robbantotta %s -t egy granattal !!",
"%s Meg ajandekozta %s -t egy granattal !!",
"%s Nagyon ugyesen granatozik !!"
}
new suicidemess[2][]=
{
"%s Te bena fasz, megotled sajat magad !!",
"%s Nagyon fogyatekos, hogy tudod sajat magad megolni ?!!"
}
new suicidelist[suicidesounds][]=
{
"mappa/suicide1",
"mappa/suicide2",
"mappa/suicide3"
}
new doublelist[maxdbsounds][]=
{
"mappa/doublekill1",
"mappa/doublekill2"
}
is_mode_set(bits) {
new mode[9];
get_cvar_string("ut_killstreak_advanced", mode, 8);
return read_flags(mode) & bits;
}
public plugin_init() {
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
killstreaktype = register_cvar("ut_killstreak_advanced", "3");
register_event("ResetHUD", "reset_hud", "b");
register_event("HLTV","rnstart","a", "1=0", "2=0");
register_event("DeathMsg", "event_death", "a");
hsenable = register_cvar("ut_killstreak_hs","1");
knifeenable = register_cvar("ut_killstreak_knife","1");
firstbloodenable = register_cvar("ut_firstblood","1");
nadecvar = register_cvar("ut_nade_events","1");
suicidecvar = register_cvar("ut_suicide_events","1");
cvardouble = register_cvar("ut_doublekill_events","1");
rnstartcvar = register_cvar("ut_roundcout_sounds","1");
register_event("TextMsg","reset_counter","a","2&#Game_C","2&#Game_w")
return PLUGIN_CONTINUE;
}
public reset_counter(){
g_roundCount = 0
}
public event_death(id) {
new killer = read_data(1);
new victim = read_data(2);
new headshot = read_data(3);
new weapon[24], vicname[32], killname[32]
read_data(4,weapon,23)
get_user_name(victim,vicname,31)
get_user_name(killer,killname,31)
if(headshot == 1 && get_pcvar_num(hsenable) ==1)
{
set_hudmessage(random(255), random(255), random(255), -1.0, 0.30, 0, 6.0, 6.0)
show_hudmessage(0, (hsmessages[random_num(0,3)]), killname, vicname)
new i
i = random_num(0,hsounds-1)
client_cmd(0,"spk %s",hslist[i])
}
if(weapon[0] == 'k' && get_pcvar_num(knifeenable) ==1)
{
set_hudmessage(random(255), random(255), random(255), -1.0, 0.30, 0, 6.0, 6.0)
show_hudmessage(0, (knmessages[random_num(0,2)]), killname, vicname)
new r
r = random_num(0,knsounds-1)
client_cmd(0,"spk %s",knlist[r])
}
if(firstblood && killer!=victim && killer>0 && get_pcvar_num(firstbloodenable) ==1)
{
set_hudmessage(random(255), random(255), random(255), -1.0, 0.30, 0, 6.0, 6.0)
show_hudmessage(0, (fbmessages[random_num(0,2)]), killname)
new t
t = random_num(0,fbsounds-1)
client_cmd(0,"spk %s",fblist[t])
firstblood = 0
}
if(weapon[1] == 'r' && get_pcvar_num(nadecvar) ==1)
{
set_hudmessage(random(255), random(255), random(255), -1.0, 0.30, 0, 6.0, 6.0)
show_hudmessage(0,(nademessages[random_num(0,2)]),killname,vicname)
client_cmd(0,"spk mappa/grenade1")
}
if(killer == victim && get_pcvar_num(suicidecvar) ==1)
{
set_hudmessage(random(255), random(255), random(255), -1.0, 0.30, 0, 6.0, 6.0)
show_hudmessage(0,(suicidemess[random_num(0,1)]), vicname)
new z
z = random_num(0,suicidesounds-1)
client_cmd(0,"spk %s",suicidelist[z])
}
if(kill[killer][0] && equal(kill[killer],weapon) && get_pcvar_num(cvardouble) == 1)
{
set_hudmessage(random(255), random(255), random(255), -1.0, 0.30, 0, 6.0, 6.0)
show_hudmessage(0,"Wow %s egymás után 2 játékost ölt!", killname)
kill[killer][0] = 0;
new q
q= random_num(0,maxdbsounds-1)
client_cmd(0,"spk %s",doublelist[q])
}
else
{
kill[killer] = weapon;
set_task(0.1,"clear_kill",TASK_CLEAR_KILL+killer);
}
kills[killer] += 1;
kills[victim] = 0;
deaths[killer] = 0;
deaths[victim] += 1;
for (new i = 0; i < LEVELS; i++)
{
if (kills[killer] == levels[i])
{
announce(killer, i);
return PLUGIN_CONTINUE;
}
}
return PLUGIN_CONTINUE;
}
announce(killer, level)
{
new name[33]
get_user_name(killer, name, 32);
set_hudmessage(random(255), random(255), random(255), 0.05, 0.65, 2, 0.02, 6.0, 0.01, 0.1, 2);
if( (get_pcvar_num(killstreaktype) <= 0 ) || get_pcvar_num(killstreaktype) > 3)
return PLUGIN_HANDLED;
if(get_pcvar_num(killstreaktype) == 1)
{
show_hudmessage(0, messages[level], name);
}
if(get_pcvar_num(killstreaktype) == 2)
{
client_cmd(0, "spk %s", sounds[level]);
}
if(get_pcvar_num(killstreaktype) == 3)
{
show_hudmessage(0, messages[level], name);
client_cmd(0, "spk %s", sounds[level]);
}
return PLUGIN_CONTINUE;
}
public reset_hud(id)
{
firstblood = 1
if (is_mode_set(16)) {
if (kills[id] > levels[0]) {
print_color(id,
"!g*!y Gratulálok haver oltelt egymás után!t %d!y jatekost.!g *", kills[id]);
} else if (deaths[id] > 1) {
print_color(id,
"!g*!y Ovatosabban meghaltál egymás utan!t %dx!g *", deaths[id]);
}
}
}
public rnstart(id)
{
if(get_pcvar_num(rnstartcvar) == 1)
{
++g_roundCount
firstblood = 1
set_hudmessage(random(255), random(255), random(255), -1.0, 0.30, 1, 6.0, 6.0)
show_hudmessage(0, "Keszulj fel a csatara^n%d. Fordulo!", g_roundCount)
new q
q = random_num(0,prpsounds-1)
client_cmd(0,"spk %s",preplist[q])
}
}
public client_connect(id) {
kills[id] = 0;
deaths[id] = 0;
}
public clear_kill(taskid)
{
new id = taskid-TASK_CLEAR_KILL;
kill[id][0] = 0;
}
public plugin_precache()
{
precache_sound("mappa/triplekill.wav")
precache_sound("mappa/multikill.wav")
precache_sound("mappa/combowhore.wav")
precache_sound("mappa/ultrakill.wav")
precache_sound("mappa/killingspree.wav")
precache_sound("mappa/megakill.wav")
precache_sound("mappa/holyshit.wav")
precache_sound("mappa/ludicrouskill.wav")
precache_sound("mappa/rampage.wav")
precache_sound("mappa/unstoppable.wav")
precache_sound("mappa/monsterkill.wav")
precache_sound("mappa/headshot1.wav")
precache_sound("mappa/headshot2.wav")
precache_sound("mappa/headshot3.wav")
precache_sound("mappa/headshot4.wav")
precache_sound("mappa/headshot5.wav")
precache_sound("mappa/headshot6.wav")
precache_sound("mappa/humiliation1.wav")
precache_sound("mappa/humiliation2.wav")
precache_sound("mappa/humiliation3.wav")
precache_sound("mappa/firstblood1.wav")
precache_sound("mappa/firstblood2.wav")
precache_sound("mappa/firstblood3.wav")
precache_sound("mappa/prepare1.wav")
precache_sound("mappa/prepare2.wav")
precache_sound("mappa/prepare3.wav")
precache_sound("mappa/prepare4.wav")
precache_sound("mappa/prepare5.wav")
precache_sound("mappa/grenade1.wav")
precache_sound("mappa/suicide1.wav")
precache_sound("mappa/suicide2.wav")
precache_sound("mappa/suicide3.wav")
precache_sound("mappa/doublekill1.wav")
precache_sound("mappa/doublekill2.wav")
precache_sound("mappa/eagleeye.wav")
precache_sound("mappa/godlike.wav")
precache_sound("mappa/dominating.wav")
precache_sound("mappa/ownage.wav")
}
stock print_color(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!y", "^1")
replace_all(msg, 190, "!t", "^3")
replace_all(msg, 190, "á", "á")
replace_all(msg, 190, "é", "Ă©")
replace_all(msg, 190, "í", "Ă")
replace_all(msg, 190, "ó", "Ăł")
replace_all(msg, 190, "ö", "ö")
replace_all(msg, 190, "ő", "Ĺ‘")
replace_all(msg, 190, "ú", "Ăş")
replace_all(msg, 190, "ü", "ĂĽ")
replace_all(msg, 190, "ű", "ű")
replace_all(msg, 190, "Á", "Ă")
replace_all(msg, 190, "É", "É")
replace_all(msg, 190, "Í", "ĂŤ")
replace_all(msg, 190, "Ó", "Ă“")
replace_all(msg, 190, "Ö", "Ă–")
replace_all(msg, 190, "Ő", "Ĺ")
replace_all(msg, 190, "Ú", "Ăš")
replace_all(msg, 190, "Ü", "Ăś")
replace_all(msg, 190, "Ű", "Ĺ°")
if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
write_byte(players[i])
write_string(msg)
message_end()
}
}
}
return PLUGIN_HANDLED
}
A hozzászólást 1 alkalommal szerkesztették, utoljára crazyboy 2014.10.11. 06:34-kor.
hibás témanév