Sexy Sounds Advanced
PHP Code:
#include <amxmodx> #include <amxmisc>
#define PLUGIN_NAME "Sexy Sounds Advanced" #define PLUGIN_VERSION "1.0" #define PLUGIN_AUTHOR "Samurai"
#define LEVELS 12 #define TASK_CLEAR_KILL 100
new kills[33] = {0,...}; new deaths[33] = {0,...}; new hsenable new knifeenable new firstbloodenable new cvardouble new kill[33][24]; new firstblood new killstreaktype
new levels[12] = {3, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24 ,26}; new sounds[12][] = { "sexy_sounds/sexy_multikill.wav", "sexy_sounds/sexy_ultrakill.wav", "sexy_sounds/sexy_killing_spree.wav", "sexy_sounds/sexy_megakill.wav", "sexy_sounds/sexy_holyshit.wav", "sexy_sounds/sexy_monsterkill.wav", "sexy_sounds/sexy_dominating.wav", "sexy_sounds/sexy_ludicrouskill.wav", "sexy_sounds/sexy_rampage.wav", "sexy_sounds/sexy_unstoppable.wav", "sexy_sounds/sexy_godLike.wav", "sexy_sounds/sexy_whickedsick.wav" };
new messages[12][] = { "%s: MultiKill !!!", "%s: Ultra Kill !!!", "%s: Killing Spree !", "%s: Mega Kill !", "%s: Holy Shit !", "%s: Monster Kill !!!", "%s: DomaNating !!!", "%s: LuDiCrouS Kill !!!", "%s: RamPage !!!", "%s: UnStoPPaBle !!!", "%s: GoDLike !!!", "%s: WhiCkEdSick !!!" };
new hsmesaje[4][]= { "%s a demontat capul lui %s !!!", "%s are un aim tare pe capul lui %s !", "%s Headshot incredibil pe %s!", "%s a cazut %s cu un headshot superb!!!" }
new fbmesaje[3][]= { "%s : First Blood !!!!!", "%s A tras Primul Glont !!!", "%s First Blood Pe tinta!" }
new mesaje_cutit[3][]= { "%s la ceopartit pe %s", "%s ia taiat gatul lui %s", "%s la umilt pe %s" }
new hs[] = { "sexy_sounds/sexy_headshot.wav" }
new firstb[]= { "sexy_sounds/sexy_first_blood.wav" }
new double[]= { "sexy_sounds/sexy_double_kill.wav" }
new knife[]= { "sexy_sounds/sexy_humiliating.wav" }
public plugin_init() { register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR); killstreaktype = register_cvar("sexy_sounds_advanced", "3"); register_cvar("sexy_sounds", "ba"); register_event("ResetHUD", "reset_hud", "b"); register_event("DeathMsg", "event_death", "a"); firstbloodenable = register_cvar("sexy_firstblood","1"); knifeenable = register_cvar("sexy_knife","1"); hsenable = register_cvar("sexy_hs","1");
return PLUGIN_CONTINUE; }
is_mode_set(bits) { new mode[9]; get_cvar_string("sexy_sounds_advanced", mode, 8); return read_flags(mode) & bits; }
announce(killer, level) { new name[33] new r = random(256) new g = random(256) new b = random(256)
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);
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 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(0, 0, 255, -1.0, 0.30, 0, 6.0, 6.0) show_hudmessage(0, (hsmesaje[random_num(0,3)]), killname, vicname) client_cmd(0,"spk %s",hs) } if(weapon[0] == 'k' && get_pcvar_num(knifeenable) ==1){ set_hudmessage(255, 0, 255, -1.0, 0.30, 0, 6.0, 6.0) show_hudmessage(0, (mesaje_cutit[random_num(0,2)]), killname, vicname) client_cmd(0,"spk %s",knife) } if(firstblood && killer!=victim && killer>0 && get_pcvar_num(firstbloodenable) ==1) { set_hudmessage(255, 0, 255, -1.0, 0.30, 0, 6.0, 6.0) show_hudmessage(0, (fbmesaje[random_num(0,2)]), killname) client_cmd(0,"spk %s",firstb) firstblood = 0 }
if(kill[killer][0] && equal(kill[killer],weapon) && get_pcvar_num(cvardouble) == 1){ set_hudmessage(255, 0, 255, -1.0, 0.30, 0, 6.0, 6.0) show_hudmessage(0,"OoOoO %s a facut Dublu Kill", killname) kill[killer][0] = 0; client_cmd(0,"spk %s",double) } 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; }
public reset_hud(id) { if (is_mode_set(16)) { if (kills[id] > levels[0]) { client_print(id, print_chat, "* Ai omorat %d de n00bi", kills[id]); } else if (deaths[id] > 1) { client_print(id, print_chat, "* Ai grija, ai murit de %d la rand...", deaths[id]); } } }
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("sexy_sounds/sexy_multikill.wav") precache_sound("sexy_sounds/sexy_ultrakill.wav") precache_sound("sexy_sounds/sexy_killing_spree.wav") precache_sound("sexy_sounds/sexy_megakill.wav") precache_sound("sexy_sounds/sexy_holyshit.wav") precache_sound("sexy_sounds/sexy_monsterkill.wav") precache_sound("sexy_sounds/sexy_dominating.wav") precache_sound("sexy_sounds/sexy_ludicrouskill.wav") precache_sound("sexy_sounds/sexy_rampage.wav") precache_sound("sexy_sounds/sexy_unstoppable.wav") precache_sound("sexy_sounds/sexy_godLike.wav") precache_sound("sexy_sounds/sexy_whickedsick.wav") precache_sound("sexy_sounds/sexy_humiliating.wav") precache_sound("sexy_sounds/sexy_first_blood.wav") precache_sound("sexy_sounds/sexy_headshot.wav") }
Everything works but the firstblood does not work. :-?
|