Заявка за редактиране на uber sounds

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Заключена
Потребителски аватар

Автор на темата
Fatall ЦРУ
Потребител
Потребител
Мнения: 160
Регистриран: 30 авг 2018, 09:35
Местоположение: София
Се отблагодари: 19 пъти
Получена благодарност: 6 пъти
Години: 24
Контакти:

Заявка за редактиране на uber sounds

Мнение от Fatall ЦРУ » 14 мар 2019, 20:06

Някой може ли да ми промени малко кода смисъл да мога да премахна някой звуци лесно и да променя брой на убиствата на звуците.
Също така да се премахнат тия флагове и излишните неща.
Благодаря предварително. :)

Код: Избери всички

new const PLUGIN[]  = "Uber Sounds"
new const VERSION[] = "1.0"
new const AUTHOR[]  = "kz4fun"

#include <amxmodx>

#define KNIFEMESSAGES 5
#define MESSAGESNOHP 5
#define MESSAGESHP 5
#define LEVELS 30

new streak_mode, knife_mode, hs_mode, lastman_mode

new gmsgHudSync

new kills[33] = {0,...};
new deaths[33] = {0,...};
new alone_ann = 0
new levels[30] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31};

//Streak Sounds
new stksounds[30][] = {
"misc/fatall_sounds/3multikill",
"misc/fatall_sounds/4megakill",
"misc/fatall_sounds/5rampage",
"misc/fatall_sounds/6monsterkill",
"misc/fatall_sounds/7ultrakill",
"misc/fatall_sounds/8holyshit",
"misc/fatall_sounds/9godlike",
"misc/fatall_sounds/10unstoppable",
"misc/fatall_sounds/11ludacrisskill",
"misc/fatall_sounds/12wickedsick",
"misc/fatall_sounds/13blazeofglory",
"misc/fatall_sounds/14bloodbath",
"misc/fatall_sounds/15assassin",
"misc/fatall_sounds/16excellent",
"misc/fatall_sounds/17extermination",
"misc/fatall_sounds/18hattrick",
"misc/fatall_sounds/19headhunter",
"misc/fatall_sounds/20impressive",
"misc/fatall_sounds/21outstanding",
"misc/fatall_sounds/22payback",
"misc/fatall_sounds/23retribution",
"misc/fatall_sounds/24vengeance",
"misc/fatall_sounds/25eagleeye",
"misc/fatall_sounds/26termination",
"misc/fatall_sounds/27unreal",
"misc/fatall_sounds/28topgun",
"misc/fatall_sounds/29killingmachine",
"misc/fatall_sounds/30maniac",
"misc/fatall_sounds/31massacre",
"misc/fatall_sounds/32warpath"};

//Exact Messages
new stkmessages[30][] = {
"%s: Multi-Kill!",
"%s: Mega-Kill!",
"%s: Rampage!",
"%s: Monster-Kill!",
"%s: Ultra-Kill!",
"%s: Holy Shit!",
"%s: Godlike!",
"%s: Unstoppable!",
"%s: Ludacriss-Kill!",
"%s: Wicked Sick!",
"%s: BlazeOfGlory!",
"%s: Blood Bath!",
"%s: Assasin!",
"%s: Excellent!",
"%s: Extermination!",
"%s: Hat Trick!",
"%s: Head Hunter!",
"%s: Impressive!",
"%s: Outstanding!",
"%s: PayBack!",
"%s: Retribution!",
"%s: Vengeance!",
"%s: Eagleeye!",
"%s: Termination!",
"%s: Unreal!",
"%s: Topgun!",
"%s: Killing Machine!",
"%s: Maniac!",
"%s: Mssacre!",
"%s: Warpath!!!"
}


new knifemessages[KNIFEMESSAGES][] = 
{
	"KNIFE_MSG_1",  
	"KNIFE_MSG_2",  
	"KNIFE_MSG_3",  
	"KNIFE_MSG_4",  
	"KNIFE_MSG_5"
}

new messagesnohp[MESSAGESNOHP][] = 
{
	"NOHP_MSG_1",  
	"NOHP_MSG_2",  
	"NOHP_MSG_3",  
	"NOHP_MSG_4",  
	"NOHP_MSG_5"
}

new messageshp[MESSAGESHP][] = 
{
	"HP_MSG_1",  
	"HP_MSG_2",  
	"HP_MSG_3",  
	"HP_MSG_4",  
	"HP_MSG_5"
}

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_cvar("ultimate_sounds",VERSION,FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY)
	register_dictionary("fatall_sounds.txt")
	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", "1>0");
	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")
	streak_mode = register_cvar("streak_mode","ab")
	knife_mode = register_cvar("knife_mode","ab")
	hs_mode = register_cvar("hs_mode","ab")

	gmsgHudSync = CreateHudSyncObj()

	return PLUGIN_CONTINUE
}


get_streak()
{
	new streak[3]
	get_pcvar_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_hudmessage(0, 100, 200, 0.05, 0.65, 2, 0.02, 6.0, 0.01, 0.1, 2);
		ShowSyncHudMsg(0, gmsgHudSync, stkmessages[level], name);
	}

	if (streak&2){
		for(new i=1;i<=get_maxplayers();i++) 
			if(is_user_connected(i) ==1 )
				client_cmd(i, "spk %s", stksounds[level]); 
	}
}

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

	if (streak&1)
	{

		if (kills[id] > levels[0])

		{
		        Color_Print(id, "^4[Fatall-Error] ^1%L", id, "KILL_STREAK", kills[id]);
		}

		else if (deaths[id] > 1)

		{
			Color_Print(id, "^4[Fatall-Error] ^1%L", id, "DEATH_STREAK", 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 knifemode[4] 
	get_pcvar_string(knife_mode,knifemode,4) 
	new knifemode_bit = read_flags(knifemode)

	if (knifemode_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)
		ShowSyncHudMsg(0, gmsgHudSync, "%L", LANG_PLAYER, knifemessages[ random_num(0,KNIFEMESSAGES-1) ],killer_name,victim_name)
	}

	if (knifemode_bit & 2)
	{
		for(new i=1;i<=get_maxplayers();i++) 
			if(is_user_connected(i)==1 )
				client_cmd(i,"spk misc/fatall_sounds/humiliation")
   	}
}


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(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)
			{
				ShowSyncHudMsg(0, gmsgHudSync, "%s (%i hp) vs. %s (%i hp)",name1,get_user_health(players_ct[0]),name2,get_user_health(players_t[0]))
			}

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

	else if (ite==1&&ict>1&&alone_ann==0&&(lmmode_bit & 4))
	{
		last=players_t[0]
		client_cmd(last,"spk misc/fatall_sounds/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)
		if (lmmode_bit & 2)
		{
			ShowSyncHudMsg(0, gmsgHudSync, "%L", LANG_PLAYER, messageshp[ random_num(0,MESSAGESHP-1) ],ite ,ict ,name,get_user_health(last))
		}

		else
		{
			ShowSyncHudMsg(0, gmsgHudSync, "%L", LANG_PLAYER, messagesnohp[ random_num(0,MESSAGESNOHP-1) ],ite ,ict ,name )
		}
	}
}
	return PLUGIN_CONTINUE   
}


public hs()
{
	new hsmode[4] 
	get_pcvar_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)
	ShowSyncHudMsg(killer_id, gmsgHudSync, "HEADSHOT",victim_name)
	}

	if (hsmode_bit & 2)
	{
		for(new i=1;i<=get_maxplayers();i++) 
			if(is_user_connected(i)==1)
				client_cmd(i,"spk misc/fatall_sounds/headshot")
	}
}

public plugin_precache()
{
	precache_sound("misc/fatall_sounds/3multikill.wav")
	precache_sound("misc/fatall_sounds/4megakill.wav")
	precache_sound("misc/fatall_sounds/5rampage.wav")
	precache_sound("misc/fatall_sounds/6monsterkill.wav")
	precache_sound("misc/fatall_sounds/7ultrakill.wav")
	precache_sound("misc/fatall_sounds/8holyshit.wav")
	precache_sound("misc/fatall_sounds/9godlike.wav")
	precache_sound("misc/maytheforce.wav")
	precache_sound("misc/fatall_sounds/10unstoppable.wav")
	precache_sound("misc/fatall_sounds/11ludacrisskill.wav")
	precache_sound("misc/fatall_sounds/12wickedsick.wav")
	precache_sound("misc/fatall_sounds/13blazeofglory.wav")
	precache_sound("misc/fatall_sounds/14bloodbath.wav")
	precache_sound("misc/fatall_sounds/15assassin.wav")
	precache_sound("misc/fatall_sounds/16excellent.wav")
	precache_sound("misc/fatall_sounds/17extermination.wav")
	precache_sound("misc/fatall_sounds/18hattrick.wav")
	precache_sound("misc/fatall_sounds/19headhunter.wav")
	precache_sound("misc/fatall_sounds/20impressive.wav")
	precache_sound("misc/fatall_sounds/21outstanding.wav")
	precache_sound("misc/fatall_sounds/22payback.wav")
	precache_sound("misc/fatall_sounds/23retribution.wav")
	precache_sound("misc/fatall_sounds/24vengeance.wav")
	precache_sound("misc/fatall_sounds/25eagleeye.wav")
	precache_sound("misc/fatall_sounds/26termination.wav")
	precache_sound("misc/fatall_sounds/27unreal.wav")
	precache_sound("misc/fatall_sounds/28topgun.wav")
	precache_sound("misc/fatall_sounds/29killingmachine.wav")
	precache_sound("misc/fatall_sounds/30maniac.wav")
	precache_sound("misc/fatall_sounds/31massacre.wav")
	precache_sound("misc/fatall_sounds/32warpath.wav")
	precache_sound("misc/fatall_sounds/headshot.wav")
	precache_sound("misc/fatall_sounds/humiliation.wav")
	precache_sound("misc/fatall_sounds/oneandonly.wav")

	return PLUGIN_CONTINUE 
}

stock Color_Print(const id, const input[], any:...)
{
   new count = 1, players[32]
   static msg[191]
   vformat(msg, 190, input, 3)
   
   replace_all(msg, 190, "!g", "^4") // Green Color
   replace_all(msg, 190, "!y", "^1") // Default Color
   replace_all(msg, 190, "!team", "^3") // Team Color
   
   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();
         }
      }
   }
}
Последна промяна от Fatall ЦРУ на 14 мар 2019, 21:57, променено общо 2 пъти.
Изображение Изображение

Потребителски аватар

stambeto2006
Модератор
Модератор
Мнения: 373
Регистриран: 06 окт 2016, 15:44
Се отблагодари: 21 пъти
Получена благодарност: 26 пъти
Години: 24
Контакти:

uber sounds kill (30 pieces)

Мнение от stambeto2006 » 14 мар 2019, 21:54

Оправи си заглавието на темата!

Потребителски аватар

hackera457 СОТА
Модератор
Модератор
Мнения: 649
Регистриран: 01 ное 2016, 09:46
Местоположение: София
Получена благодарност: 81 пъти
Години: 25
Контакти:

Заявка за редактиране на uber sounds

Мнение от hackera457 СОТА » 14 мар 2019, 23:08

Като за начало премахни този ужасен код и ползвай този:

Код: Избери всички

#include <amxmodx>
#include <amxmisc>

#if !defined MAX_NAME_LENGTH
	#define MAX_NAME_LENGTH 32
#endif

#if !defined MAX_PLAYERS
	#define MAX_PLAYERS 32
#endif

#define HUD_ENABLED
#define HUD_COLOR 0, 255, 0
#define HUD_POSITION -1.0, 0.15
#define HUD_DURATION 1.5

enum _:eStreakInfo
{
	REQUIRE_KILLS,
	MESSAGE[64],
	SOUND[64]
}

enum _:Cvars
{
	amx_killstreak_hs,
	amx_killstreak_knife
}

new const g_szStreakInfo[][eStreakInfo]=
{
	{2, "Multi-Kill!","misc/fatall_sounds/3multikill"},
	{3, "Mega-Kill!", "misc/fatall_sounds/4megakill"},
	{4, "Rampage!", "misc/fatall_sounds/5rampage"},
	{5, "Monster-Kill!", "misc/fatall_sounds/6monsterkill"},
	{6, "Ultra-Kill!", "misc/fatall_sounds/7ultrakill"},
	{7, "Holy Shit!", "misc/fatall_sounds/8holyshit"},
	{8, "Godlike!", "misc/fatall_sounds/9godlike"},
	{9, "Unstoppable!","misc/fatall_sounds/10unstoppable"},
	{10,"Ludacriss-Kill","misc/fatall_sounds/11ludacrisskill"},
	{11,"Wicked Sick!","misc/fatall_sounds/12wickedsick"},
	{12,"BlazeOfGlory!","misc/fatall_sounds/13blazeofglory"},
	{13,"Blood Bath!","misc/fatall_sounds/14bloodbath"},
	{14,"Assasin!", "misc/fatall_sounds/15assassin"},
	{15,"Excellent!", "misc/fatall_sounds/16excellent"},
	{16,"Extermination!","misc/fatall_sounds/17extermination"},
	{17,"Hat Trick!","misc/fatall_sounds/18hattrick"},
	{18,"Head Hunter!","misc/fatall_sounds/19headhunter"},
	{19,"Impressive!","misc/fatall_sounds/20impressive"},
	{20,"Outstanding!","misc/fatall_sounds/21outstanding"},
	{21,"PayBack!","misc/fatall_sounds/22payback"},
	{22,"Retribution!","misc/fatall_sounds/23retribution"},
	{23,"Vengeance!","misc/fatall_sounds/24vengeance"},
	{24,"Eagleeye!","misc/fatall_sounds/25eagleeye"},
	{25,"Termination!","misc/fatall_sounds/26termination"},
	{26,"Unreal!","misc/fatall_sounds/27unreal"},
	{27,"Topgun!","misc/fatall_sounds/28topgun"},
	{28,"Killing Machine!","misc/fatall_sounds/29killingmachine"},
	{29,"Maniac!","misc/fatall_sounds/30maniac"},
	{30,"Mssacre!","misc/fatall_sounds/31massacre"},
	{31,"Warpath!!!","misc/fatall_sounds/32warpath"}
}

new const g_szKnifeMessages[][]=
{
	"KNIFE_MSG_1",  
	"KNIFE_MSG_2",  
	"KNIFE_MSG_3",  
	"KNIFE_MSG_4",  
	"KNIFE_MSG_5"
}

new const g_szHsSound[]= "misc/fatall_sounds/headshot.wav"
new const g_szKnifeSound[]= "misc/fatall_sounds/humiliation.wav"

new g_Cvar[Cvars], g_iPlayerKills[MAX_PLAYERS+1]

#if defined HUD_ENABLED
new g_iHudSyncObj
#endif 

public plugin_init()
{
	register_plugin("Ultimate Killstreak","1.0","hackera457")
	register_cvar("hackera457_ultimatekillstreak","1.0",FCVAR_SERVER|FCVAR_SPONLY|FCVAR_UNLOGGED)
	
	register_dictionary("fatall_sounds.txt")
	
	g_Cvar[amx_killstreak_hs] = register_cvar("amx_killstreak_hs","1")
	g_Cvar[amx_killstreak_knife] = register_cvar("amx_killstreak_knife","1")
	
	register_event("DeathMsg", "OnPlayerKilled", "a", "1>0", "2>0", "1!2")
	register_logevent("OnRoundStart", 2, "0=World triggered", "1=Round_Start")
	
	#if defined HUD_ENABLED
	g_iHudSyncObj = CreateHudSyncObj()
	#endif 
}

public plugin_precache()
{
	for(new i=0; i < sizeof g_szStreakInfo; i++)
	{
		precache_sound(g_szStreakInfo[i][SOUND])
	}
	
	precache_sound(g_szHsSound)
	precache_sound(g_szKnifeSound)
}

public client_putinserver(id)
{
	g_iPlayerKills[id] = 0
}

public OnPlayerKilled()
{
	new iKiller = read_data(1), iVictim = read_data(2), iIsHeadshot = read_data(3), szWeapon[MAX_NAME_LENGTH], szKillerName[MAX_NAME_LENGTH], szVictimName[MAX_NAME_LENGTH]
	
	read_data(4, szWeapon,charsmax(szWeapon))
	get_user_name(iKiller, szKillerName,charsmax(szKillerName))
	get_user_name(iVictim, szVictimName,charsmax(szVictimName))
	g_iPlayerKills[iKiller]++
	
	#if defined HUD_ENABLED
	set_hudmessage(HUD_COLOR,HUD_POSITION,.holdtime = HUD_DURATION)
	#endif 
	
	if(is_user_connected(iKiller) && is_user_connected(iVictim) && iKiller != iVictim)
	{
		if(get_pcvar_num(g_Cvar[amx_killstreak_hs]) && iIsHeadshot)
		{
			#if defined HUD_ENABLED
			ShowSyncHudMsg(0,g_iHudSyncObj,"%s: Headshot !!!", szKillerName)
			#endif 
			
			client_cmd(0,"spk ^"%s^"", g_szHsSound)
		}
		
		if(get_pcvar_num(g_Cvar[amx_killstreak_knife]) && equali(szWeapon,"knife"))
		{
			#if defined HUD_ENABLED
			ShowSyncHudMsg(0,g_iHudSyncObj,g_szKnifeMessages[random_num(0, sizeof g_szKnifeMessages -1)], szKillerName, szVictimName)
			#endif 
			
			client_cmd(0,"spk ^"%s^"", g_szKnifeSound)
		}
		
		for(new i=0; i< sizeof g_szStreakInfo; i++)
		{
			if(g_iPlayerKills[iKiller] == g_szStreakInfo[i][REQUIRE_KILLS])
			{
				#if defined HUD_ENABLED
				ShowSyncHudMsg(0,g_iHudSyncObj,"%s: %s",szKillerName,g_szStreakInfo[i][MESSAGE])
				#endif 
				
				client_cmd(0,"spk ^"%s^"",g_szStreakInfo[i][SOUND])
			}
		}
	}
}

public OnRoundStart()
{
	new iPlayers[MAX_PLAYERS], iNum
	
	#if AMXX_VERSION_NUM < 190
	get_players(iPlayers,iNum,"h")
	#else
	get_players_ex(iPlayers,iNum,GetPlayers_ExcludeHLTV)
	#endif 
	
	for(--iNum; iNum >= 0; iNum--)
	{
		g_iPlayerKills[iPlayers[iNum]] = 0
	}
}

Не съм го тествал, но съм изчистил от излишни неща, също така виж как се настройват звуците и съобщенията и си ги променяй по твой вкус
Моите плъгини

Код: Избери всички

#include <hambeer>

RegisterHamBeer(HamBeer_Spawn, "player", "GivePlayerBeer", 1);

public GivePlayerBeer(Pl){
    if(!is_user_alive(Pl)){
        ham_give_beer(Pl, 5)
        client_print(Pl, print_chat, "Go Go Go"){
}  


Потребителски аватар

Автор на темата
Fatall ЦРУ
Потребител
Потребител
Мнения: 160
Регистриран: 30 авг 2018, 09:35
Местоположение: София
Се отблагодари: 19 пъти
Получена благодарност: 6 пъти
Години: 24
Контакти:

Заявка за редактиране на uber sounds

Мнение от Fatall ЦРУ » 15 мар 2019, 20:53

Делл..
Прикачени файлове
Без име3.png
Без име3.png (764.11 KиБ) Видяна 643 пъти
Без име3.png
Без име3.png (764.11 KиБ) Видяна 643 пъти
Последна промяна от Fatall ЦРУ на 15 мар 2019, 21:14, променено общо 2 пъти.
Изображение Изображение

Потребителски аватар

summertime vibes root@
Модератор
Модератор
Мнения: 1166
Регистриран: 27 ное 2016, 17:47
Местоположение: In the Heaven
Се отблагодари: 47 пъти
Получена благодарност: 118 пъти
Контакти:

Заявка за редактиране на uber sounds

Мнение от summertime vibes root@ » 15 мар 2019, 21:11

Къде я видя тази грешка?
PSociety.INFO - Всичко за Photoshop, стилове и помощ за PHPBB.
Изображение
Изображение

Потребителски аватар

Автор на темата
Fatall ЦРУ
Потребител
Потребител
Мнения: 160
Регистриран: 30 авг 2018, 09:35
Местоположение: София
Се отблагодари: 19 пъти
Получена благодарност: 6 пъти
Години: 24
Контакти:

Заявка за редактиране на uber sounds

Мнение от Fatall ЦРУ » 15 мар 2019, 21:15

summertime vibes написа:
15 мар 2019, 21:11
Къде я видя тази грешка?
Съжелявам грешен файл съм компилирал първия път
Изображение Изображение

Потребителски аватар

summertime vibes root@
Модератор
Модератор
Мнения: 1166
Регистриран: 27 ное 2016, 17:47
Местоположение: In the Heaven
Се отблагодари: 47 пъти
Получена благодарност: 118 пъти
Контакти:

Заявка за редактиране на uber sounds

Мнение от summertime vibes root@ » 15 мар 2019, 21:23

Всичко точно ли е, да знам дали да заключвам?
PSociety.INFO - Всичко за Photoshop, стилове и помощ за PHPBB.
Изображение
Изображение

Потребителски аватар

Автор на темата
Fatall ЦРУ
Потребител
Потребител
Мнения: 160
Регистриран: 30 авг 2018, 09:35
Местоположение: София
Се отблагодари: 19 пъти
Получена благодарност: 6 пъти
Години: 24
Контакти:

Заявка за редактиране на uber sounds

Мнение от Fatall ЦРУ » 15 мар 2019, 21:31

Ами проблема е че само два звука се чуват "fatall_headshot" и "fatall_humiliation" а на останалите само текста показва

Код: Избери всички

#include <amxmodx>
#include <amxmisc>

#if !defined MAX_NAME_LENGTH
	#define MAX_NAME_LENGTH 32
#endif

#if !defined MAX_PLAYERS
	#define MAX_PLAYERS 32
#endif

#define HUD_ENABLED
#define HUD_COLOR 0, 255, 0
#define HUD_POSITION -1.0, 0.15
#define HUD_DURATION 1.5

enum _:eStreakInfo
{
	REQUIRE_KILLS,
	MESSAGE[64],
	SOUND[64]
}

enum _:Cvars
{
	amx_killstreak_hs,
	amx_killstreak_knife
}

new const g_szStreakInfo[][eStreakInfo]=
{
	{2, "Multi-Kill!","misc/fatall_sounds/fatall_multikill"},
	{5, "Ultra-Kill!", "misc/fatall_sounds/fatall_ultrakill"},
	{7, "Killing spree!", "misc/fatall_sounds/fatall_killingspree"},
	{9, "BlazeOfGlory!","misc/fatall_sounds/fatall_blazeofglory"},
	{11,"Blood Bath!","misc/fatall_sounds/fatall_bloodbath"},
	{13,"Assasin!", "misc/fatall_sounds/fatall_assassin"},
	{15,"Excellent!", "misc/fatall_sounds/fatall_excellent"},
	{17,"Extermination!","misc/fatall_sounds/fatall_extermination"},
	{19,"Dominating!","misc/fatall_sounds/fatall_dominating"},
	{20,"Head Hunter!","misc/fatall_sounds/fatall_headhunter"},
	{21,"Impressive!","misc/fatall_sounds/fatall_impressive"},
	{22,"Outstanding!","misc/fatall_sounds/fatall_outstanding"},
	{23,"Retribution!","misc/fatall_sounds/fatall_retribution"},
	{24,"Vengeance!","misc/fatall_sounds/fatall_vengeance"},
	{25,"Eagleeye!","misc/fatall_sounds/fatall_eagleeye"},
	{26,"Termination!","misc/fatall_sounds/fatall_termination"},
	{27,"Unreal!","misc/fatall_sounds/fatall_unreal"},
	{28,"Killing Machine!","misc/fatall_sounds/fatall_killingmachine"},
	{29,"Maniac!","misc/fatall_sounds/fatall_maniac"},
	{30,"Mssacre!","misc/fatall_sounds/fatall_massacre"},
	{31,"Warpath!","misc/fatall_sounds/fatall_warpath"}
}

new const g_szKnifeMessages[][]=
{
	"KNIFE_MSG_1",  
	"KNIFE_MSG_2",  
	"KNIFE_MSG_3",  
	"KNIFE_MSG_4",  
	"KNIFE_MSG_5"
}

new const g_szHsSound[]= "misc/fatall_sounds/fatall_headshot.wav"
new const g_szKnifeSound[]= "misc/fatall_sounds/fatall_humiliation.wav"

new g_Cvar[Cvars], g_iPlayerKills[MAX_PLAYERS+1]

#if defined HUD_ENABLED
new g_iHudSyncObj
#endif 

public plugin_init()
{
	register_plugin("Ultimate Killstreak","1.0","hackera457")
	register_cvar("hackera457_ultimatekillstreak","1.0",FCVAR_SERVER|FCVAR_SPONLY|FCVAR_UNLOGGED)
	
	register_dictionary("fatall_sounds.txt")
	
	g_Cvar[amx_killstreak_hs] = register_cvar("amx_killstreak_hs","1")
	g_Cvar[amx_killstreak_knife] = register_cvar("amx_killstreak_knife","1")
	
	register_event("DeathMsg", "OnPlayerKilled", "a", "1>0", "2>0", "1!2")
	register_logevent("OnRoundStart", 2, "0=World triggered", "1=Round_Start")
	
	#if defined HUD_ENABLED
	g_iHudSyncObj = CreateHudSyncObj()
	#endif 
}

public plugin_precache()
{
	for(new i=0; i < sizeof g_szStreakInfo; i++)
	{
		precache_sound(g_szStreakInfo[i][SOUND])
	}
	
	precache_sound(g_szHsSound)
	precache_sound(g_szKnifeSound)
}

public client_putinserver(id)
{
	g_iPlayerKills[id] = 0
}

public OnPlayerKilled()
{
	new iKiller = read_data(1), iVictim = read_data(2), iIsHeadshot = read_data(3), szWeapon[MAX_NAME_LENGTH], szKillerName[MAX_NAME_LENGTH], szVictimName[MAX_NAME_LENGTH]
	
	read_data(4, szWeapon,charsmax(szWeapon))
	get_user_name(iKiller, szKillerName,charsmax(szKillerName))
	get_user_name(iVictim, szVictimName,charsmax(szVictimName))
	g_iPlayerKills[iKiller]++
	
	#if defined HUD_ENABLED
	set_hudmessage(HUD_COLOR,HUD_POSITION,.holdtime = HUD_DURATION)
	#endif 
	
	if(is_user_connected(iKiller) && is_user_connected(iVictim) && iKiller != iVictim)
	{
		if(get_pcvar_num(g_Cvar[amx_killstreak_hs]) && iIsHeadshot)
		{
			#if defined HUD_ENABLED
			ShowSyncHudMsg(0,g_iHudSyncObj,"%s: Headshot !!!", szKillerName)
			#endif 
			
			client_cmd(0,"spk ^"%s^"", g_szHsSound)
		}
		
		if(get_pcvar_num(g_Cvar[amx_killstreak_knife]) && equali(szWeapon,"knife"))
		{
			#if defined HUD_ENABLED
			ShowSyncHudMsg(0,g_iHudSyncObj,g_szKnifeMessages[random_num(0, sizeof g_szKnifeMessages -1)], szKillerName, szVictimName)
			#endif 
			
			client_cmd(0,"spk ^"%s^"", g_szKnifeSound)
		}
		
		for(new i=0; i< sizeof g_szStreakInfo; i++)
		{
			if(g_iPlayerKills[iKiller] == g_szStreakInfo[i][REQUIRE_KILLS])
			{
				#if defined HUD_ENABLED
				ShowSyncHudMsg(0,g_iHudSyncObj,"%s: %s",szKillerName,g_szStreakInfo[i][MESSAGE])
				#endif 
				
				client_cmd(0,"spk ^"%s^"",g_szStreakInfo[i][SOUND])
			}
		}
	}
}

public OnRoundStart()
{
	new iPlayers[MAX_PLAYERS], iNum
	
	#if AMXX_VERSION_NUM < 190
	get_players(iPlayers,iNum,"h")
	#else
	get_players_ex(iPlayers,iNum,GetPlayers_ExcludeHLTV)
	#endif 
	
	for(--iNum; iNum >= 0; iNum--)
	{
		g_iPlayerKills[iPlayers[iNum]] = 0
	}
}
Изображение Изображение

Потребителски аватар

hackera457 СОТА
Модератор
Модератор
Мнения: 649
Регистриран: 01 ное 2016, 09:46
Местоположение: София
Получена благодарност: 81 пъти
Години: 25
Контакти:

Заявка за редактиране на uber sounds

Мнение от hackera457 СОТА » 15 мар 2019, 23:54

Код: Избери всички

#include <amxmodx>
#include <amxmisc>

#if !defined MAX_NAME_LENGTH
	#define MAX_NAME_LENGTH 32
#endif

#if !defined MAX_PLAYERS
	#define MAX_PLAYERS 32
#endif

#define HUD_ENABLED
#define HUD_COLOR 0, 255, 0
#define HUD_POSITION -1.0, 0.15
#define HUD_DURATION 1.5

enum _:eStreakInfo
{
	REQUIRE_KILLS,
	MESSAGE[64],
	SOUND[64]
}

enum _:Cvars
{
	amx_killstreak_hs,
	amx_killstreak_knife
}

new const g_szStreakInfo[][eStreakInfo]=
{
	{2, "Multi-Kill!","misc/fatall_sounds/fatall_multikill.wav"},
	{5, "Ultra-Kill!", "misc/fatall_sounds/fatall_ultrakill.wav"},
	{7, "Killing spree!", "misc/fatall_sounds/fatall_killingspree.wav"},
	{9, "BlazeOfGlory!","misc/fatall_sounds/fatall_blazeofglory.wav"},
	{11,"Blood Bath!","misc/fatall_sounds/fatall_bloodbath.wav"},
	{13,"Assasin!", "misc/fatall_sounds/fatall_assassin.wav"},
	{15,"Excellent!", "misc/fatall_sounds/fatall_excellent.wav"},
	{17,"Extermination!","misc/fatall_sounds/fatall_extermination.wav"},
	{19,"Dominating!","misc/fatall_sounds/fatall_dominating.wav"},
	{20,"Head Hunter!","misc/fatall_sounds/fatall_headhunter.wav"},
	{21,"Impressive!","misc/fatall_sounds/fatall_impressive.wav"},
	{22,"Outstanding!","misc/fatall_sounds/fatall_outstanding.wav"},
	{23,"Retribution!","misc/fatall_sounds/fatall_retribution.wav"},
	{24,"Vengeance!","misc/fatall_sounds/fatall_vengeance.wav"},
	{25,"Eagleeye!","misc/fatall_sounds/fatall_eagleeye.wav"},
	{26,"Termination!","misc/fatall_sounds/fatall_termination.wav"},
	{27,"Unreal!","misc/fatall_sounds/fatall_unreal.wav"},
	{28,"Killing Machine!","misc/fatall_sounds/fatall_killingmachine.wav"},
	{29,"Maniac!","misc/fatall_sounds/fatall_maniac.wav"},
	{30,"Mssacre!","misc/fatall_sounds/fatall_massacre.wav"},
	{31,"Warpath!","misc/fatall_sounds/fatall_warpath.wav"}
}

new const g_szKnifeMessages[][]=
{
	"KNIFE_MSG_1",  
	"KNIFE_MSG_2",  
	"KNIFE_MSG_3",  
	"KNIFE_MSG_4",  
	"KNIFE_MSG_5"
}

new const g_szHsSound[]= "misc/fatall_sounds/fatall_headshot.wav"
new const g_szKnifeSound[]= "misc/fatall_sounds/fatall_humiliation.wav"

new g_Cvar[Cvars], g_iPlayerKills[MAX_PLAYERS+1]

#if defined HUD_ENABLED
new g_iHudSyncObj
#endif 

public plugin_init()
{
	register_plugin("Ultimate Killstreak","1.0","hackera457")
	register_cvar("hackera457_ultimatekillstreak","1.0",FCVAR_SERVER|FCVAR_SPONLY|FCVAR_UNLOGGED)
	
	register_dictionary("fatall_sounds.txt")
	
	g_Cvar[amx_killstreak_hs] = register_cvar("amx_killstreak_hs","1")
	g_Cvar[amx_killstreak_knife] = register_cvar("amx_killstreak_knife","1")
	
	register_event("DeathMsg", "OnPlayerKilled", "a", "1>0", "2>0", "1!2")
	register_logevent("OnRoundStart", 2, "0=World triggered", "1=Round_Start")
	
	#if defined HUD_ENABLED
	g_iHudSyncObj = CreateHudSyncObj()
	#endif 
}

public plugin_precache()
{
	for(new i=0; i < sizeof g_szStreakInfo; i++)
	{
		precache_sound(g_szStreakInfo[i][SOUND])
	}
	
	precache_sound(g_szHsSound)
	precache_sound(g_szKnifeSound)
}

public client_putinserver(id)
{
	g_iPlayerKills[id] = 0
}

public OnPlayerKilled()
{
	new iKiller = read_data(1), iVictim = read_data(2), iIsHeadshot = read_data(3), szWeapon[MAX_NAME_LENGTH], szKillerName[MAX_NAME_LENGTH], szVictimName[MAX_NAME_LENGTH]
	
	read_data(4, szWeapon,charsmax(szWeapon))
	get_user_name(iKiller, szKillerName,charsmax(szKillerName))
	get_user_name(iVictim, szVictimName,charsmax(szVictimName))
	g_iPlayerKills[iKiller]++
	
	#if defined HUD_ENABLED
	set_hudmessage(HUD_COLOR,HUD_POSITION,.holdtime = HUD_DURATION)
	#endif 
	
	if(is_user_connected(iKiller) && is_user_connected(iVictim) && iKiller != iVictim)
	{
		if(get_pcvar_num(g_Cvar[amx_killstreak_hs]) && iIsHeadshot)
		{
			#if defined HUD_ENABLED
			ShowSyncHudMsg(0,g_iHudSyncObj,"%s: Headshot !!!", szKillerName)
			#endif 
			
			client_cmd(0,"spk ^"%s^"", g_szHsSound)
		}
		
		if(get_pcvar_num(g_Cvar[amx_killstreak_knife]) && equali(szWeapon,"knife"))
		{
			#if defined HUD_ENABLED
			ShowSyncHudMsg(0,g_iHudSyncObj,g_szKnifeMessages[random_num(0, sizeof g_szKnifeMessages -1)], szKillerName, szVictimName)
			#endif 
			
			client_cmd(0,"spk ^"%s^"", g_szKnifeSound)
		}
		
		for(new i=0; i< sizeof g_szStreakInfo; i++)
		{
			if(g_iPlayerKills[iKiller] == g_szStreakInfo[i][REQUIRE_KILLS])
			{
				#if defined HUD_ENABLED
				ShowSyncHudMsg(0,g_iHudSyncObj,"%s: %s",szKillerName,g_szStreakInfo[i][MESSAGE])
				#endif 
				
				client_cmd(0,"spk ^"%s^"",g_szStreakInfo[i][SOUND])
			}
		}
	}
}

public OnRoundStart()
{
	new iPlayers[MAX_PLAYERS], iNum
	
	#if AMXX_VERSION_NUM < 190
	get_players(iPlayers,iNum,"h")
	#else
	get_players_ex(iPlayers,iNum,GetPlayers_ExcludeHLTV)
	#endif 
	
	for(--iNum; iNum >= 0; iNum--)
	{
		g_iPlayerKills[iPlayers[iNum]] = 0
	}
}
Явно снощи като ми се е спало съм забравил да добавя .wav при звуците и затова не ти работят
Моите плъгини

Код: Избери всички

#include <hambeer>

RegisterHamBeer(HamBeer_Spawn, "player", "GivePlayerBeer", 1);

public GivePlayerBeer(Pl){
    if(!is_user_alive(Pl)){
        ham_give_beer(Pl, 5)
        client_print(Pl, print_chat, "Go Go Go"){
}  


Потребителски аватар

Автор на темата
Fatall ЦРУ
Потребител
Потребител
Мнения: 160
Регистриран: 30 авг 2018, 09:35
Местоположение: София
Се отблагодари: 19 пъти
Получена благодарност: 6 пъти
Години: 24
Контакти:

Заявка за редактиране на uber sounds

Мнение от Fatall ЦРУ » 16 мар 2019, 17:40

:lock:
Изображение Изображение

Заключена

Върни се в “Заявки за плъгини”

Кой е на линия

Потребители, разглеждащи този форум: Няма регистрирани потребители и 1 гост