#include <amxmodx>
#include <amxmisc>
#define KNIFFMESSAGES 1
#define LEVELS 8
#define MESSAGESNOHP 4
#define MESSAGESHP 4
new kills[33] = {0,...};
new deaths[33] = {0,...};
new alone_ann = 0
new levels[8] = {2, 4, 6, 8, 10, 12, 14, 16};
new stksounds[19][] = {
"Ultimate_Reload/doublekill1",
"Ultimate_Reload/doublekill2",
"Ultimate_Reload/firstblood1",
"Ultimate_Reload/firstblood2",
"Ultimate_Reload/holyshit",
"Ultimate_Reload/killingspree",
"Ultimate_Reload/ludicrouskill",
"Ultimate_Reload/megakill",
"Ultimate_Reload/monsterkill",
"Ultimate_Reload/multikill",
"Ultimate_Reload/nade",
"Ultimate_Reload/rampage",
"Ultimate_Reload/suicide1",
"Ultimate_Reload/suicide2",
"Ultimate_Reload/suicide3",
"Ultimate_Reload/suicide4",
"Ultimate_Reload/triplekill",
"Ultimate_Reload/ultrakill",
"Ultimate_Reload/unstoppable"
};
new stkmessages[19][] = {
"%s: Double-Kill!",
"%s: Double-Kill!",
"%s: First-Blood!",
"%s: First-Blood!",
"%s: Holy-Shit!",
"%s: Killing-Spree!",
"%s: Ludiocrous-Kill!",
"%s: Mega-Kill!",
"%s: M o n s t e R K i L L ! ! !",
"%s: Multi-Kill!",
"%s: Nade",
"%s: Rampage",
"%s: Suicide",
"%s: Suicide",
"%s: Suicide",
"%s: Suicide",
"%s: Triple-Kill!",
"%s: Ultra-Kill!",
"%s: Unstoppable!"
};
new kniffmessages[KNIFFMESSAGES][] = {
"%s leszĂşrta %s -t"}
new messagesnohp[MESSAGESNOHP][] = {
"%i terrorista vs %i CT^n%s: Mostmár minden rajtad múlik",
"%i terrorista vs %i CT^n%s: Remélem van nálad életmentő csomag",
"%i terrorista vs %i CT^n%s: Minden csapat társadat kinyirták, sok szerencsét",
"%i terrorista vs %i CT^n%s: Te vagy az ĂştolsĂł"}
new messageshp[MESSAGESHP][] = {
"%i terrorista vs %i CT^n%s: Mostmár minden rajtad múlik",
"%i terrorista vs %i CT^n%s: Remélem van nálad életmentő csomag",
"%i terrorista vs %i CT^n%s: Minden csapat társadat kinyirták, sok szerencsét",
"%i terrorista vs %i CT^n%s: Te vagy az ĂştolsĂł"}
get_streak()
{
new streak[3]
get_cvar_string("streak_mode",streak,2)
return read_flags(streak)
}
public death_event(id)
{
new streak = get_streak()
if ((streak&1) || (streak&2))
{
new killer = read_data(1);
new victim = read_data(2);
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 r = random(256)
new g = random(256)
new b = random(256)
new streak = get_streak()
if (streak&1)
{
new name[33];
get_user_name(killer, name, 32);
set_hudmessage(r,g,b, 0.05, 0.65, 2, 0.02, 6.0, 0.01, 0.1, 2);
show_hudmessage(0, stkmessages[level], name);
}
if (streak&2){
client_cmd(0, "spk %s", stksounds[level]);
}
}
public reset_hud(id)
{
new streak = get_streak()
if (streak&1)
{
if (kills[id] > levels[0])
{
client_print(id, print_chat,
"* Te %d öltĂ©l. ĂŤgy tovább,ha Ăgy haladsz profi leszel!", kills[id]);
}
else if (deaths[id] > 1)
{
client_print(id, print_chat,
"* Te meghaltál %dx. Figyelj oda különben csúnya vége lehet", deaths[id]);
}
}
}
public client_connect(id)
{
new streak = get_streak()
if ((streak&1) || (streak&2))
{
kills[id] = 0;
deaths[id] = 0;
}
}
public knife_kill()
{
new kniffmode[4]
get_cvar_string("kniff_mode",kniffmode,4)
new kniffmode_bit = read_flags(kniffmode)
if (kniffmode_bit & 1)
{
new killer_id = read_data(1)
new victim_id = read_data(2)
new killer_name[33], victim_name[33]
get_user_name(killer_id,killer_name,33)
get_user_name(victim_id,victim_name,33)
set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
show_hudmessage(0,kniffmessages[ random_num(0,KNIFFMESSAGES-1) ],killer_name,victim_name)
}
if (kniffmode_bit & 2)
{
client_cmd(0,"spk Ultimate_Reload/knife1")
client_cmd(0,"spk Ultimate_Reload/knife2")
}
}
public roundend_msg(id)
alone_ann = 0
public death_msg(id)
{
new lmmode[8]
get_cvar_string("lastman_mode",lmmode,8)
new lmmode_bit = read_flags(lmmode)
new players_ct[32], players_t[32], ict, ite, last
get_players(players_ct,ict,"ae","CT")
get_players(players_t,ite,"ae","TERRORIST")
if (ict==1&&ite==1)
{
new name1[32], name2[32]
get_user_name(players_ct[0],name1,32)
get_user_name(players_t[0],name2,32)
set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
if (lmmode_bit & 1)
{
if (lmmode_bit & 2)
{
show_hudmessage(0,"%s (%i hp) vs. %s (%i hp)",name1,get_user_health(players_ct[0]),name2,get_user_health(players_t[0]))
}
else
{
show_hudmessage(0,"%s vs. %s",name1,name2)
}
if (lmmode_bit & 4)
{
client_cmd(0,"spk misccc/maytheforce")
}
}
}
else
{
if (ict==1&&ite>1&&alone_ann==0&&(lmmode_bit & 4))
{
last=players_ct[0]
client_cmd(last,"spk misccc/oneandonly")
}
else if (ite==1&&ict>1&&alone_ann==0&&(lmmode_bit & 4))
{
last=players_t[0]
client_cmd(last,"spk misccc/oneandonly")
}
else
{
return PLUGIN_CONTINUE
}
alone_ann = last
new name[32]
get_user_name(last,name,32)
if (lmmode_bit & 1)
{
set_hudmessage(0, 255, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
if (lmmode_bit & 2)
{
show_hudmessage(0,messageshp[ random_num(0,MESSAGESHP-1) ],ite ,ict ,name,get_user_health(last))
}
else
{
show_hudmessage(0,messagesnohp[ random_num(0,MESSAGESNOHP-1) ],ite ,ict ,name )
}
}
if (lmmode_bit & 4)
{
client_cmd(last,"spk misccc/maytheforce")
}
}
return PLUGIN_CONTINUE
}
public hs()
{
new hsmode[4]
get_cvar_string("hs_mode",hsmode,4)
new hsmode_bit = read_flags(hsmode)
if (hsmode_bit & 1)
{
new killer_id = read_data(1)
new victim_id = read_data(2)
new victim_name[33]
get_user_name(victim_id,victim_name,33)
set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 3.0, 3.0, 0.15, 0.15, 1)
show_hudmessage(killer_id,"::FEJLÖVÉS::^nYou Owned %s!",victim_name)
}
if (hsmode_bit & 2)
{
client_cmd(0,"spk Ultimate_Reload/headshot1")
client_cmd(0,"spk Ultimate_Reload/headshot2")
client_cmd(0,"spk Ultimate_Reload/headshot3")
client_cmd(0,"spk Ultimate_Reload/headshot4")
client_cmd(0,"spk Ultimate_Reload/headshot5")
client_cmd(0,"spk Ultimate_Reload/headshot6")
client_cmd(0,"spk Ultimate_Reload/headshot7")
client_cmd(0,"spk Ultimate_Reload/headshot8")
}
}
public plugin_precache()
{
precache_sound("Ultimate_Reload/doublekill1.wav")
precache_sound("Ultimate_Reload/doublekill2.wav")
precache_sound("Ultimate_Reload/firstblood1.wav")
precache_sound("Ultimate_Reload/firstblood2.wav")
precache_sound("Ultimate_Reload/headshot1.wav")
precache_sound("Ultimate_Reload/headshot2.wav")
precache_sound("Ultimate_Reload/headshot3.wav")
precache_sound("Ultimate_Reload/headshot4.wav")
precache_sound("Ultimate_Reload/headshot5.wav")
precache_sound("Ultimate_Reload/headshot6.wav")
precache_sound("Ultimate_Reload/headshot7.wav")
precache_sound("Ultimate_Reload/headshot8.wav")
precache_sound("Ultimate_Reload/holyshit.wav")
precache_sound("Ultimate_Reload/killingspree.wav")
precache_sound("Ultimate_Reload/knife1.wav")
precache_sound("Ultimate_Reload/knife2.wav")
precache_sound("Ultimate_Reload/ludicrouskill.wav")
precache_sound("Ultimate_Reload/megakill.wav")
precache_sound("Ultimate_Reload/monsterkill.wav")
precache_sound("Ultimate_Reload/multikill.wav")
precache_sound("Ultimate_Reload/nade.wav")
precache_sound("Ultimate_Reload/planted1.wav")
precache_sound("Ultimate_Reload/planted2.wav")
precache_sound("Ultimate_Reload/planted3.wav")
precache_sound("Ultimate_Reload/prepare1.wav")
precache_sound("Ultimate_Reload/prepare2.wav")
precache_sound("Ultimate_Reload/prepare3.wav")
precache_sound("Ultimate_Reload/prepare4.wav")
precache_sound("Ultimate_Reload/prepare5.wav")
precache_sound("Ultimate_Reload/prepare6.wav")
precache_sound("Ultimate_Reload/prepare7.wav")
precache_sound("Ultimate_Reload/prepare8.wav")
precache_sound("Ultimate_Reload/prepare9.wav")
precache_sound("Ultimate_Reload/rampage.wav")
precache_sound("Ultimate_Reload/suicide1.wav")
precache_sound("Ultimate_Reload/suicide2.wav")
precache_sound("Ultimate_Reload/suicide3.wav")
precache_sound("Ultimate_Reload/suicide4.wav")
precache_sound("Ultimate_Reload/triplekill.wav")
precache_sound("Ultimate_Reload/ultrakill.wav")
precache_sound("Ultimate_Reload/unstoppable.wav")
return PLUGIN_CONTINUE
}
public plugin_init()
{
register_plugin("Ultimate_Hang","2.0","bron")
register_event("DeathMsg","hs","a","3=1")
register_event("DeathMsg","knife_kill","a","4&kni")
register_event("ResetHUD", "reset_hud", "b");
register_event("DeathMsg", "death_event", "a")
register_event("SendAudio","roundend_msg","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw")
register_event("TextMsg","roundend_msg","a","2&#Game_C","2&#Game_w")
register_event("RoundTime", "roundcount", "bc")
register_event("TextMsg","reset_counter","a","2&#Game_C","2&#Game_w")
register_event("DeathMsg","death_msg","a")
register_event("DeathMsg", "DeathMsg", "a")
register_cvar("lastman_mode","abc")
register_cvar("streak_mode","ab")
register_cvar("kniff_mode","ab")
register_cvar("hs_mode","a")
return PLUGIN_CONTINUE
}
forward bomb_planted(planter);
new bomb_sounds[][] =
{
"Ultimate_Reload/planted1",
"Ultimate_Reload/planted2",
"Ultimate_Reload/planted3"
}
public bomb_planted(id) {
new plantername[32]
get_user_name(id,plantername,31)
set_hudmessage(255, 0, 0, -1.0, 0.2, 1, 6.0, 6.0)
show_hudmessage(0, "%s élesitette a bombát!", plantername)
client_cmd(0,"spk %s",bomb_sounds[random(sizeof bomb_sounds)]);
return PLUGIN_CONTINUE
}
new g_roundCount
new prepare_sounds[][] =
{
"Ultimate_Reload/prepare1",
"Ultimate_Reload/prepare2",
"Ultimate_Reload/prepare3",
"Ultimate_Reload/prepare4",
"Ultimate_Reload/prepare5",
"Ultimate_Reload/prepare6",
"Ultimate_Reload/prepare7",
"Ultimate_Reload/prepare8",
"Ultimate_Reload/prepare9"
};
public roundcount()
if ( read_data(1) == floatround(get_cvar_float("mp_roundtime") * 60.0) ) {
++g_roundCount
new r = random(256)
new g = random(256)
new b = random(256)
new randomhud = random_num(1, 3)
switch(randomhud)
{
case 1:
{
set_hudmessage(r,g,b, -1.0, 0.30, 0, 6.0, 6.0, 1.0, 0.15, 1)
show_hudmessage(0,"^nKÉSZÜLJ FEL A HARCRA!^n[%d].KÖR", g_roundCount)
}
case 2:
{
set_hudmessage(r,g,b, -1.0, 0.30, 0, 6.0, 6.0, 1.0, 0.15, 1)
show_hudmessage(0,"^nKÉSZÍTSD ELŠA FEGYVEREIDET! [%d]. KÖR KÖVETKEZIK.", g_roundCount)
}
case 3:
{
set_hudmessage(r,g,b, -1.0, 0.30, 0, 6.0, 6.0, 1.0, 0.15, 1)
show_hudmessage(0,"^nSok sikert! [%d]. KĂ–R KĂ–VETKEZIK.", g_roundCount)
}
}
client_cmd(0,"spk %s",prepare_sounds[random(sizeof prepare_sounds)]);
}
public reset_counter(){
g_roundCount = 0
return PLUGIN_CONTINUE
}
public DeathMsg()
{
new hs = read_data(3)
if (hs > 0){
new los = random_num(1, 8)
switch(los){
case 1 : client_cmd(0, "spk Ultimate_Reload/headshot1.wav")
case 2 : client_cmd(0, "spk Ultimate_Reload/headshot2.wav")
case 3 : client_cmd(0, "spk Ultimate_Reload/headshot3.wav")
case 4 : client_cmd(0, "spk Ultimate_Reload/headshot4.wav")
case 5 : client_cmd(0, "spk Ultimate_Reload/headshot5.wav")
case 6 : client_cmd(0, "spk Ultimate_Reload/headshot6.wav")
case 7 : client_cmd(0, "spk Ultimate_Reload/headshot7.wav")
case 8 : client_cmd(0, "spk Ultimate_Reload/headshot8.wav")
}
}else{
return PLUGIN_HANDLED;
}
return PLUGIN_HANDLED;
}
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
}