[Biohazard] Speech Sounds ZM

Aici este topicul destinat modului AMXX Biohazard. (EN & RO)
Post Reply
User avatar
CryWolf
Sys Admin
Sys Admin
Posts: 443
Joined: Tue Dec 15, 2009 11:32 am
Detinator Steam: Da
Cunostinte CS: Excelente
Reputatie: Detinator
Webmaster
Scripter
Trance Fan
Location: Botosani
Contact:

[Biohazard] Speech Sounds ZM

Post by CryWolf »

Description: This plugin will add zombie only speech sounds
BIO Speech Sounds
Nume: bio_painsounds [edited for speech only]
Versiune: 1.1
Autor: bipbip

Link official: Allied Modders

Instalare:
1. Fisierul bio_speech-sounds.sma il puneti in addons/amxmodx/scripting
2. Fisierul bio_speech-sounds.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:

Code: Select all

bio_speech-sounds.amxx
[code=php]

#include < amxmodx >
#include < biohazard >
#include < fakemeta_util >
#include < hamsandwich >

new g_speech [ ] [ ] =
{
	"zm/zombie/snd/speech/braaains.wav",
	"zm/zombie/snd/speech/brain.wav",
	"zm/zombie/snd/speech/brains.wav",
	"zm/zombie/snd/speech/brains2.wav",
	"zm/zombie/snd/speech/feeed.wav",
	"zm/zombie/snd/speech/hungers.wav",
	"zm/zombie/snd/speech/join.wav",
	"zm/zombie/snd/speech/join2.wav",
	"zm/zombie/snd/speech/joinusss.wav",
	"zm/zombie/snd/speech/mustfeed.wav" 
};

new Float: g_moaning [ 33 ];
new g_oldtalk [ 33 ];
new cvar_moaningtime;

public plugin_init()
{         
	register_plugin("bio_painsounds","1.1","bipbip")
	is_biomod_active() ? plugin_init2() : pause("ad")	
}
	
public plugin_init2()
{
	cvar_moaningtime = register_cvar("bh_moaningtime", "10")
	
	RegisterHam(Ham_Player_PostThink, "player",  "bacon_prethink", 1)	
}

public plugin_precache()
{
	register_forward(FM_PrecacheSound, "dontprecache")
	
	for(new i = 0; i < sizeof g_speech; i++)
		precache_sound(g_speech[i])	
}

public bacon_prethink(iPlayer)
{
	if ( is_user_alive ( iPlayer ) )
	{
		if (is_user_zombie(iPlayer))
		{
			if ( get_gametime() > g_moaning[iPlayer])
			{
				new Float: origin[3]
				pev(iPlayer, pev_origin, origin)
				new ent = engfunc(EngFunc_FindEntityInSphere, iPlayer, origin, 250.0)
				
				if (ent)
				{
					engfunc(EngFunc_EmitSound, iPlayer, CHAN_VOICE, g_speech[_random(iPlayer, sizeof g_speech)], random_float(0.7, 1.0), ATTN_NORM, 0, PITCH_NORM); 
					g_moaning[iPlayer] = get_gametime() + random_float(0.0,5.0) + float(get_pcvar_num(cvar_moaningtime));
				}	
			}
		}
	}
}

stock _random(id, maxnum)
{
	static luck
	luck = random_num(0, maxnum - 1)
	while (luck==g_oldtalk[id]) {
		luck = random_num(0, maxnum - 1)
	}
	g_oldtalk[id] = luck
	return luck;
}

public dontprecache(file[])
{
	if(file[0]=='h' && file[1]=='o' && file[2]=='s')
		return FMRES_SUPERCEDE
	
	return FMRES_IGNORED
}
Info: NU IMI DATI PM PENTRU CERERI AJUTOR ETC (NU RASPUND) FOLOSITI FORUMUL.
Image

Image
CUM SA NU LUPTI PENTRU IUBIRE ????
Daca lupti,inseamna ca vrei sa castigi ceva.Iubirea nu-i o miza.
Post Reply