- #include <amxmodx> 
- #include <amxmisc> 
-   
- #define PLUGIN_NAME "Ultimate KillStreak Advanced" 
- #define PLUGIN_VERSION "1.0" 
- #define PLUGIN_AUTHOR "Dizzy"  
-   
-   
- new lastman_mode; 
- new alone_ann = 0; 
- new kills[33] = {0,...}; 
- new deaths[33] = {0,...}; 
- new kill[33][24]; 
-   
- #define LEVELS 13 
- #define hsounds 14 
- #define knsounds 2 
- #define prpsounds 4 
- #define maxdbsounds 2 
- #define TASK_CLEAR_KILL    100 
-   
- new hsenable 
- new knifeenable 
- new cvardouble 
- new rnstartcvar 
- new killstreaktype 
-   
-   
- new levels[13] = {3,4,5,6,7,8,9,10,11,13,15,18,20}; 
-   
- new sounds[13][] =  
- { 
- "sound/Egt_Ultimate/1",  
- "sound/Egt_Ultimate/2",  
- "sound/Egt_Ultimate/3", 
- "sound/Egt_Ultimate/4",  
- "sound/Egt_Ultimate/5",  
- "sound/Egt_Ultimate/6", 
- "sound/Egt_Ultimate/7", 
- "sound/Egt_Ultimate/8", 
- "sound/Egt_Ultimate/9", 
- "sound/Egt_Ultimate/10", 
- "sound/Egt_Ultimate/11", 
- "sound/Egt_Ultimate/12", 
- "sound/Egt_Ultimate/13" 
- }; 
-   
- new messages[13][] =  
- { 
- "%s: 1.szint: 3 kill Tripla Kill !!!",  
- "%s: 2.szint: 4 kill Multi Kill !!!", 
- "%s: 3.szint: 5 kill Ultra Kill !!!",  
- "%s: 4 szint: 6 kill Mega Kill !!!", 
- "%s: 5.szint: 8 kill Tombol !!!", 
- "%s: 6.szint: 9 kill Gyilkologép !!! ", 
- "%s: 7.szint: 10 kill Hihetetlen !!!",  
- "%s: 8.szint: 11 kill Szörnyeteg !!!", 
- "%s: 9.szint: 12 kill Szent szar !!!",  
- "%s: 10.szint: 13 kill Isteni !!!",  
- "%s: +11 szint: 15 kill Isten vagy !!!", 
- "%s: +12 szint: 18 kill Legyozhetetlen !!!", 
- "%s: +13 szint: 20 kill Király Vagy !!!" 
- }; 
-   
- new hslist[hsounds][] =  
- { 
- "sound/Egt_Ultimate/hsg1", 
- "sound/Egt_Ultimate/hsg2", 
- "sound/Egt_Ultimate/hsg3", 
- "sound/Egt_Ultimate/hsg4", 
- "sound/Egt_Ultimate/hsg5", 
- "sound/Egt_Ultimate/hsg6", 
- "sound/Egt_Ultimate/hsg7", 
- "sound/Egt_Ultimate/hsg8", 
-   
-   } 
-   
-   
- new preplist[prpsounds][]= 
- { 
- "sound/Egt_Ultimate/start1", 
- "sound/Egt_Ultimate/start2", 
- "sound/Egt_Ultimate/prepare3", 
- "sound/Egt_Ultimate/prepare4" 
- new hsmessages[4][]= 
- { 
- "%s leszedte %s fejét !!", 
- "%s hihetetlen fejest adott %s-nak !", 
- "%s -tol kapott egy gyonyoru HEADSHOT-ot %s!", 
- "%s adott %s -nek egy  super headshotot !" 
- } 
-   
- new knlist[knsounds][]= 
- { 
- "sound/ultimatesound/knife1", 
- "sound/ultimatesound/knife2" 
- } 
-   
- new knmessages[3][]= 
- { 
- "%s ledofte %s", 
- "%s Fel vágta késel %s",	 
- "%s lekeselte %s" 
- } 
-   
-   
- new doublelist[maxdbsounds][]= 
- { 
- "sound/ultimatesound/doublekill1", 
- "sound/ultimatesound/doublekill2" 
- } 
-   
- new messagesnohp[5][]=  
- { 
-   
- "%i terrorist vs %i CT^n%s: Számitunk rád haver el ne baszd", 
- "%i terrorist vs %i CT^n%s: Remélem van nálad életmentő csomag", 
- "%i terrorist vs %i CT^n%s: Kinyirták a Csapat társaidat.Sok szerencsét!", 
- "%i terrorist vs %i CT^n%s: Te vagy az utolso reményünk!", 
- "%i terrorist vs %i CT^n%s: Most egyedul vagy.Jo szorakozast!" 
- } 
-   
- new messageshp[5][]=  
- { 
-   
- "%i terrorist vs %i CT^n%s (%i hp): Számitunk Rád  haver el ne baszd!", 
- "%i terrorist vs %i CT^n%s (%i hp): Remélem van Nálad életmentö csomag", 
- "%i terrorist vs %i CT^n%s (%i hp): Kinyirták a csapatodat.Egyedül Maradtál.Hajrá!", 
- "%i terrorist vs %i CT^n%s (%i hp): Te vagy az utolso reményünk!", 
- "%i terrorist vs %i CT^n%s (%i hp): Most egyedul vagy.Jo szorakozast!" 
-   
- } 
-   
- 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"); 
-     cvardouble = register_cvar("ut_doublekill_events","1"); 
-     rnstartcvar = register_cvar("ut_roundcout_sounds","1"); 
-     register_event("DeathMsg","death_msg","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"); 
-     lastman_mode = register_cvar("lastman_mode","abc") 
-   
-     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(255, 255, 255, -1.0, 0.25, 0, 2.0, 2.0) 
- 	show_hudmessage(0, (hsmessages[random_num(0,3)]), killname, vicname) 
- 	new i 
- 	i = random_num(0,hsounds-1) 
- 	client_cmd(0,"mp3 play %s",hslist[i]) 
-     }  
-   
-   
-     if(weapon[0] == 'k'  && get_pcvar_num(knifeenable) ==1) 
-     {  
-     	set_hudmessage(255, 255, 255, -1.0, 0.25, 0, 2.0, 2.0) 
-     	show_hudmessage(0, (knmessages[random_num(0,2)]), killname, vicname) 
-         new r 
- 	r = random_num(0,knsounds-1) 
- 	client_cmd(0,"mp3 play %s",knlist[r])    
-     }  
-   
-   
-   
-   
-   
-   
-     if(kill[killer][0] && equal(kill[killer],weapon) && get_pcvar_num(cvardouble) == 1) 
-     { 
-         set_hudmessage(0, 200, 0, -1.0, 0.25, 0, 2.0, 2.0) 
- 	show_hudmessage(0,"OMG %s Szep Dupla oles", killname) 
-         kill[killer][0] = 0; 
-         new q 
-         q= random_num(0,maxdbsounds-1) 
-         client_cmd(0,"mp3 play %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( 0, 255, 0, 0.05, 0.65, 0, 3.0, 3.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, "mp3 play %s", sounds[level]); 
-     } 
-   
-     if(get_pcvar_num(killstreaktype) == 3) 
-     { 
- 	show_hudmessage(0, messages[level], name); 
- 	client_cmd(0, "mp3 play %s", sounds[level]); 
-     } 
-   
-     return PLUGIN_CONTINUE; 
-   
- } 
-   
-   
- public reset_hud(id)  
- { 
-     if (is_mode_set(16)) { 
-       if (kills[id] > levels[0]) { 
-         client_print(id, print_chat,  
-                      "* Egymas utan %d oles ", kills[id]); 
-       } else if (deaths[id] > 1) { 
-         client_print(id, print_chat,  
-                      "* Kapd ösze magad Már enyiszer meghaltál:%d ", deaths[id]); 
-   
-         } 
-     } 
- } 
-   
- public rnstart(id) 
- { 
-     if(get_pcvar_num(rnstartcvar) == 1) 
-     {   
-     set_hudmessage(0, 0, 255, -1.0, 0.30, 0, 6.0, 6.0) 
-     show_hudmessage(0, "Válasz Fegyvert És ölj") 
-     new q 
-     q = random_num(0,prpsounds-1) 
-     client_cmd(0,"mp3 play %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 roundend_msg(id) 
-   
- 	alone_ann = 0 
-   
- public death_msg(id) 
- { 
-   
- 	new lmmode[8]  
- 	get_pcvar_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(0, 255, 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) 
- 			{ 
- 				for(new i=1;i<=get_maxplayers();i++)  
- 					if( is_user_connected(i) == 1 ) 
- 						client_cmd(i,"mp3 play sound/ultimatesound/maytheforce") 
- 			} 
- 		} 
- 	}  
- 	else 
- {    
- 	if (ict==1&&ite>1&&alone_ann==0&&(lmmode_bit & 4)) 
- 	{ 
- 		last=players_ct[0] 
- 		client_cmd(last,"mp3 play sound/ultimatesound/oneandonly") 
-   
- 	} 
-   
- 	else if (ite==1&&ict>1&&alone_ann==0&&(lmmode_bit & 4)) 
- 	{ 
- 		last=players_t[0] 
- 		client_cmd(last,"mp3 play sound/ultimatesound/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,5) ],ite ,ict ,name,get_user_health(last)) 
- 		} 
-   
- 		else 
- 		{ 
- 			show_hudmessage(0, messagesnohp[ random_num(0,5) ],ite ,ict ,name ) 
- 		} 
- 	} 
-   
- } 
- 	return PLUGIN_CONTINUE    
- }  
- public plugin_precache() 
- { 
- precache_sound("ultimatesound/1.mp3") 
- precache_sound("ultimatesound/2.mp3") 
- precache_sound("ultimatesound/3.mp3") 
- precache_sound("ultimatesound/4.mp3") 
- precache_sound("ultimatesound/5.mp3") 
- precache_sound("ultimatesound/6.mp3") 
- precache_sound("ultimatesound/7.mp3") 
- precache_sound("ultimatesound/8.mp3") 
- precache_sound("ultimatesound/9.mp3") 
- precache_sound("ultimatesound/11.mp3") 
- precache_sound("ultimatesound/12.mp3") 
- precache_sound("ultimatesound/hsg1.wav") 
- precache_sound("ultimatesound/hsg2.wav") 
- precache_sound("ultimatesound/hsg3.wav") 
- precache_sound("ultimatesound/hsg4.wav") 
- precache_sound("ultimatesound/hsg5.wav") 
- precache_sound("ultimatesound/hsg6.wav") 
- precache_sound("ultimatesound/hsg7.wav") 
- precache_sound("ultimatesound/hsg8.wav") 
- precache_sound("ultimatesound/knife1.mp3") 
- precache_sound("ultimatesound/knife2.mp3") 
- precache_sound("ultimatesound/start.wav") 
- precache_sound("ultimatesound/start2.wav") 
- precache_sound("ultimatesound/prepare3.mp3") 
- precache_sound("ultimatesound/prepare4.mp3") 
- precache_sound("ultimatesound/doublekill1.mp3") 
- precache_sound("ultimatesound/doublekill2.mp3") 
- } 
-   
-