Cerere plugin hns

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
User avatar
mixatu
Membru, skill +2
Membru, skill +2
Posts: 680
Joined: 26 Apr 2012, 15:47
Detinator Steam: Da
SteamID: kzu1337
Reputatie: Membru Club eXtreamCS (1 luna)
Location: cstrike
Has thanked: 59 times
Been thanked: 29 times
Contact:

26 Apr 2012, 18:43

Revin cu un nou topic deoarece am o dilema. Imi poate da cineva acel plugin care blocheaza lama CT-ului atunci cand acesta este inghetat? De exemplu cand un CT este inghetat, sa nu mai poata da click si sa ia Hp inamicului cat timp este inghetat. Deci in final, cand CT este inghetat sa nu poata lua hp din adversar. Este ceva care blocheaza sa dea click.. nu stiu sigur, de aceea apelez la voi :>
RoyalServer 2
User avatar
Ulquiorra
Fost moderator
Fost moderator
Posts: 2053
Joined: 25 Jul 2010, 17:29
Detinator Steam: Da
CS Status: A mai trecut o zi asteptand una mai buna
Detinator server CS: Retras.
SteamID: STEAM_0:1:318247XX
Reputatie: Fost Scripter eXtreamCS
Fost Moderator ajutator
Nick anterior: Askhanar
Location: Braila, Romania.
Has thanked: 215 times
Been thanked: 1132 times

26 Apr 2012, 20:46

nu e un plugin separat.. e un alt plugin de frostnade special pentru HNS.
enjoy.
hns_frostnades | Afiseaza codul
#include <amxmodx>
#include <fakemeta_util>

new gCvarEnabled;
new gCvarColor;
new gCvarDuration;
new gCvarDelay;
new gCvarHitself;
new gCvarDamage;
new gScreenfade
new gTrail;
new gGlass;
new gExplotion;

new const gTaskFrostnade = 3256
new const gModelGlass[] = "models/glassgibs.mdl"
new const gModelTrail[] = "sprites/laserbeam.spr"
new const gModelExplotion[] = "sprites/shockwave.spr"
new const gSoundWave[] = "warcraft3/frostnova.wav";	
new const gSoundFrosted[] = "warcraft3/impalehit.wav";	
new const gSoundBreak[] = "warcraft3/impalelaunch1.wav";

new bool:gIsFrosted[33];
new bool:gRestartAttempt[33];

public plugin_init() 
{
	register_plugin("HNS_FROSTNADE", "1.0", "Jon")
	
	gCvarEnabled = register_cvar("hns_fn_enabled", "1")
	gCvarColor = register_cvar("hns_fn_color", "75 125 255")
	gCvarDuration = register_cvar("hns_fn_duration", "5.0")
	gCvarDelay = register_cvar("hns_fn_delay", "1.0")
	gCvarHitself = register_cvar("hns_fn_hitself", "0")
	gCvarDamage = register_cvar("hns_fn_damage", "10")
	gScreenfade = get_user_msgid("ScreenFade")
	
	register_event("TextMsg", "event_RestartAttempt", "a", "2=#Game_will_restart_in");
	register_event("ResetHUD", "event_ResetHud", "be");
	register_event("DeathMsg","event_DeathMsg","a");
	
	register_forward(FM_PlayerPreThink,"fwd_PlayerPreThink");
	register_forward(FM_SetModel, "fwd_SetModel");
}

public plugin_precache()
{
	gTrail = precache_model(gModelTrail)
	gExplotion = precache_model(gModelExplotion)
	gGlass = precache_model(gModelGlass)
	
	precache_sound(gSoundWave)
	precache_sound(gSoundFrosted)
	precache_sound(gSoundBreak)
}

public event_RestartAttempt() 
{
	new players[32], num;
	get_players(players, num, "a");
	
	for (new i; i < num; ++i)
		gRestartAttempt[players] = true;
}

public event_ResetHud(id) 
{
	if (gRestartAttempt[id]) 
	{
		gRestartAttempt[id] = false;
		return;
	}
	event_PlayerSpawn(id);
}

public event_PlayerSpawn(id) 
{
	if(gIsFrosted[id]) 
		RemoveFrost(id);
}

public event_DeathMsg()
{
	new id = read_data(2);
	
	if(gIsFrosted[id])
		RemoveFrost(id)
}

public fwd_PlayerPreThink(id)
{
	if(gIsFrosted[id])
	{
		set_pev(id, pev_velocity, Float:{0.0,0.0,0.0})		
		set_pev(id, pev_flags, pev(id, pev_flags) | FL_FROZEN); 
	}
}

public fwd_SetModel(entity, const model[]) 
{
	static id
	id = pev(entity, pev_owner);
	
	if (!is_user_connected(id))
		return;
		
	if(equal(model,"models/w_smokegrenade.mdl") && get_pcvar_num(gCvarEnabled))
	{
		static Red, Green, Blue
		GetColor(Red, Green, Blue)
		
		fm_set_rendering(entity,kRenderFxGlowShell, Red, Green, Blue, kRenderNormal, 16);
		
		message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
		write_byte(TE_BEAMFOLLOW);
		write_short(entity);	// entity
		write_short(gTrail);	// sprite
		write_byte(10);		// life
		write_byte(10);		// width
		write_byte(Red);	// r
		write_byte(Green);	// g
		write_byte(Blue);	// b
		write_byte(200);	// brightness
		message_end();
		
		set_pev(entity, pev_nextthink, get_gametime() + 10.0);
		
		static args[2]
		args[0] = entity;
		args[1] = id;
		
		set_task(get_pcvar_float(gCvarDelay), "ExplodeFrost", gTaskFrostnade, args, sizeof args)
	}
}

public ExplodeFrost(const args[2]) 
{ 	
	static ent
	ent = args[0]
	
	new id = args[1];
	
	// invalid entity
	if (!pev_valid(ent)) 
		return;
	
	// get origin
	static origin[3], Float:originF[3]
	pev(ent, pev_origin, originF);
	FVecIVec(originF, origin);

	// explosion
	CreateBlast(origin);
	
	// frost nade explode sound
	engfunc(EngFunc_EmitSound, ent, CHAN_WEAPON, gSoundWave, 1.0, ATTN_NORM, 0, PITCH_NORM)
	
	// collisions
	static victim
	victim = -1;
	
	while((victim = engfunc(EngFunc_FindEntityInSphere, victim, originF, 240.0)) != 0) 
	{
		if(!is_user_alive(victim) || gIsFrosted[victim])
			continue;
			
		if(get_pcvar_num(gCvarHitself))
		{
			if(get_user_team(id) == get_user_team(victim))
			{
				if(victim != id || !is_user_alive(id))
					continue;
				
			}
		}
		
		else 
		{
				if(get_user_team(id) == get_user_team(victim))
					continue;
		}
		
		static Red, Green, Blue
		GetColor(Red, Green, Blue)		
	
		fm_set_rendering(victim, kRenderFxGlowShell, Red, Green, Blue, kRenderNormal,25)
		engfunc(EngFunc_EmitSound, victim, CHAN_WEAPON, gSoundFrosted, 1.0, ATTN_NORM, 0, PITCH_NORM)
	
		message_begin(MSG_ONE, gScreenfade, _, victim);
		write_short(~0); // duration
		write_short(~0); // hold time
		write_short(0x0004); // flags: FFADE_STAYOUT
		write_byte(Red);		// r
		write_byte(Green);		// g
		write_byte(Blue);
		write_byte(100); // alpha
		message_end();
		
		
		if(pev(victim, pev_flags) & FL_ONGROUND)
			set_pev(victim, pev_gravity, 999999.9) 
			
		else
			set_pev(victim, pev_gravity, 0.000001) 
		
		if(get_pcvar_num(gCvarDamage))
		{
			new Float:health;
			pev(victim, pev_health, health);
			
			health -= float(get_pcvar_num(gCvarDamage))
			
			if(health <= 0)
			{
				user_silentkill(victim);
				make_deathmsg(id, victim, 0, "frostnade")
			}
			
			else
				set_pev(victim, pev_health, health);
		}
		gIsFrosted[victim] = true;	
		set_task(get_pcvar_float(gCvarDuration), "RemoveFrost", victim)
	}
	
	engfunc(EngFunc_RemoveEntity, ent)
}

public RemoveFrost(id) 
{
	if(!gIsFrosted[id]) // not alive / not frozen anymore
		return;
		
	// unfreeze
	gIsFrosted[id] = false;
	set_pev(id, pev_flags, pev(id, pev_flags) & ~FL_FROZEN);
	set_pev(id, pev_gravity, 1.0)
	engfunc(EngFunc_EmitSound, id, CHAN_VOICE, gSoundBreak, 1.0, ATTN_NORM, 0, PITCH_NORM)
	
	fm_set_rendering(id)
	
	message_begin(MSG_ONE, gScreenfade, _, id);
	write_short(0); // duration
	write_short(0); // hold time
	write_short(0); // flags
	write_byte(0); // red
	write_byte(0); // green
	write_byte(0); // blue
	write_byte(0); // alpha
	message_end();
	
	static origin[3], Float:originF[3]
	pev(id, pev_origin, originF)
	FVecIVec(originF, origin)

	message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
	write_byte(TE_BREAKMODEL);
	write_coord(origin[0]);		// x
	write_coord(origin[1]);		// y
	write_coord(origin[2] + 24);	// z
	write_coord(16);		// size x
	write_coord(16);		// size y
	write_coord(16);		// size z
	write_coord(random_num(-50,50));// velocity x
	write_coord(random_num(-50,50));// velocity y
	write_coord(25);		// velocity z
	write_byte(10);			// random velocity
	write_short(gGlass);		// model
	write_byte(10);			// count
	write_byte(25);			// life
	write_byte(0x01);		// flags: BREAK_GLASS
	message_end();
}
	
CreateBlast(const origin[3]) 
{
	static Red, Green, Blue
	GetColor(Red, Green, Blue)
	
	message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
	write_byte(TE_BEAMCYLINDER);
	write_coord(origin[0]); // start X
	write_coord(origin[1]); // start Y
	write_coord(origin[2]); // start Z
	write_coord(origin[0]); // something X
	write_coord(origin[1]); // something Y
	write_coord(origin[2] + 385); // something Z
	write_short(gExplotion); // sprite
	write_byte(0); // startframe
	write_byte(0); // framerate
	write_byte(4); // life
	write_byte(60); // width
	write_byte(0); // noise
	write_byte(Red); // red
	write_byte(Green); // green
	write_byte(Blue); // blue
	write_byte(200); // brightness
	write_byte(0); // speed
	message_end();

	// medium ring
	message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
	write_byte(TE_BEAMCYLINDER);
	write_coord(origin[0]); // start X
	write_coord(origin[1]); // start Y
	write_coord(origin[2]); // start Z
	write_coord(origin[0]); // something X
	write_coord(origin[1]); // something Y
	write_coord(origin[2] + 470); // something Z
	write_short(gExplotion); // sprite
	write_byte(0); // startframe
	write_byte(0); // framerate
	write_byte(4); // life
	write_byte(60); // width
	write_byte(0); // noise
	write_byte(Red); // red
	write_byte(Green); // green
	write_byte(Blue); // blue
	write_byte(200); // brightness
	write_byte(0); // speed
	message_end();

	// largest ring
	message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
	write_byte(TE_BEAMCYLINDER);
	write_coord(origin[0]); // start X
	write_coord(origin[1]); // start Y
	write_coord(origin[2]); // start Z
	write_coord(origin[0]); // something X
	write_coord(origin[1]); // something Y
	write_coord(origin[2] + 555); // something Z
	write_short(gExplotion); // sprite
	write_byte(0); // startframe
	write_byte(0); // framerate
	write_byte(4); // life
	write_byte(60); // width
	write_byte(0); // noise
	write_byte(Red); // red
	write_byte(Green); // green
	write_byte(Blue); // blue
	write_byte(200); // brightness
	write_byte(0); // speed
	message_end();
}

GetColor(&r, &g, &b)
{
	new Color[16], Red[4], Green[4], Blue[4];
	get_pcvar_string(gCvarColor, Color, 15)
	parse(Color, Red, 3, Green, 3, Blue, 3)
	
	r = str_to_num(Red)
	g = str_to_num(Green)
	b = str_to_num(Blue)
}
Caut o persoana dedicata care se pricepe si stie ce face.
Vreau sa creeze si sa se ocupe de administrarea unui server de MU, da e vorba de vechiul joc..ma gandesc undeva la un season 3 ep1/2.

O sa achizitionez un domeniu .ro.
Totodata sponsorizez absolut orice este necesar.
Ma puteti contacta prin: http://solo.to/stfrzv
User avatar
mixatu
Membru, skill +2
Membru, skill +2
Posts: 680
Joined: 26 Apr 2012, 15:47
Detinator Steam: Da
SteamID: kzu1337
Reputatie: Membru Club eXtreamCS (1 luna)
Location: cstrike
Has thanked: 59 times
Been thanked: 29 times
Contact:

26 Apr 2012, 22:21

merge :D mersi
phroN
Membru, skill 0
Membru, skill 0
Posts: 72
Joined: 23 Apr 2013, 16:19
Detinator Steam: Da
CS Status: dNNd - [ FURiEN.LegendCs.Com ]
Detinator server CS: FURiEN.LegendCs.Co #
SteamID: PM
Location: Bc ;x
Has thanked: 15 times
Been thanked: 1 time
Contact:

28 May 2013, 17:41

Ce ai facut/modifica sa nu mearga "dmg" cand esti in smoke? :D ca am alt plugin..si vreau sa modific :) ms
FURiEN.LegendCs.Com
[BONUS-BOX-CREDiTE-ViP] (ULTIMATE MOD!)
Hei tu :P
Image
Image
Image
[1] :.FURiEN.LegendCs.Com:. # [ULTiMATE MOD!] ! :D

CONTACT :[/color] [email protected]
User avatar
Superrtaree
Membru, skill 0
Membru, skill 0
Posts: 62
Joined: 27 May 2013, 20:05
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 21 times
Been thanked: 1 time
Contact:

28 May 2013, 21:10

Askhanar wrote:nu e un plugin separat.. e un alt plugin de frostnade special pentru HNS.
enjoy.
hns_frostnades | Afiseaza codul
#include <amxmodx>
#include <fakemeta_util>

new gCvarEnabled;
new gCvarColor;
new gCvarDuration;
new gCvarDelay;
new gCvarHitself;
new gCvarDamage;
new gScreenfade
new gTrail;
new gGlass;
new gExplotion;

new const gTaskFrostnade = 3256
new const gModelGlass[] = "models/glassgibs.mdl"
new const gModelTrail[] = "sprites/laserbeam.spr"
new const gModelExplotion[] = "sprites/shockwave.spr"
new const gSoundWave[] = "warcraft3/frostnova.wav";	
new const gSoundFrosted[] = "warcraft3/impalehit.wav";	
new const gSoundBreak[] = "warcraft3/impalelaunch1.wav";

new bool:gIsFrosted[33];
new bool:gRestartAttempt[33];

public plugin_init() 
{
	register_plugin("HNS_FROSTNADE", "1.0", "Jon")
	
	gCvarEnabled = register_cvar("hns_fn_enabled", "1")
	gCvarColor = register_cvar("hns_fn_color", "75 125 255")
	gCvarDuration = register_cvar("hns_fn_duration", "5.0")
	gCvarDelay = register_cvar("hns_fn_delay", "1.0")
	gCvarHitself = register_cvar("hns_fn_hitself", "0")
	gCvarDamage = register_cvar("hns_fn_damage", "10")
	gScreenfade = get_user_msgid("ScreenFade")
	
	register_event("TextMsg", "event_RestartAttempt", "a", "2=#Game_will_restart_in");
	register_event("ResetHUD", "event_ResetHud", "be");
	register_event("DeathMsg","event_DeathMsg","a");
	
	register_forward(FM_PlayerPreThink,"fwd_PlayerPreThink");
	register_forward(FM_SetModel, "fwd_SetModel");
}

public plugin_precache()
{
	gTrail = precache_model(gModelTrail)
	gExplotion = precache_model(gModelExplotion)
	gGlass = precache_model(gModelGlass)
	
	precache_sound(gSoundWave)
	precache_sound(gSoundFrosted)
	precache_sound(gSoundBreak)
}

public event_RestartAttempt() 
{
	new players[32], num;
	get_players(players, num, "a");
	
	for (new i; i < num; ++i)
		gRestartAttempt[players] = true;
}

public event_ResetHud(id) 
{
	if (gRestartAttempt[id]) 
	{
		gRestartAttempt[id] = false;
		return;
	}
	event_PlayerSpawn(id);
}

public event_PlayerSpawn(id) 
{
	if(gIsFrosted[id]) 
		RemoveFrost(id);
}

public event_DeathMsg()
{
	new id = read_data(2);
	
	if(gIsFrosted[id])
		RemoveFrost(id)
}

public fwd_PlayerPreThink(id)
{
	if(gIsFrosted[id])
	{
		set_pev(id, pev_velocity, Float:{0.0,0.0,0.0})		
		set_pev(id, pev_flags, pev(id, pev_flags) | FL_FROZEN); 
	}
}

public fwd_SetModel(entity, const model[]) 
{
	static id
	id = pev(entity, pev_owner);
	
	if (!is_user_connected(id))
		return;
		
	if(equal(model,"models/w_smokegrenade.mdl") && get_pcvar_num(gCvarEnabled))
	{
		static Red, Green, Blue
		GetColor(Red, Green, Blue)
		
		fm_set_rendering(entity,kRenderFxGlowShell, Red, Green, Blue, kRenderNormal, 16);
		
		message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
		write_byte(TE_BEAMFOLLOW);
		write_short(entity);	// entity
		write_short(gTrail);	// sprite
		write_byte(10);		// life
		write_byte(10);		// width
		write_byte(Red);	// r
		write_byte(Green);	// g
		write_byte(Blue);	// b
		write_byte(200);	// brightness
		message_end();
		
		set_pev(entity, pev_nextthink, get_gametime() + 10.0);
		
		static args[2]
		args[0] = entity;
		args[1] = id;
		
		set_task(get_pcvar_float(gCvarDelay), "ExplodeFrost", gTaskFrostnade, args, sizeof args)
	}
}

public ExplodeFrost(const args[2]) 
{ 	
	static ent
	ent = args[0]
	
	new id = args[1];
	
	// invalid entity
	if (!pev_valid(ent)) 
		return;
	
	// get origin
	static origin[3], Float:originF[3]
	pev(ent, pev_origin, originF);
	FVecIVec(originF, origin);

	// explosion
	CreateBlast(origin);
	
	// frost nade explode sound
	engfunc(EngFunc_EmitSound, ent, CHAN_WEAPON, gSoundWave, 1.0, ATTN_NORM, 0, PITCH_NORM)
	
	// collisions
	static victim
	victim = -1;
	
	while((victim = engfunc(EngFunc_FindEntityInSphere, victim, originF, 240.0)) != 0) 
	{
		if(!is_user_alive(victim) || gIsFrosted[victim])
			continue;
			
		if(get_pcvar_num(gCvarHitself))
		{
			if(get_user_team(id) == get_user_team(victim))
			{
				if(victim != id || !is_user_alive(id))
					continue;
				
			}
		}
		
		else 
		{
				if(get_user_team(id) == get_user_team(victim))
					continue;
		}
		
		static Red, Green, Blue
		GetColor(Red, Green, Blue)		
	
		fm_set_rendering(victim, kRenderFxGlowShell, Red, Green, Blue, kRenderNormal,25)
		engfunc(EngFunc_EmitSound, victim, CHAN_WEAPON, gSoundFrosted, 1.0, ATTN_NORM, 0, PITCH_NORM)
	
		message_begin(MSG_ONE, gScreenfade, _, victim);
		write_short(~0); // duration
		write_short(~0); // hold time
		write_short(0x0004); // flags: FFADE_STAYOUT
		write_byte(Red);		// r
		write_byte(Green);		// g
		write_byte(Blue);
		write_byte(100); // alpha
		message_end();
		
		
		if(pev(victim, pev_flags) & FL_ONGROUND)
			set_pev(victim, pev_gravity, 999999.9) 
			
		else
			set_pev(victim, pev_gravity, 0.000001) 
		
		if(get_pcvar_num(gCvarDamage))
		{
			new Float:health;
			pev(victim, pev_health, health);
			
			health -= float(get_pcvar_num(gCvarDamage))
			
			if(health <= 0)
			{
				user_silentkill(victim);
				make_deathmsg(id, victim, 0, "frostnade")
			}
			
			else
				set_pev(victim, pev_health, health);
		}
		gIsFrosted[victim] = true;	
		set_task(get_pcvar_float(gCvarDuration), "RemoveFrost", victim)
	}
	
	engfunc(EngFunc_RemoveEntity, ent)
}

public RemoveFrost(id) 
{
	if(!gIsFrosted[id]) // not alive / not frozen anymore
		return;
		
	// unfreeze
	gIsFrosted[id] = false;
	set_pev(id, pev_flags, pev(id, pev_flags) & ~FL_FROZEN);
	set_pev(id, pev_gravity, 1.0)
	engfunc(EngFunc_EmitSound, id, CHAN_VOICE, gSoundBreak, 1.0, ATTN_NORM, 0, PITCH_NORM)
	
	fm_set_rendering(id)
	
	message_begin(MSG_ONE, gScreenfade, _, id);
	write_short(0); // duration
	write_short(0); // hold time
	write_short(0); // flags
	write_byte(0); // red
	write_byte(0); // green
	write_byte(0); // blue
	write_byte(0); // alpha
	message_end();
	
	static origin[3], Float:originF[3]
	pev(id, pev_origin, originF)
	FVecIVec(originF, origin)

	message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
	write_byte(TE_BREAKMODEL);
	write_coord(origin[0]);		// x
	write_coord(origin[1]);		// y
	write_coord(origin[2] + 24);	// z
	write_coord(16);		// size x
	write_coord(16);		// size y
	write_coord(16);		// size z
	write_coord(random_num(-50,50));// velocity x
	write_coord(random_num(-50,50));// velocity y
	write_coord(25);		// velocity z
	write_byte(10);			// random velocity
	write_short(gGlass);		// model
	write_byte(10);			// count
	write_byte(25);			// life
	write_byte(0x01);		// flags: BREAK_GLASS
	message_end();
}
	
CreateBlast(const origin[3]) 
{
	static Red, Green, Blue
	GetColor(Red, Green, Blue)
	
	message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
	write_byte(TE_BEAMCYLINDER);
	write_coord(origin[0]); // start X
	write_coord(origin[1]); // start Y
	write_coord(origin[2]); // start Z
	write_coord(origin[0]); // something X
	write_coord(origin[1]); // something Y
	write_coord(origin[2] + 385); // something Z
	write_short(gExplotion); // sprite
	write_byte(0); // startframe
	write_byte(0); // framerate
	write_byte(4); // life
	write_byte(60); // width
	write_byte(0); // noise
	write_byte(Red); // red
	write_byte(Green); // green
	write_byte(Blue); // blue
	write_byte(200); // brightness
	write_byte(0); // speed
	message_end();

	// medium ring
	message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
	write_byte(TE_BEAMCYLINDER);
	write_coord(origin[0]); // start X
	write_coord(origin[1]); // start Y
	write_coord(origin[2]); // start Z
	write_coord(origin[0]); // something X
	write_coord(origin[1]); // something Y
	write_coord(origin[2] + 470); // something Z
	write_short(gExplotion); // sprite
	write_byte(0); // startframe
	write_byte(0); // framerate
	write_byte(4); // life
	write_byte(60); // width
	write_byte(0); // noise
	write_byte(Red); // red
	write_byte(Green); // green
	write_byte(Blue); // blue
	write_byte(200); // brightness
	write_byte(0); // speed
	message_end();

	// largest ring
	message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
	write_byte(TE_BEAMCYLINDER);
	write_coord(origin[0]); // start X
	write_coord(origin[1]); // start Y
	write_coord(origin[2]); // start Z
	write_coord(origin[0]); // something X
	write_coord(origin[1]); // something Y
	write_coord(origin[2] + 555); // something Z
	write_short(gExplotion); // sprite
	write_byte(0); // startframe
	write_byte(0); // framerate
	write_byte(4); // life
	write_byte(60); // width
	write_byte(0); // noise
	write_byte(Red); // red
	write_byte(Green); // green
	write_byte(Blue); // blue
	write_byte(200); // brightness
	write_byte(0); // speed
	message_end();
}

GetColor(&r, &g, &b)
{
	new Color[16], Red[4], Green[4], Blue[4];
	get_pcvar_string(gCvarColor, Color, 15)
	parse(Color, Red, 3, Green, 3, Blue, 3)
	
	r = str_to_num(Red)
	g = str_to_num(Green)
	b = str_to_num(Blue)
}




unde pui aasta?
Cunostintele mele in SCRIPTING :
HTML: 10%
AMXX(pluginuri):7% (incerc sa invat .)

Image
image upload
User avatar
Errol
Membru, skill +1
Membru, skill +1
Posts: 141
Joined: 19 May 2013, 15:42
Detinator Steam: Da
CS Status: Sunt sămânţar, prin concluzie porumbel.
Detinator server CS: DR.CS32.RO
SteamID: Privat
Reputatie: Membru Club eXtreamCS (2 luni)
Location: Bistrita
Has thanked: 17 times
Been thanked: 9 times
Contact:

29 May 2013, 15:12

Superrtaree wrote:
Askhanar wrote:nu e un plugin separat.. e un alt plugin de frostnade special pentru HNS.
enjoy.
hns_frostnades | Afiseaza codul
#include <amxmodx>
#include <fakemeta_util>

new gCvarEnabled;
new gCvarColor;
new gCvarDuration;
new gCvarDelay;
new gCvarHitself;
new gCvarDamage;
new gScreenfade
new gTrail;
new gGlass;
new gExplotion;

new const gTaskFrostnade = 3256
new const gModelGlass[] = "models/glassgibs.mdl"
new const gModelTrail[] = "sprites/laserbeam.spr"
new const gModelExplotion[] = "sprites/shockwave.spr"
new const gSoundWave[] = "warcraft3/frostnova.wav";	
new const gSoundFrosted[] = "warcraft3/impalehit.wav";	
new const gSoundBreak[] = "warcraft3/impalelaunch1.wav";

new bool:gIsFrosted[33];
new bool:gRestartAttempt[33];

public plugin_init() 
{
	register_plugin("HNS_FROSTNADE", "1.0", "Jon")
	
	gCvarEnabled = register_cvar("hns_fn_enabled", "1")
	gCvarColor = register_cvar("hns_fn_color", "75 125 255")
	gCvarDuration = register_cvar("hns_fn_duration", "5.0")
	gCvarDelay = register_cvar("hns_fn_delay", "1.0")
	gCvarHitself = register_cvar("hns_fn_hitself", "0")
	gCvarDamage = register_cvar("hns_fn_damage", "10")
	gScreenfade = get_user_msgid("ScreenFade")
	
	register_event("TextMsg", "event_RestartAttempt", "a", "2=#Game_will_restart_in");
	register_event("ResetHUD", "event_ResetHud", "be");
	register_event("DeathMsg","event_DeathMsg","a");
	
	register_forward(FM_PlayerPreThink,"fwd_PlayerPreThink");
	register_forward(FM_SetModel, "fwd_SetModel");
}

public plugin_precache()
{
	gTrail = precache_model(gModelTrail)
	gExplotion = precache_model(gModelExplotion)
	gGlass = precache_model(gModelGlass)
	
	precache_sound(gSoundWave)
	precache_sound(gSoundFrosted)
	precache_sound(gSoundBreak)
}

public event_RestartAttempt() 
{
	new players[32], num;
	get_players(players, num, "a");
	
	for (new i; i < num; ++i)
		gRestartAttempt[players] = true;
}

public event_ResetHud(id) 
{
	if (gRestartAttempt[id]) 
	{
		gRestartAttempt[id] = false;
		return;
	}
	event_PlayerSpawn(id);
}

public event_PlayerSpawn(id) 
{
	if(gIsFrosted[id]) 
		RemoveFrost(id);
}

public event_DeathMsg()
{
	new id = read_data(2);
	
	if(gIsFrosted[id])
		RemoveFrost(id)
}

public fwd_PlayerPreThink(id)
{
	if(gIsFrosted[id])
	{
		set_pev(id, pev_velocity, Float:{0.0,0.0,0.0})		
		set_pev(id, pev_flags, pev(id, pev_flags) | FL_FROZEN); 
	}
}

public fwd_SetModel(entity, const model[]) 
{
	static id
	id = pev(entity, pev_owner);
	
	if (!is_user_connected(id))
		return;
		
	if(equal(model,"models/w_smokegrenade.mdl") && get_pcvar_num(gCvarEnabled))
	{
		static Red, Green, Blue
		GetColor(Red, Green, Blue)
		
		fm_set_rendering(entity,kRenderFxGlowShell, Red, Green, Blue, kRenderNormal, 16);
		
		message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
		write_byte(TE_BEAMFOLLOW);
		write_short(entity);	// entity
		write_short(gTrail);	// sprite
		write_byte(10);		// life
		write_byte(10);		// width
		write_byte(Red);	// r
		write_byte(Green);	// g
		write_byte(Blue);	// b
		write_byte(200);	// brightness
		message_end();
		
		set_pev(entity, pev_nextthink, get_gametime() + 10.0);
		
		static args[2]
		args[0] = entity;
		args[1] = id;
		
		set_task(get_pcvar_float(gCvarDelay), "ExplodeFrost", gTaskFrostnade, args, sizeof args)
	}
}

public ExplodeFrost(const args[2]) 
{ 	
	static ent
	ent = args[0]
	
	new id = args[1];
	
	// invalid entity
	if (!pev_valid(ent)) 
		return;
	
	// get origin
	static origin[3], Float:originF[3]
	pev(ent, pev_origin, originF);
	FVecIVec(originF, origin);

	// explosion
	CreateBlast(origin);
	
	// frost nade explode sound
	engfunc(EngFunc_EmitSound, ent, CHAN_WEAPON, gSoundWave, 1.0, ATTN_NORM, 0, PITCH_NORM)
	
	// collisions
	static victim
	victim = -1;
	
	while((victim = engfunc(EngFunc_FindEntityInSphere, victim, originF, 240.0)) != 0) 
	{
		if(!is_user_alive(victim) || gIsFrosted[victim])
			continue;
			
		if(get_pcvar_num(gCvarHitself))
		{
			if(get_user_team(id) == get_user_team(victim))
			{
				if(victim != id || !is_user_alive(id))
					continue;
				
			}
		}
		
		else 
		{
				if(get_user_team(id) == get_user_team(victim))
					continue;
		}
		
		static Red, Green, Blue
		GetColor(Red, Green, Blue)		
	
		fm_set_rendering(victim, kRenderFxGlowShell, Red, Green, Blue, kRenderNormal,25)
		engfunc(EngFunc_EmitSound, victim, CHAN_WEAPON, gSoundFrosted, 1.0, ATTN_NORM, 0, PITCH_NORM)
	
		message_begin(MSG_ONE, gScreenfade, _, victim);
		write_short(~0); // duration
		write_short(~0); // hold time
		write_short(0x0004); // flags: FFADE_STAYOUT
		write_byte(Red);		// r
		write_byte(Green);		// g
		write_byte(Blue);
		write_byte(100); // alpha
		message_end();
		
		
		if(pev(victim, pev_flags) & FL_ONGROUND)
			set_pev(victim, pev_gravity, 999999.9) 
			
		else
			set_pev(victim, pev_gravity, 0.000001) 
		
		if(get_pcvar_num(gCvarDamage))
		{
			new Float:health;
			pev(victim, pev_health, health);
			
			health -= float(get_pcvar_num(gCvarDamage))
			
			if(health <= 0)
			{
				user_silentkill(victim);
				make_deathmsg(id, victim, 0, "frostnade")
			}
			
			else
				set_pev(victim, pev_health, health);
		}
		gIsFrosted[victim] = true;	
		set_task(get_pcvar_float(gCvarDuration), "RemoveFrost", victim)
	}
	
	engfunc(EngFunc_RemoveEntity, ent)
}

public RemoveFrost(id) 
{
	if(!gIsFrosted[id]) // not alive / not frozen anymore
		return;
		
	// unfreeze
	gIsFrosted[id] = false;
	set_pev(id, pev_flags, pev(id, pev_flags) & ~FL_FROZEN);
	set_pev(id, pev_gravity, 1.0)
	engfunc(EngFunc_EmitSound, id, CHAN_VOICE, gSoundBreak, 1.0, ATTN_NORM, 0, PITCH_NORM)
	
	fm_set_rendering(id)
	
	message_begin(MSG_ONE, gScreenfade, _, id);
	write_short(0); // duration
	write_short(0); // hold time
	write_short(0); // flags
	write_byte(0); // red
	write_byte(0); // green
	write_byte(0); // blue
	write_byte(0); // alpha
	message_end();
	
	static origin[3], Float:originF[3]
	pev(id, pev_origin, originF)
	FVecIVec(originF, origin)

	message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
	write_byte(TE_BREAKMODEL);
	write_coord(origin[0]);		// x
	write_coord(origin[1]);		// y
	write_coord(origin[2] + 24);	// z
	write_coord(16);		// size x
	write_coord(16);		// size y
	write_coord(16);		// size z
	write_coord(random_num(-50,50));// velocity x
	write_coord(random_num(-50,50));// velocity y
	write_coord(25);		// velocity z
	write_byte(10);			// random velocity
	write_short(gGlass);		// model
	write_byte(10);			// count
	write_byte(25);			// life
	write_byte(0x01);		// flags: BREAK_GLASS
	message_end();
}
	
CreateBlast(const origin[3]) 
{
	static Red, Green, Blue
	GetColor(Red, Green, Blue)
	
	message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
	write_byte(TE_BEAMCYLINDER);
	write_coord(origin[0]); // start X
	write_coord(origin[1]); // start Y
	write_coord(origin[2]); // start Z
	write_coord(origin[0]); // something X
	write_coord(origin[1]); // something Y
	write_coord(origin[2] + 385); // something Z
	write_short(gExplotion); // sprite
	write_byte(0); // startframe
	write_byte(0); // framerate
	write_byte(4); // life
	write_byte(60); // width
	write_byte(0); // noise
	write_byte(Red); // red
	write_byte(Green); // green
	write_byte(Blue); // blue
	write_byte(200); // brightness
	write_byte(0); // speed
	message_end();

	// medium ring
	message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
	write_byte(TE_BEAMCYLINDER);
	write_coord(origin[0]); // start X
	write_coord(origin[1]); // start Y
	write_coord(origin[2]); // start Z
	write_coord(origin[0]); // something X
	write_coord(origin[1]); // something Y
	write_coord(origin[2] + 470); // something Z
	write_short(gExplotion); // sprite
	write_byte(0); // startframe
	write_byte(0); // framerate
	write_byte(4); // life
	write_byte(60); // width
	write_byte(0); // noise
	write_byte(Red); // red
	write_byte(Green); // green
	write_byte(Blue); // blue
	write_byte(200); // brightness
	write_byte(0); // speed
	message_end();

	// largest ring
	message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
	write_byte(TE_BEAMCYLINDER);
	write_coord(origin[0]); // start X
	write_coord(origin[1]); // start Y
	write_coord(origin[2]); // start Z
	write_coord(origin[0]); // something X
	write_coord(origin[1]); // something Y
	write_coord(origin[2] + 555); // something Z
	write_short(gExplotion); // sprite
	write_byte(0); // startframe
	write_byte(0); // framerate
	write_byte(4); // life
	write_byte(60); // width
	write_byte(0); // noise
	write_byte(Red); // red
	write_byte(Green); // green
	write_byte(Blue); // blue
	write_byte(200); // brightness
	write_byte(0); // speed
	message_end();
}

GetColor(&r, &g, &b)
{
	new Color[16], Red[4], Green[4], Blue[4];
	get_pcvar_string(gCvarColor, Color, 15)
	parse(Color, Red, 3, Green, 3, Blue, 3)
	
	r = str_to_num(Red)
	g = str_to_num(Green)
	b = str_to_num(Blue)
}




unde pui aasta?


Dragul meu, acela este fisierul .SMA, acel "notepad", sau in ce extensie ai tu salvate .SMA-urile, se pun in folderul 'scripting'
iar extensia .AMXX, se pune in plugins, iar pentru a functiona pluginul intri in configs, respectiv plugins.ini si adaugi.

nume_plugin.amxx, respectiv numele pluginului (Exemplu : Fata_adolescenta.Amxx) sub celelalte lini, dar sa fie salvat cum e numele extensiei "nume_plugin.amx" din folderul plugins, ai inteles ceva sau am explicat degeaba?


@ Moder : Nu au mai fost alte rendere la SH, dar acuma am unu cu Antonia`. /;)
Last edited by Errol on 29 May 2013, 16:38, edited 1 time in total.
Image
#WIZARDS to more, but I'm a hero.
-----------------------------------------------------
Lasă telefonul că ştiu actoria
Şi nu mai suna că-mi descarci bateria .


#Work only :

- [FPS Nvidia] [100%] [Public] [Here]
- [NoLag] [100%] [Public] [Here]
munir
Membru eXtream
Membru eXtream
Posts: 3193
Joined: 30 Aug 2012, 22:16
Detinator Steam: Da
CS Status: Fost scripter
Detinator server CS: Nu
SteamID: -
Reputatie: Fost super moderator
Restrictie schimbare nume
Nume anterior: falseq, cruyff
Location: Bucuresti
Has thanked: 342 times
Been thanked: 571 times
Contact:

29 May 2013, 16:31

(Exemplu : Fata_adolescenta.Amxx)
Sau
(Exemplu : Love_Inna.amxx)

:))
Retras
phroN
Membru, skill 0
Membru, skill 0
Posts: 72
Joined: 23 Apr 2013, 16:19
Detinator Steam: Da
CS Status: dNNd - [ FURiEN.LegendCs.Com ]
Detinator server CS: FURiEN.LegendCs.Co #
SteamID: PM
Location: Bc ;x
Has thanked: 15 times
Been thanked: 1 time
Contact:

29 May 2013, 17:30

phroN wrote:Ce ai facut/modifica sa nu mearga "dmg" cand esti in smoke? :D ca am alt plugin..si vreau sa modific :) ms
FURiEN.LegendCs.Com
[BONUS-BOX-CREDiTE-ViP] (ULTIMATE MOD!)
Hei tu :P
Image
Image
Image
[1] :.FURiEN.LegendCs.Com:. # [ULTiMATE MOD!] ! :D

CONTACT :[/color] [email protected]
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: Yandex [Bot] and 41 guests