Заявка за Ultimate Sounds Dhud

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
BluRayTrans Bhop
Извън линия
Потребител
Потребител
Мнения: 10
Регистриран на: 07 Мар 2018, 00:03

Заявка за Ultimate Sounds Dhud

Мнение от BluRayTrans Bhop » 07 Мар 2018, 12:27

Здравейте искам да се изработи или редактира плъгина за звуци във сървъра базовия ultimate_sounds да е със Dhud съобщения позицията да си остане същата долу ляво над чата благодаря предварително

Аватар
Fr0sTt
Извън линия
Потребител
Потребител
Мнения: 137
Регистриран на: 16 Фев 2018, 19:11

Заявка за Ultimate Sounds Dhud

Мнение от Fr0sTt » 07 Мар 2018, 14:12

Заповядай:

Код за потвърждение: Избери целия код

///////////////////////////////////////////////////
//  AMXMOD[X]                                    //
//   ::Ultimate sounds::                         //
//    by Hephaistos ([email protected])       //
//    edited by Dizzy ([email protected])   //
//                                               //
// cvar:                                         //
//  streak_mode < flags >                        //
//  "a" - messages                               //
//  "b" - sounds                                 //
//                                               //
//  kniff_mode < flags >                         //
//  "a" - messages                               //
//  "b" - sounds                                 //
//                                               //
//  hs_mode < flags >                            //
//  "a" - messages                               //
//  "b" - sounds                                 //
//                                               //
//  lastman_mode < flags >                       //
//  "a" - messages                               //
//  "b" - hp                                     //
//  "c" - sounds                                 //
///////////////////////////////////////////////////

#include <amxmodx>
#if AMXX_VERSION_NUM < 183
    #include <dhudmessage>
#endif 

#define KNIFFMESSAGES 4
#define LEVELS 7
#define MESSAGESNOHP 4
#define MESSAGESHP 4

new kills[33] = {0,...};
new deaths[33] = {0,...};
new alone_ann = 0
new levels[7] = {3, 5, 7, 9, 10, 13, 15};

new stksounds[7][] = {
"misc/multikill",
"misc/ultrakill",
"misc/monsterkill",
"misc/killingspree",
"misc/rampage",
"misc/holyshit",
"misc/godlike"};

new stkmessages[7][] = {
"%s: Multi-Kill!",
"%s: Ultra-Kill!",
"%s: Monster-Kill!",
"%s: Killing Spree!",
"%s: Rampage!",
"%s: Holy Shit!",
"%s: Godlike!"};


new kniffmessages[KNIFFMESSAGES][] = {
"%s Sliced And Diced %s!",
"%s Shanked %s!",
"%s Pulled A Knife On %s!",
"%s Knived %s!"}

new messagesnohp[MESSAGESNOHP][] = {
"%i terrorist vs %i CT^n%s: Now All Depends On You!",
"%i terrorist vs %i CT^n%s: I Hope You Still Have A Healthpack.",
"%i terrorist vs %i CT^n%s: All Your Teammates Were Killed. Good Luck!",
"%i terrorist vs %i CT^n%s: Now You Are Alone. Have Fun!"}

new messageshp[MESSAGESHP][] = {
"%i terrorist vs %i CT^n%s (%i hp): Now All Depend On You!",
"%i terrorist vs %i CT^n%s (%i hp): I Hope You Still Have A Healthpack.",
"%i terrorist vs %i CT^n%s (%i hp): All Your Teammates Were Killed. Good Luck!",
"%i terrorist vs %i CT^n%s (%i hp): Now You Are alone. Have Fun!"}

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 streak = get_streak()

	if (streak&1)
	{
    		new name[32];

   		get_user_name(killer, name, 32);
		set_dhudmessage(0, 100, 200, 0.05, 0.65, 2, 0.02, 6.0, 0.01, 0.1);
		show_dhudmessage(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, 
			"* You are on a killstreak with %d kills.", kills[id]);

		}

		else if (deaths[id] > 1)
		{
			client_print(id, print_chat, 
			"* Take care, you are on a deathstreak with %d deaths in a row.", 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 misc/humiliation")
   	}
}


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 misc/maytheforce")
			}
		}
	} 
	else
{   
	if (ict==1&&ite>1&&alone_ann==0&&(lmmode_bit & 4))
	{
		last=players_ct[0]
		client_cmd(last,"spk misc/oneandonly")
	}

	else if (ite==1&&ict>1&&alone_ann==0&&(lmmode_bit & 4))
	{
		last=players_t[0]
		client_cmd(last,"spk misc/oneandonly")
	}

	else
	{
		return PLUGIN_CONTINUE
	}
	alone_ann = last
	new name[32]   
	get_user_name(last,name,32)

	if (lmmode_bit & 1)
	{
		set_hudmessage(200, 100, 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 misc/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,"::HEADSHOT::^nYou Owned %s !!",victim_name)
	}

	if (hsmode_bit & 2)
	{
		client_cmd(0,"spk misc/headshot")
	}
}

public plugin_precache()
{
	precache_sound("misc/monsterkill.wav")
	precache_sound("misc/godlike.wav")
	precache_sound("misc/headshot.wav")
	precache_sound("misc/humiliation.wav")
	precache_sound("misc/killingspree.wav")
	precache_sound("misc/multikill.wav")
	precache_sound("misc/ultrakill.wav")
	precache_sound("misc/maytheforce.wav")
	precache_sound("misc/oneandonly.wav")
	precache_sound("misc/prepare.wav")
	precache_sound("misc/rampage.wav")
	precache_sound("misc/holyshit.wav")

	return PLUGIN_CONTINUE 
}



public plugin_init()
{
	register_plugin("Ultimate Sound","1.5","Dizzy")
	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("DeathMsg","death_msg","a")
	register_cvar("lastman_mode","abc")
	register_cvar("streak_mode","ab")
	register_cvar("kniff_mode","ab")
	register_cvar("hs_mode","ab")

	return PLUGIN_CONTINUE
}

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 6909
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 116 пъти
Получена благодарност: 1043 пъти
Обратна връзка:

Заявка за Ultimate Sounds Dhud

Мнение от OciXCrom » 07 Мар 2018, 14:15

Ако искаш да се преработи, качваш плъгина и пишеш в раздела за преработка, а не изработка... Можеш и сам да го направиш - viewtopic.php?f=26&t=1672

Аватар
BluRayTrans Bhop
Извън линия
Потребител
Потребител
Мнения: 10
Регистриран на: 07 Мар 2018, 00:03

Заявка за Ultimate Sounds Dhud

Мнение от BluRayTrans Bhop » 16 Мар 2018, 21:29

Та значи проблема е следния натрупва съобщенията 1 върху друго ако може да се измисли, съобщенията да се движат по екрана т.е всяко съобщение да е с различни координати, примерно ако искара Multi Kill и след него някой е направил Ultra Kill да не го лепва върху него а да го искара над него и така да се движат съобщенията надявам се ,че съм успял да се обоснова също така ако не ви затруднява да се добави First-blood и Hatrick Функция в плъгина.

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 6909
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 116 пъти
Получена благодарност: 1043 пъти
Обратна връзка:

Заявка за Ultimate Sounds Dhud

Мнение от OciXCrom » 16 Мар 2018, 22:59

Опитай така за координатите:

Код за потвърждение: Избери целия код

///////////////////////////////////////////////////
//  AMXMOD[X]                                    //
//   ::Ultimate sounds::                         //
//    by Hephaistos ([email protected])       //
//    edited by Dizzy ([email protected])   //
//                                               //
// cvar:                                         //
//  streak_mode < flags >                        //
//  "a" - messages                               //
//  "b" - sounds                                 //
//                                               //
//  kniff_mode < flags >                         //
//  "a" - messages                               //
//  "b" - sounds                                 //
//                                               //
//  hs_mode < flags >                            //
//  "a" - messages                               //
//  "b" - sounds                                 //
//                                               //
//  lastman_mode < flags >                       //
//  "a" - messages                               //
//  "b" - hp                                     //
//  "c" - sounds                                 //
///////////////////////////////////////////////////

#include <amxmodx>
#if AMXX_VERSION_NUM < 183
	#include <dhudmessage>
#endif 

#define KNIFFMESSAGES 4
#define LEVELS 7
#define MESSAGESNOHP 4
#define MESSAGESHP 4

new kills[33] = {0,...};
new deaths[33] = {0,...};
new alone_ann = 0
new levels[7] = {3, 5, 7, 9, 10, 13, 15};
new g_iHudPos[33]
new Float:g_fLastTime[33]

new stksounds[7][] = {
"misc/multikill",
"misc/ultrakill",
"misc/monsterkill",
"misc/killingspree",
"misc/rampage",
"misc/holyshit",
"misc/godlike"};

new stkmessages[7][] = {
"%s: Multi-Kill!",
"%s: Ultra-Kill!",
"%s: Monster-Kill!",
"%s: Killing Spree!",
"%s: Rampage!",
"%s: Holy Shit!",
"%s: Godlike!"};


new kniffmessages[KNIFFMESSAGES][] = {
"%s Sliced And Diced %s!",
"%s Shanked %s!",
"%s Pulled A Knife On %s!",
"%s Knived %s!"}

new messagesnohp[MESSAGESNOHP][] = {
"%i terrorist vs %i CT^n%s: Now All Depends On You!",
"%i terrorist vs %i CT^n%s: I Hope You Still Have A Healthpack.",
"%i terrorist vs %i CT^n%s: All Your Teammates Were Killed. Good Luck!",
"%i terrorist vs %i CT^n%s: Now You Are Alone. Have Fun!"}

new messageshp[MESSAGESHP][] = {
"%i terrorist vs %i CT^n%s (%i hp): Now All Depend On You!",
"%i terrorist vs %i CT^n%s (%i hp): I Hope You Still Have A Healthpack.",
"%i terrorist vs %i CT^n%s (%i hp): All Your Teammates Were Killed. Good Luck!",
"%i terrorist vs %i CT^n%s (%i hp): Now You Are alone. Have Fun!"}

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 streak = get_streak()

	if (streak&1)
	{
		new Float:fTime = get_gametime()
		
		if(fTime - g_fLastTime[killer] >= 8.0)
			g_iHudPos[killer] = 0
		
		new name[32];
		get_user_name(killer, name, 32);
		set_dhudmessage(0, 100, 200, 0.05, 0.65 - 0.05 * g_iHudPos[killer], 2, 0.02, 6.0, 0.01, 0.1);
		show_dhudmessage(0, stkmessages[level], name);
		g_iHudPos[killer]++
		g_fLastTime[killer] = fTime
	}

	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, 
			"* You are on a killstreak with %d kills.", kills[id]);

		}

		else if (deaths[id] > 1)
		{
			client_print(id, print_chat, 
			"* Take care, you are on a deathstreak with %d deaths in a row.", deaths[id]);
		}
	}
}

public client_connect(id)
{
	new streak = get_streak()

	if ((streak&1) || (streak&2))
	{
		kills[id] = 0;
		deaths[id] = 0;
	}
	
	g_iHudPos[id] = 0
	g_fLastTime[id] = 0.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 misc/humiliation")
	}
}


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 misc/maytheforce")
			}
		}
	} 
	else
{   
	if (ict==1&&ite>1&&alone_ann==0&&(lmmode_bit & 4))
	{
		last=players_ct[0]
		client_cmd(last,"spk misc/oneandonly")
	}

	else if (ite==1&&ict>1&&alone_ann==0&&(lmmode_bit & 4))
	{
		last=players_t[0]
		client_cmd(last,"spk misc/oneandonly")
	}

	else
	{
		return PLUGIN_CONTINUE
	}
	alone_ann = last
	new name[32]   
	get_user_name(last,name,32)

	if (lmmode_bit & 1)
	{
		set_hudmessage(200, 100, 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 misc/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,"::HEADSHOT::^nYou Owned %s !!",victim_name)
	}

	if (hsmode_bit & 2)
	{
		client_cmd(0,"spk misc/headshot")
	}
}

public plugin_precache()
{
	precache_sound("misc/monsterkill.wav")
	precache_sound("misc/godlike.wav")
	precache_sound("misc/headshot.wav")
	precache_sound("misc/humiliation.wav")
	precache_sound("misc/killingspree.wav")
	precache_sound("misc/multikill.wav")
	precache_sound("misc/ultrakill.wav")
	precache_sound("misc/maytheforce.wav")
	precache_sound("misc/oneandonly.wav")
	precache_sound("misc/prepare.wav")
	precache_sound("misc/rampage.wav")
	precache_sound("misc/holyshit.wav")

	return PLUGIN_CONTINUE 
}



public plugin_init()
{
	register_plugin("Ultimate Sound","1.5","Dizzy")
	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("DeathMsg","death_msg","a")
	register_cvar("lastman_mode","abc")
	register_cvar("streak_mode","ab")
	register_cvar("kniff_mode","ab")
	register_cvar("hs_mode","ab")

	return PLUGIN_CONTINUE
}

Аватар
BluRayTrans Bhop
Извън линия
Потребител
Потребител
Мнения: 10
Регистриран на: 07 Мар 2018, 00:03

Заявка за Ultimate Sounds Dhud

Мнение от BluRayTrans Bhop » 16 Мар 2018, 23:31

OciXCrom™ написа:
16 Мар 2018, 22:59
Опитай така за координатите:

Код за потвърждение: Избери целия код

///////////////////////////////////////////////////
//  AMXMOD[X]                                    //
//   ::Ultimate sounds::                         //
//    by Hephaistos ([email protected])       //
//    edited by Dizzy ([email protected])   //
//                                               //
// cvar:                                         //
//  streak_mode < flags >                        //
//  "a" - messages                               //
//  "b" - sounds                                 //
//                                               //
//  kniff_mode < flags >                         //
//  "a" - messages                               //
//  "b" - sounds                                 //
//                                               //
//  hs_mode < flags >                            //
//  "a" - messages                               //
//  "b" - sounds                                 //
//                                               //
//  lastman_mode < flags >                       //
//  "a" - messages                               //
//  "b" - hp                                     //
//  "c" - sounds                                 //
///////////////////////////////////////////////////

#include <amxmodx>
#if AMXX_VERSION_NUM < 183
	#include <dhudmessage>
#endif 

#define KNIFFMESSAGES 4
#define LEVELS 7
#define MESSAGESNOHP 4
#define MESSAGESHP 4

new kills[33] = {0,...};
new deaths[33] = {0,...};
new alone_ann = 0
new levels[7] = {3, 5, 7, 9, 10, 13, 15};
new g_iHudPos[33]
new Float:g_fLastTime[33]

new stksounds[7][] = {
"misc/multikill",
"misc/ultrakill",
"misc/monsterkill",
"misc/killingspree",
"misc/rampage",
"misc/holyshit",
"misc/godlike"};

new stkmessages[7][] = {
"%s: Multi-Kill!",
"%s: Ultra-Kill!",
"%s: Monster-Kill!",
"%s: Killing Spree!",
"%s: Rampage!",
"%s: Holy Shit!",
"%s: Godlike!"};


new kniffmessages[KNIFFMESSAGES][] = {
"%s Sliced And Diced %s!",
"%s Shanked %s!",
"%s Pulled A Knife On %s!",
"%s Knived %s!"}

new messagesnohp[MESSAGESNOHP][] = {
"%i terrorist vs %i CT^n%s: Now All Depends On You!",
"%i terrorist vs %i CT^n%s: I Hope You Still Have A Healthpack.",
"%i terrorist vs %i CT^n%s: All Your Teammates Were Killed. Good Luck!",
"%i terrorist vs %i CT^n%s: Now You Are Alone. Have Fun!"}

new messageshp[MESSAGESHP][] = {
"%i terrorist vs %i CT^n%s (%i hp): Now All Depend On You!",
"%i terrorist vs %i CT^n%s (%i hp): I Hope You Still Have A Healthpack.",
"%i terrorist vs %i CT^n%s (%i hp): All Your Teammates Were Killed. Good Luck!",
"%i terrorist vs %i CT^n%s (%i hp): Now You Are alone. Have Fun!"}

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 streak = get_streak()

	if (streak&1)
	{
		new Float:fTime = get_gametime()
		
		if(fTime - g_fLastTime[killer] >= 6.0)
			g_iHudPos[killer] = 0
		
		new name[32];
		get_user_name(killer, name, 32);
		set_dhudmessage(0, 100, 200, 0.05, 0.65 - 0.05 * g_iHudPos[killer], 2, 0.02, 6.0, 0.01, 0.1);
		show_dhudmessage(0, stkmessages[level], name);
		g_iHudPos[killer]++
		g_fLastTime[killer] = fTime
	}

	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, 
			"* You are on a killstreak with %d kills.", kills[id]);

		}

		else if (deaths[id] > 1)
		{
			client_print(id, print_chat, 
			"* Take care, you are on a deathstreak with %d deaths in a row.", deaths[id]);
		}
	}
}

public client_connect(id)
{
	new streak = get_streak()

	if ((streak&1) || (streak&2))
	{
		kills[id] = 0;
		deaths[id] = 0;
	}
	
	g_iHudPos[id] = 0
	g_fLastTime[id] = 0.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 misc/humiliation")
	}
}


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 misc/maytheforce")
			}
		}
	} 
	else
{   
	if (ict==1&&ite>1&&alone_ann==0&&(lmmode_bit & 4))
	{
		last=players_ct[0]
		client_cmd(last,"spk misc/oneandonly")
	}

	else if (ite==1&&ict>1&&alone_ann==0&&(lmmode_bit & 4))
	{
		last=players_t[0]
		client_cmd(last,"spk misc/oneandonly")
	}

	else
	{
		return PLUGIN_CONTINUE
	}
	alone_ann = last
	new name[32]   
	get_user_name(last,name,32)

	if (lmmode_bit & 1)
	{
		set_hudmessage(200, 100, 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 misc/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,"::HEADSHOT::^nYou Owned %s !!",victim_name)
	}

	if (hsmode_bit & 2)
	{
		client_cmd(0,"spk misc/headshot")
	}
}

public plugin_precache()
{
	precache_sound("misc/monsterkill.wav")
	precache_sound("misc/godlike.wav")
	precache_sound("misc/headshot.wav")
	precache_sound("misc/humiliation.wav")
	precache_sound("misc/killingspree.wav")
	precache_sound("misc/multikill.wav")
	precache_sound("misc/ultrakill.wav")
	precache_sound("misc/maytheforce.wav")
	precache_sound("misc/oneandonly.wav")
	precache_sound("misc/prepare.wav")
	precache_sound("misc/rampage.wav")
	precache_sound("misc/holyshit.wav")

	return PLUGIN_CONTINUE 
}



public plugin_init()
{
	register_plugin("Ultimate Sound","1.5","Dizzy")
	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("DeathMsg","death_msg","a")
	register_cvar("lastman_mode","abc")
	register_cvar("streak_mode","ab")
	register_cvar("kniff_mode","ab")
	register_cvar("hs_mode","ab")

	return PLUGIN_CONTINUE
}
Тествах проблема е че работи на моменти някой път работи някой път не от какво може да е ето и снимки:
Снимка 1: http://prikachi.com/images.php?images/370/9287370c.jpg
Снимка 2: http://prikachi.com/images.php?images/371/9287371e.jpg

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 6909
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 116 пъти
Получена благодарност: 1043 пъти
Обратна връзка:

Заявка за Ultimate Sounds Dhud

Мнение от OciXCrom » 16 Мар 2018, 23:38

Виж сега как е.

Аватар
BluRayTrans Bhop
Извън линия
Потребител
Потребител
Мнения: 10
Регистриран на: 07 Мар 2018, 00:03

Заявка за Ultimate Sounds Dhud

Мнение от BluRayTrans Bhop » 16 Мар 2018, 23:49

OciXCrom™ написа:
16 Мар 2018, 23:38
Виж сега как е.
Сега е така http://prikachi.com/images.php?images/385/9287385z.jpg

Публикувай отговор
  • Подобни теми
    Отговори
    Преглеждания
     Последно мнение

Обратно към “Заявки за плъгини”

Кой е на линия

Потребители разглеждащи този форум: 0 регистрирани и 14 госта