Cerere Plugin :)

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
Cartias
Membru, skill +1
Membru, skill +1
Posts: 137
Joined: 29 Mar 2009, 22:16
Detinator Steam: Da
SteamID: madalin6792
Location: Rm. Sarat
Has thanked: 6 times
Contact:

28 Aug 2010, 09:32

Salut

Vreau si eu un plugin sa imi faca echipa CT in Zombi

>Ms<
User avatar
KronoS eXtream
Fost administrator
Fost administrator
Posts: 4380
Joined: 02 Apr 2009, 18:18
Detinator Steam: Da
Reputatie: Fost administrator
Fost detinator Zombie-Land.eXtream.Ro
Contribuitor
Fost Scripter eXtreamCS
Dezvoltator al listei de seriozitate eXtreamCS
Location: Bucharest
Has thanked: 543 times
Been thanked: 820 times
Contact:

28 Aug 2010, 09:46

Adica?Sa schimbi modelele?
Nu efectuez tranzactii pe mess, skype etc. Aveti grija la indivizii care se dau drept mine!
Nu mai ofer suport asa ca nu imi mai trimiteti mesaje in legatura cu asta!


Zombie Plague Shade 1.2-debug1 [with Item Limiter] (12 September 2015) - Bombardier Branch
User avatar
Venom123
Membru, skill +3
Membru, skill +3
Posts: 1341
Joined: 18 Oct 2008, 14:58
Detinator Steam: Da
Detinator server CS: ArenaDevils # Zombie
SteamID: pas
Location: Focsani
Has thanked: 79 times
Been thanked: 40 times

28 Aug 2010, 09:51

el vrea modul swarm ... a fost o data printre primele moduri de cs , Biohazard , swarm si dupa aceea plague .
La Swarm toti teroristi erau zm iar ct oameni , el vrea invers , vrea ct zm si tero oameni .
User avatar
KronoS eXtream
Fost administrator
Fost administrator
Posts: 4380
Joined: 02 Apr 2009, 18:18
Detinator Steam: Da
Reputatie: Fost administrator
Fost detinator Zombie-Land.eXtream.Ro
Contribuitor
Fost Scripter eXtreamCS
Dezvoltator al listei de seriozitate eXtreamCS
Location: Bucharest
Has thanked: 543 times
Been thanked: 820 times
Contact:

28 Aug 2010, 09:57

Venom123 wrote:el vrea modul swarm ... a fost o data printre primele moduri de cs , Biohazard , swarm si dupa aceea plague .
La Swarm toti teroristi erau zm iar ct oameni , el vrea invers , vrea ct zm si tero oameni .
Stiu Zombie Swarm doar ca nu a detaliat ce vrea.Sa schimbe modelele/sa existe o variabila globala cu valoare de adevar la ct?

https://forums.alliedmods.net/showthrea ... mbie+swarm
(resurse)
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <cstrike>
#include <engine>
#include <hamsandwich>
#include <xs>
#include <fun>
#include <round_terminator>


#define PLUGIN "Zombie Swarm"
#define VERSION "3.0 B7e"
#define AUTHOR "Mini_Midget"

/*================================================================================
 [Changeable Defines]
=================================================================================*/
#define SURVIVOR_BACKSPEED	0.9
#define SURVIVOR_PUNCHANGLE	55.0
#define ZOMBIE_SLASH_MIN		12.0
#define ZOMBIE_SLASH_MAX		20.0
#define ZOMBIE_STAB_MIN		45.0
#define ZOMBIE_STAB_MAX		65.0
#define ZOMBIE_RADIO_SPEED		70

/*================================================================================
 [CS Offesets]
=================================================================================*/
//#define OFFSET_ARMOR	112
#define DMG_HEGRENADE		(1<<24)
#define STATUSICON_BOMB	(1<<1)

/*================================================================================
 [Hide HUD]
=================================================================================*/
#define HIDE_HUD			(1<<0) //crosshair, ammo, weapons list
#define HIDE_FLASH			(1<<1)	//flashlight, +
#define HIDE_HP_HUD		(1<<3)	//Health, armour and radar
#define HIDE_MONEY			(1<<5)	//money, +
#define HIDE_NONE			(1<<7)	//+		

/*	Symbol + mean that an additional crosshair will be drawn. 
	That crosshair looks exactly like the one from Crosshair message.*/

/*================================================================================
 [Tasks Offsets]
=================================================================================*/
#define TASKID_STRIP		2046
#define TASKID_REFRESH		4573
#define TASKID_SHOWHUD	2931
#define TASKID_MODEL		3810 
#define TASKID_NVG			8382
#define TASKID_PISTOL		2347
#define TASKID_ROUND		3769

/*================================================================================
 [Classnames]
=================================================================================*/
#define CLASS_WEATHER	"zswarm_weather"
#define CLASS_AMBIENCE	"zswarm_ambience"
#define CLASS_FLESH		"flesh throw"

new g_fw_spawn
new const g_Map_Entities[][] = 
{ 
	"info_map_parameters",
	"func_bomb_target",    
	"info_bomb_target", 
	"hostage_entity",      
	"monster_scientist", 
	"func_hostage_rescue", 
	"info_hostage_rescue",
	"info_vip_start",       
	"func_vip_safetyzone", 
	"func_escapezone"
}

/*================================================================================
 [Sounds/Waves]
=================================================================================*/
new const g_sound_thunder1[] =		"ambience/thunder_clap.wav"
new const g_sound_thunder2[] =		"de_torn/torn_thndrstrike.wav"
//new const g_sound_ambience[] =		"zombie_swarm/ambience.wav"

new const g_sound_roundstart[][] =
{
	"zombie_swarm/GermM1a.wav",
	"zombie_swarm/BoomerBacteria.wav",
	"zombie_swarm/HunterBacteria.wav",
	"zombie_swarm/HunterBacteriaS.wav"
}

new const g_sound_zombiewin[] = 	"zombie_swarm/LeftForDeathHit.wav"

new const g_sound_humanwin[] =		"zombie_swarm/themonsterswithout.wav"

new const g_sound_miss[][] =
{ 
	"zombie/claw_miss1.wav", 
	"zombie/claw_miss2.wav" 
}

new const g_sound_hit[][] = 
{ 
	"zombie/claw_strike1.wav", 
	"zombie/claw_strike2.wav",
	"zombie/claw_strike3.wav" 
}
new const g_sound_pain[][] =
{
	"aslave/slv_pain1.wav",
	"aslave/slv_pain2.wav", 
	"headcrab/hc_pain1.wav",
	"headcrab/hc_pain2.wav",
	"headcrab/hc_pain3.wav",
	"zombie/zo_pain1.wav",
	"zombie/zo_pain2.wav"
}

new const g_sound_die[][] =
{
	"aslave/slv_die1.wav",
	"aslave/slv_die2.wav",
	"bullchicken/bc_die1.wav",
	"bullchicken/bc_die3.wav",
	"headcrab/hc_die1.wav",
	"headcrab/hc_die2.wav"
}

new const g_SendAudio_Radio[][] =
{
	"%!MRAD_COVERME",
	"%!MRAD_TAKEPOINT",
	"%!MRAD_POSITION",
	"%!MRAD_REGROUP",
	"%!MRAD_FOLLOWME",
	"%!MRAD_HITASSIST",
	"%!MRAD_GO",				//Conflicts with round start audio
	"%!MRAD_FALLBACK",
	"%!MRAD_STICKTOG",
	"%!MRAD_GETINPOS",
	"%!MRAD_STORMFRONT",
	"%!MRAD_REPORTIN",
	"%!MRAD_AFFIRM",
	"%!MRAD_ROGER",
	"%!MRAD_ENEMYSPOT",
	"%!MRAD_BACKUP",
	"%!MRAD_CLEAR",
	"%!MRAD_INPOS",
	"%!MRAD_REPRTINGIN",
	"%!MRAD_BLOW",
	"%!MRAD_NEGATIVE",
	"%!MRAD_ENEMYDOWN"
}

new const g_SendAudio_RoundStart[][] =
{
	// "%!MRAD_GO",				//Conflicts with client radio command
	"%!MRAD_LETSGO",
	"%!MRAD_MOVEOUT",
	"%!MRAD_LOCKNLOAD"
}

/*================================================================================
 [Models]
=================================================================================*/
new const ZOMBIE_PLAYER_MODEL[] =	"zombie_swarm";
new const ZOMBIE_MODEL[] = 			"models/player/zombie_swarm/zombie_swarm.mdl";
new const ZOMBIE_CLAWS[] = 			"models/v_knife_zombie.mdl";
new const ZOMBIE_FLESHTHROW[] = 	"models/hgibs.mdl";	//11 Submodels
	
new mdl_gib_flesh, mdl_gib_head, mdl_gib_legbone
new mdl_gib_lung, mdl_gib_meat, mdl_gib_spine
new spr_blood_drop, spr_blood_spray

/*================================================================================
 [Global Variables]
=================================================================================*/
new mod_name[32] = "Zombie Swarm";
new player_model[33][32];
new Float: g_counter;

new bool: g_zombie[33];
new bool: g_infreezetime;
new bool: g_model[33];
new Float: g_LastLeap[33];
new Float: g_LastFthrow[33];
new g_hitgroups[33];
new bool: g_WeapRecieved[33];
new bool: g_GivePistol[33];
new bool: g_RoundStarted;

new players_weapon[33][31];
new CsArmorType:armortype[33];
new armoramount[33];
new Float:display_damage[33];

stock const WeaponNames[31][] = {
	"",
	"weapon_p228",
	"weapon_shield",
	"weapon_scout",
	"weapon_hegrenade",
	"weapon_xm1014",
	"",
	"weapon_mac10",
	"weapon_aug",
	"weapon_smokegrenade",
	"weapon_elite",
	"weapon_fiveseven",
	"weapon_ump45",
	"weapon_sg550",
	"weapon_galil",
	"weapon_famas",
	"weapon_usp",
	"weapon_glock18",
	"weapon_awp",
	"weapon_mp5navy",
	"weapon_m249",
	"weapon_m3",
	"weapon_m4a1",
	"weapon_tmp",
	"weapon_g3sg1",
	"weapon_flashbang",
	"weapon_deagle",
	"weapon_sg552",
	"weapon_ak47",
	"",
	"weapon_p90"
}
new bool: g_light_flashing
new g_light_style[3][2] = { "b", "a", "m" }
new g_light_stylenum
new g_light_counter
new g_light_num

new g_maxplayers
new g_roundcounter

new msg_hideweapon /*, msg_statusicon*/
new g_hudsync

/*================================================================================
 [CVARS]
=================================================================================*/
new cvar_switch, cvar_health, cvar_armour, cvar_gravity, cvar_footsteps, cvar_speed, cvar_skyname, cvar_lights,
cvar_autonvg, cvar_blocknvg, cvar_leap, cvar_leapcd, cvar_lforce, cvar_lheight, cvar_fleshthrow,
cvar_fforce, cvar_fleshdmg, cvar_fselfdmg, cvar_dmg_hp, cvar_dmg_ap, cvar_crosshair,
cvar_rounds, cvar_teams, cvar_breakents

/*================================================================================
 [Precache]
=================================================================================*/
public plugin_precache()  
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_cvar(PLUGIN, VERSION, FCVAR_SPONLY|FCVAR_SERVER)
	set_cvar_string(PLUGIN, VERSION)
	register_dictionary("zombie_swarm.txt")
	register_concmd("zombie_swarm", "concmd_zombieswarm", ADMIN_BAN, "<0/1> Disable/Enable Zombie Swarm")
	
	cvar_switch = register_cvar("zswarm_enable", "1")
	
	if (!get_pcvar_num(cvar_switch)) return
	
	precache_model(ZOMBIE_CLAWS);
	// precache_model(ZOMBIE_CLAWS);
	precache_model(ZOMBIE_MODEL);
	
	precache_sound(g_sound_thunder1);
	precache_sound(g_sound_thunder2);
	precache_sound(g_sound_zombiewin);
	precache_sound(g_sound_humanwin);
	
	precache_model(ZOMBIE_FLESHTHROW);
	
	mdl_gib_flesh = precache_model("models/Fleshgibs.mdl")
	mdl_gib_meat = precache_model("models/GIB_B_Gib.mdl")
	mdl_gib_head = precache_model("models/GIB_Skull.mdl")

	mdl_gib_spine = precache_model("models/GIB_B_Bone.mdl")
	mdl_gib_lung = precache_model("models/GIB_Lung.mdl")
	mdl_gib_legbone = precache_model("models/GIB_Legbone.mdl")
	
	spr_blood_drop = precache_model("sprites/blood.spr")
	spr_blood_spray = precache_model("sprites/bloodspray.spr")
	//engfunc(EngFunc_PrecacheSound, g_sound_ambience);
	
	new iNum
	for (iNum = 0; iNum < sizeof g_sound_miss; iNum++)
		precache_sound(g_sound_miss[iNum])
	for (iNum = 0; iNum < sizeof g_sound_hit; iNum++)
		precache_sound(g_sound_hit[iNum])
	for (iNum = 0; iNum < sizeof g_sound_pain; iNum++)
		precache_sound(g_sound_pain[iNum])
	for (iNum = 0; iNum < sizeof g_sound_die; iNum++)
		precache_sound(g_sound_die[iNum])
	for (iNum = 1; iNum < sizeof g_sound_roundstart; iNum++)
		precache_sound(g_sound_roundstart[iNum])
	
	new iEntity = create_entity(g_Map_Entities[0]);	//info_map_parameters
	DispatchKeyValue( iEntity, "buying", "1" );		//0 - Anyone can buy, 1 - T's can't buy, 2 - CT's can't buy, 3 - No one can buy
	DispatchSpawn( iEntity );
	
	g_fw_spawn = register_forward(FM_Spawn, "fw_spawn")

}

/*================================================================================
 [Plugin start]
=================================================================================*/
public plugin_init() 
{
	if (!get_pcvar_num(cvar_switch)) return
	
	cvar_health		=	register_cvar("zswarm_health",	"1500")
	cvar_armour		=	register_cvar("zswarm_armour",	"750")
	cvar_gravity		=	register_cvar("zswarm_gravity",	"700")
	cvar_speed		=	register_cvar("zswarm_speed",	"350")
	cvar_footsteps	=	register_cvar("zswarm_footsteps",	"1")
		
	cvar_lights		=	register_cvar("zswarm_light",	"1")
	cvar_skyname		=	register_cvar("zswarm_skyname",	"space")
	cvar_rounds		=	register_cvar("zswarm_rounds",	"5")
	cvar_teams		=	register_cvar("zswarm_blockteams", "1")
	
	cvar_autonvg		=	register_cvar("zswarm_autonvg",	"1")
	cvar_blocknvg	=	register_cvar("zswarm_blocknvg","1")
	
	cvar_leap		=	register_cvar("zswarm_leap",	"1")
	cvar_leapcd		=	register_cvar("zswarm_cooldown","5.0")
	cvar_lforce		=	register_cvar("zswarm_lforce",	"525")
	cvar_lheight		=	register_cvar("zswarm_lheight",	"260")
	
	cvar_fleshthrow	=	register_cvar("zswarm_fleshthrow", "1")
	cvar_fforce		=	register_cvar("zswarm_fforce",	"1500")
	cvar_fleshdmg	=	register_cvar("zswarm_fleshdmg","20")
	cvar_fselfdmg		=	register_cvar("zswarm_fselfdmg","100")
	cvar_breakents	=	register_cvar("zswarm_breakents", "1")
	
	cvar_crosshair	=	register_cvar("zswarm_crosshair", "1")
	
	cvar_dmg_hp		=	register_cvar("zswarm_dmg_hp_percent",	"50")
	cvar_dmg_ap		=	register_cvar("zswarm_dmg_ap_percent",	"35")
	
	
	RegisterHam(Ham_Spawn,		"player",			"bacon_spawn", 1)
	RegisterHam(Ham_TakeDamage,"player",			"bacon_takedamage")
	RegisterHam(Ham_TakeDamage,"player",			"bacon_takedamage_post" , 1 )
	RegisterHam(Ham_Killed,		"player",			"bacon_killed_post", 1)
	RegisterHam(Ham_Touch,		"weaponbox",		"bacon_touch")
	RegisterHam(Ham_Touch,		"armoury_entity",	"bacon_touch")
	RegisterHam(Ham_Touch,		"weapon_shield",	"bacon_touch")
	
	register_logevent("Round_Start", 2,	"1=Round_Start")
	register_logevent("Round_End"	, 2,	"1=Round_End")  
	register_event("TextMsg", "Round_End", "a", "2&#Game_C", "2&#Game_w" );
	register_event("HLTV", 			"event_new_round",	"a", "1=0", "2=0")
	register_event("CurWeapon",		"event_cur_weapon",	"be")

	register_message(get_user_msgid("ScoreAttrib"),	"message_ScoreAttrib")
	register_message(get_user_msgid("StatusIcon"), 	"message_StatusIcon")
	register_message(get_user_msgid("TextMsg"),		"message_TextMessage")
	register_message(get_user_msgid("SendAudio"),	"message_SendAudio")
	register_message(get_user_msgid("Health"),		"message_Health")
	register_message(get_user_msgid("RoundTime"),	"message_RoundTimer");

	register_clcmd("nightvision",	"clcmd_nightvision")
	register_clcmd("chooseteam", "clcmd_teams")
	
	new iEnt = create_entity("ambient_generic");
	if(iEnt) 
	{		
		call_think(iEnt);
		entity_set_string(iEnt, EV_SZ_classname, CLASS_WEATHER);
		
		DispatchKeyValue(iEnt, "message", g_sound_thunder1);
		DispatchKeyValue(iEnt, "targetname", "boom");
		DispatchKeyValue(iEnt, "pitchstart", "100");
		DispatchKeyValue(iEnt, "pitch", "100") ;
		DispatchKeyValue(iEnt, "health", "10");
		DispatchKeyValue(iEnt, "spawnflags", "49");
		
		DispatchSpawn(iEnt);
		set_pev(iEnt, pev_nextthink, get_gametime() + 2.0);
		
	}

	if(g_fw_spawn > 0)
		unregister_forward(FM_Spawn, g_fw_spawn)
		
	format(mod_name, 31, "%s %s", PLUGIN, VERSION)
	register_forward(FM_GetGameDescription,		"fw_GameDescription")
	register_forward(FM_PlayerPreThink,	   		"fw_PlayerPreThink", 1)
	register_forward(FM_SetClientKeyValue,		"fw_SetClientKeyValue")
	register_forward(FM_ClientUserInfoChanged,	"fw_ClientUserInfoChanged")
	register_forward(FM_EmitSound,				"fw_EmitSound")
	register_forward(FM_Touch,					"fw_Touch")
	register_forward(FM_Think,					"fw_Think_lights",	1)
	register_forward(FM_TraceLine,				"fw_Traceline", 1)
	
	msg_hideweapon	= 	get_user_msgid("HideWeapon")
	//msg_statusicon	=	get_user_msgid("StatusIcon")
	
	// set_msg_block(get_user_msgid("ClCorpse"), BLOCK_SET)

	g_hudsync		=	CreateHudSyncObj()
	
	g_maxplayers		=	get_maxplayers()
	
	new skyname[32]
	get_pcvar_string(cvar_skyname, skyname, 31)
	
	set_cvar_string("sv_skyname", skyname)
	set_cvar_num("sv_skycolor_r", 0) 
	set_cvar_num("sv_skycolor_g", 0)
	set_cvar_num("sv_skycolor_b", 0)
	server_cmd("sv_maxspeed 2000")
}

public client_putinserver(id)
{
	g_zombie[id] = false;
}

public client_impulse(id, impulse)
{		
	if(g_zombie[id] && impulse == 100)
		return PLUGIN_HANDLED_MAIN

	return PLUGIN_CONTINUE
}

public fw_GameDescription() 
{ 
	forward_return(FMV_STRING, mod_name)
	
	return FMRES_SUPERCEDE
}  

public concmd_zombieswarm(id, level, cid) 
{
	if (!cmd_access(id, level, cid, 1))
		return PLUGIN_HANDLED
	
	new sz_arg[8]
	read_argv(1, sz_arg, 7)
	
	if ( equali(sz_arg, "1") || equali(sz_arg, "on") || equali(sz_arg, "enable") ) 
	{
		set_task(5.0, "Task_Restart") 
		set_pcvar_num(cvar_switch, 1)
		
		set_hudmessage(255, 255, 255, -1.0, 0.25, 0, 1.0, 5.0, 0.1, 0.2, -1)
		show_hudmessage(0, "%L", LANG_PLAYER, "PLUGIN_HON_MSG", PLUGIN)
		
		console_print(0, "%L", LANG_PLAYER, "PLUGIN_TON_MSG", PLUGIN)
		for(new i = 1; i < 6; i++)
			client_print(0, print_chat, "%L", LANG_PLAYER, "PLUGIN_TON_MSG", PLUGIN)
		
		return PLUGIN_HANDLED
	}
	else if ( equali(sz_arg, "0") || equali(sz_arg, "off") || equali(sz_arg, "disable") ) 
	{		
	
		set_task(5.0, "Task_Restart") 
		set_pcvar_num(cvar_switch, 0)		
				
		set_hudmessage(255, 255, 255, -1.0, 0.25, 0, 1.0, 5.0, 0.1, 0.2, -1)
		show_hudmessage(0, "%L", LANG_PLAYER, "PLUGIN_HOFF_MSG", PLUGIN)
		
		console_print(0, "%L", LANG_PLAYER, "PLUGIN_TOFF_MSG", PLUGIN)
		for(new i = 1; i < 6; i++)
			client_print(0, print_chat, "%L", LANG_PLAYER, "PLUGIN_TOFF_MSG", PLUGIN)
				
		return PLUGIN_HANDLED
	}
	
	console_print(id,  "Invalid argument!")
	
	return PLUGIN_HANDLED
}

public bacon_spawn(id)
{	
	if (!is_user_alive(id))
		return
	
	static CsTeams: team ; team = cs_get_user_team(id)
	
	if (team == CS_TEAM_CT) //Terr
	{
		new health, Float:gravity, armour, footsteps
		health	=	get_pcvar_num(cvar_health)
		gravity	=	get_pcvar_float(cvar_gravity) / 800
		armour	=	get_pcvar_num(cvar_armour)
		footsteps	=	get_pcvar_num(cvar_footsteps)
		
		g_zombie[id] = true
		
		if(!task_exists(TASKID_STRIP + id))
			set_task(0.2, "Task_Strip", TASKID_STRIP + id)
		
		set_pev(id, pev_max_health, float(health));
		set_user_health(id, health);
		cs_set_user_armor(id, armour, CS_ARMOR_VESTHELM);
		set_user_gravity(id, gravity);
		set_user_footsteps(id, footsteps);
		set_user_rendering(id);
		
		if (!cs_get_user_nvg(id))
			cs_set_user_nvg(id);
		
		if (get_pcvar_num(cvar_autonvg))
			set_task(0.2, "Task_NVG", TASKID_NVG + id);
		
		copy(player_model[id], 31, ZOMBIE_PLAYER_MODEL);
		
		new currentmodel[32];
		fm_get_user_model(id, currentmodel, charsmax(currentmodel) );
		
		if(!equal(currentmodel, player_model[id]))
		{
			set_task(0.5 + g_counter, "Task_Model", id + TASKID_MODEL);
			g_counter += 0.2;
		}
		
		new rand_num = random_num(0, 1);
		if (get_pcvar_num(cvar_leap) && (rand_num == 0))
			client_print(id, print_chat, "%L", LANG_PLAYER, "LEAP_MSG", get_pcvar_num(cvar_leapcd));
			
		else if (get_pcvar_num(cvar_fleshthrow) && (rand_num == 1))
			client_print(id, print_chat, "%L", LANG_PLAYER, "FLESH_MSG", get_pcvar_num(cvar_fleshdmg), get_pcvar_num(cvar_fselfdmg));

		if(!task_exists(TASKID_SHOWHUD + id))
			set_task(0.2, "Task_ShowHUD", TASKID_SHOWHUD + id);
			
	}
	else if (team == CS_TEAM_T) // CT
	{
		set_pev(id, pev_max_health, 100.0);
		g_zombie[id] = false;
		fm_reset_user_model(id);
		set_user_footsteps(id, 0);
		set_user_rendering(id);
	}
}

//Credits to Bugsy!!!
public bacon_takedamage(victim, inflictor, attacker, Float:damage, damagetype)
{ 
	if ( damagetype & DMG_GENERIC || /*victim == attacker ||*/ !is_user_alive(victim) || !is_user_connected( attacker ) ) 
		return HAM_IGNORED;

	new CsArmorType: ArmorType, iArmor = cs_get_user_armor( victim , ArmorType );

	new iDmgHP = floatround( damage * (get_pcvar_float(cvar_dmg_hp) / 100.0) ); 
	new iDmgArmor = floatround( damage * (get_pcvar_float(cvar_dmg_ap) / 100.0) ); //or 0.35 
	new iHealth = get_user_health( victim );
	new maxArmour = get_pcvar_num(cvar_armour);

	if ( ((iHealth - iDmgHP) > 0) && (g_zombie[victim]) && (iArmor) )
	{ 
		ExecuteHam( Ham_TakeDamage , victim , inflictor , attacker , 0.0 , DMG_BULLET | DMG_NEVERGIB );
		set_user_health( victim , iHealth - iDmgHP ); 
		cs_set_user_armor( victim , clamp( iArmor - iDmgArmor , 0 , maxArmour), ArmorType ); 
		display_damage[ victim ] = float( iDmgHP );

		// *** for testing ***
		// client_print( iAttacker , print_chat , "Adjusted Damage = %d" , iDmgHP );

		return HAM_SUPERCEDE;     
	} 
	
	new weapon = get_user_weapon(attacker);
	if( (weapon == CSW_KNIFE) && (!g_zombie[victim]) )
	{
		new button = get_user_button(attacker);
		
		if ( button & IN_ATTACK)     
			damage = random_float(ZOMBIE_SLASH_MIN, ZOMBIE_SLASH_MAX);
		else if ( button & IN_ATTACK2)
			damage = random_float(ZOMBIE_STAB_MIN, ZOMBIE_STAB_MAX);
		
		if(g_hitgroups[victim] == HIT_HEAD)
			damage = damage * 1.5;
			
		SetHamParamFloat(4, damage);
		
		return HAM_HANDLED;
	}

	return HAM_IGNORED;
} 

//Credits to Bugsy!!!
public bacon_takedamage_post(victim, inflictor, attacker, Float:damage, damagetype)
{ 
    if ( display_damage[victim])
    {
        set_pev(victim, pev_dmg_take, display_damage[victim]);
        display_damage[victim] = 0.0;
    }
	
	else if( is_user_alive(victim) || is_user_connected(attacker))
	{
		if(!g_zombie[victim])
		{
			if(damage >= SURVIVOR_PUNCHANGLE)
			{
				new Float: Angle[3];
				for(new i = 0 ; i < 3 ; i++)
					Angle = random_float(-45.0, 45.0);
					
				set_pev(victim, pev_punchangle, Angle);
			}
		}
	}
}

public bacon_killed_post(id, iKiller)
{
	if(g_zombie[id])
	{
		static Victim_Origin[3]
		get_user_origin(id, Victim_Origin);
		
		// entity_set_int(id, EV_INT_effects, entity_get_int(id, EV_INT_effects) | EF_NODRAW);
		set_user_rendering(id, kRenderFxGlowShell, 0, 0 , 0, kRenderTransAlpha, 0)
		//Credits to JTP10181 for his amx_gore_ultimate!!!
		new flesh[2]
		flesh[0] = mdl_gib_flesh
		flesh[1] = mdl_gib_meat
		new gibtime = 100 //10 seconds

		// Gib explosions

		// Head
		message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
		write_byte(TE_MODEL)
		write_coord(Victim_Origin[0])
		write_coord(Victim_Origin[1])
		write_coord(Victim_Origin[2] + 40)
		write_coord(random_num(0, 80))
		write_coord(random_num(0, 80))
		write_coord(random_num(80, 200))
		write_angle(random_num(0, 360))
		write_short(mdl_gib_head)
		write_byte(0) // bounce
		write_byte(gibtime) // life
		message_end()

		// Parts
		for(new i = 0; i < 4; i++) 
		{
			message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
			write_byte(TE_MODEL)
			write_coord(Victim_Origin[0])
			write_coord(Victim_Origin[1])
			write_coord(Victim_Origin[2])
			write_coord(random_num(0,80))
			write_coord(random_num(0,80))
			write_coord(random_num(80, 200))
			write_angle(random_num(0,360))
			write_short(flesh[random_num(0,1)])
			write_byte(0) // bounce
			write_byte(gibtime) // life
			message_end()
		}

		// Spine
		message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
		write_byte(TE_MODEL)
		write_coord(Victim_Origin[0])
		write_coord(Victim_Origin[1])
		write_coord(Victim_Origin[2]+30)
		write_coord(random_num(0,80))
		write_coord(random_num(0,80))
		write_coord(random_num(80, 200))
		write_angle(random_num(0,360))
		write_short(mdl_gib_spine)
		write_byte(0) // bounce
		write_byte(gibtime) // life
		message_end()

		// Lung
		for(new i = 0; i <= 1; i++) 
		{
			message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
			write_byte(TE_MODEL)
			write_coord(Victim_Origin[0])
			write_coord(Victim_Origin[1])
			write_coord(Victim_Origin[2]+10)
			write_coord(random_num(0,80))
			write_coord(random_num(0,80))
			write_coord(random_num(80, 200))
			write_angle(random_num(0,360))
			write_short(mdl_gib_lung)
			write_byte(0) // bounce
			write_byte(gibtime) // life
			message_end()
		}

		//Legs
		for(new i = 0; i <= 1; i++) 
		{
			message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
			write_byte(TE_MODEL)
			write_coord(Victim_Origin[0])
			write_coord(Victim_Origin[1])
			write_coord(Victim_Origin[2]-10)
			write_coord(random_num(0,80))
			write_coord(random_num(0,80))
			write_coord(random_num(80, 200))
			write_angle(random_num(0,360))
			write_short(mdl_gib_legbone)
			write_byte(0) // bounce
			write_byte(gibtime) // life
			message_end()
		}

		message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
		write_byte(TE_BLOODSPRITE)
		write_coord(Victim_Origin[0])
		write_coord(Victim_Origin[1])
		write_coord(Victim_Origin[2]+20)
		write_short(spr_blood_spray)
		write_short(spr_blood_drop)
		write_byte(247) // color index
		write_byte(20) // size
		message_end()
		
		message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
		write_byte(TE_WORLDDECAL)
		write_coord(Victim_Origin[0] + random_num(-50,50))
		write_coord(Victim_Origin[1] + random_num(-50,50))
		write_coord(Victim_Origin[2] - 36)
		write_byte(random_num(204, 205)) // index
		message_end()
		
		for(new i = 0 ; i < 8 ; i++)
		{
			message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
			write_byte(TE_WORLDDECAL)
			write_coord(Victim_Origin[0] + random_num(-100,100))
			write_coord(Victim_Origin[1] + random_num(-100,100))
			write_coord(Victim_Origin[2] - 36)
			write_byte(random_num(190, 197)) // index
			message_end()
		}
	}
}  

public event_new_round()
{
	g_infreezetime = true
			
	for(new i = 1 ; i <= g_maxplayers; i++)
	{
		if(g_WeapRecieved)
			give_weapons(i)
		else if (g_GivePistol)
			 set_task(0.1, "Task_Give_Pistol", TASKID_PISTOL + i);
			
		set_task(0.2, "Task_Refresh", TASKID_REFRESH + i)
	}
	
	g_roundcounter++;
	
	new rounds = get_pcvar_num(cvar_rounds);
	
	if(rounds > 0)
		client_print(0, print_chat, "%L", LANG_PLAYER, "ROUND_COUNTER", g_roundcounter, rounds);	
		
}

public Round_Start()
{
	g_RoundStarted = true;
	
	g_infreezetime = false;
}

public Round_End()
{
	remove_task(TASKID_ROUND);
	
	g_counter = 0.0

	new rounds = get_pcvar_num(cvar_rounds)
	
	if(rounds > 0)
	{
		if ( g_roundcounter >= rounds )
		{
			g_roundcounter = 0

			client_print(0, print_chat, "%L", LANG_PLAYER, "ROUND_CHANGE")

			for(new i = 1 ; i <= g_maxplayers; i++)
			{
				if (!is_user_connected(i))
					continue;

				switch(cs_get_user_team(i))
				{

					case CS_TEAM_UNASSIGNED, CS_TEAM_SPECTATOR:
						continue;

					case CS_TEAM_CT:
					{
						if(is_user_alive(i))
						{
							if(!g_WeapRecieved)
								g_GivePistol = true;
						}
						else
						{
							if(g_WeapRecieved)
							{
								g_WeapRecieved = false;
							}
						}
						
						cs_set_user_team(i, CS_TEAM_CT)
						g_zombie = true;
					}

					case CS_TEAM_T:
					{
						if(is_user_alive(i))
						{
							g_WeapRecieved = true;
							get_weapons(i);
						}
						else
						{
							g_WeapRecieved = false;
						}
							
						cs_set_user_team(i, CS_TEAM_T)
						g_zombie[i] = false;

					}

				}
			}
		}
	}

}

public get_weapons(id)
{
	arrayset(players_weapon[id], 0, 31)
	if(is_user_alive(id))
	{
		armoramount[id] = cs_get_user_armor(id, armortype[id])
		for( new i = 1 ; i <= 30 ; i++)
		{
			if(i != 2 && i != CSW_C4 && i != CSW_KNIFE)
			{
				if(user_has_weapon(id, i))
				{
					players_weapon[id][i] = cs_get_user_bpammo(id, i)
					if(!players_weapon[id][i])  
						players_weapon[id][i] = 1
						
				}
			}
		}
	}
}

public give_weapons(id)
{
	if(is_user_alive(id) && !g_zombie[id])
	{
		cs_set_user_armor(id, armoramount[id], armortype[id])
		strip_user_weapons(id)
		for( new i = 1 ; i <= 30 ; i++)
		{
			if(/* i != 2 &&  */i != CSW_C4 && i != CSW_KNIFE)
			{
				if(players_weapon[id][i])
				{
					give_item(id, WeaponNames[i])
					cs_set_user_bpammo(id, i, players_weapon[id][i])
				}
			}
		}
		give_item(id, "weapon_knife")
		g_WeapRecieved[id] = false;
	}
}

public Task_Give_Pistol(task)
{
	new id = task - TASKID_PISTOL;
	
	if(is_user_alive(id)) 
	{
		strip_user_weapons(id);
		give_item(id, "weapon_knife");
		give_item(id, "weapon_usp");
		give_item(id, "ammo_45acp");
		give_item(id, "ammo_45acp");
		cs_set_user_armor(id, 0, CS_ARMOR_NONE);
		g_GivePistol[id] = false; 	
	}
}

public event_cur_weapon(id)
{
	if(!is_user_alive(id))
		return PLUGIN_HANDLED
	
	if (g_zombie[id])
	{
		new weapon = read_data(2)
		
		if (weapon != CSW_KNIFE)
		{ 
			engclient_cmd(id, "weapon_knife")
			set_pev(id, pev_viewmodel2, ZOMBIE_CLAWS)
			set_pev(id, pev_weaponmodel2, "")
		}
		
		message_begin(MSG_ONE_UNRELIABLE, msg_hideweapon, _ , id)
		write_byte(HIDE_HUD | HIDE_FLASH | HIDE_HP_HUD | HIDE_MONEY)
		message_end()
	}
	else
	{
		if (get_pcvar_num(cvar_crosshair))
		{
			message_begin(MSG_ONE_UNRELIABLE, msg_hideweapon, _ , id)
			write_byte(HIDE_NONE)
			message_end()
		}
	}
	
	return PLUGIN_CONTINUE
}

public message_ScoreAttrib(msg_id, msg_dest, id)
{
	new attrib = get_msg_arg_int(2)
	if(attrib == STATUSICON_BOMB)
		set_msg_arg_int(2, ARG_BYTE, 0)
}

public message_StatusIcon(msg_id, msg_dest, id)
{
	if(!is_user_connected(id) || !g_zombie[id])
		return PLUGIN_CONTINUE;
		
	new icon[4]; get_msg_arg_string(2, icon, charsmax(icon) );
	if(equal(icon, "buy"))
		return PLUGIN_HANDLED;
		
	else if (equal(icon, "c4"))
	{
		engclient_cmd(id, "drop", "weapon_c4");
		set_task(0.1, "Task_C4");
		return PLUGIN_HANDLED;
	}
		
	return PLUGIN_CONTINUE;
}
  
public message_TextMessage(msg_id, msg_dest, id)
{
	if(get_msg_arg_int(1) != 4)
		return PLUGIN_CONTINUE
	
	new text_msg[25], win_msg[32]
	get_msg_arg_string(2, text_msg, charsmax(text_msg) )
	
	if(equal(text_msg[1], "Game_bomb_drop") || equal(text_msg[1], "Terrorist_cant_buy"))
		return PLUGIN_HANDLED

	else if(equal(text_msg[1], "Terrorists_Win"))
	{
		formatex(win_msg, charsmax(win_msg), "%L", LANG_SERVER, "WIN_ZOMBIE")
		set_msg_arg_string(2, win_msg)
	}
	else if(equal(text_msg[1], "Target_Saved") || equal(text_msg[1], "CTs_Win"))
	{
		formatex(win_msg, charsmax(win_msg) , "%L", LANG_SERVER, "WIN_HUMAN")
		set_msg_arg_string(2, win_msg)
	}
	return PLUGIN_CONTINUE
}

public message_SendAudio(msg_id, msg_dest, id)
{
	new AudioCode[22]; 
	get_msg_arg_string(2, AudioCode, charsmax(AudioCode) )
	
	for(new i = 0 ; i < sizeof g_SendAudio_Radio ; i++)
	{
		if(g_zombie[id])
		{
			if(equal(AudioCode, g_SendAudio_Radio[i]))
				set_msg_arg_int(3, ARG_SHORT, ZOMBIE_RADIO_SPEED)
		}
	}
	for(new i = 0 ; i < sizeof g_SendAudio_RoundStart ; i++)
	{
		if(equal(AudioCode, g_SendAudio_RoundStart[i]))
			set_msg_arg_string(2, g_sound_roundstart[random(sizeof g_sound_roundstart)])
	}
	
	if(equal(AudioCode, "%!MRAD_terwin"))
		set_msg_arg_string(2, g_sound_zombiewin)
		
	else if(equal(AudioCode, "%!MRAD_ctwin"))
		set_msg_arg_string(2, g_sound_humanwin)		
	
	return PLUGIN_CONTINUE
}

public message_Health(msg_id, msg_dest, id)
{
	if(!is_user_alive(id))
		return PLUGIN_CONTINUE
	
	static health ; health = get_msg_arg_int(1)
	
	if(health > 255 && (health % 256) == 0)
		set_msg_arg_int(1, ARG_BYTE, ++health)
	
	return PLUGIN_CONTINUE
}

public message_RoundTimer()
{
	if(g_RoundStarted) 
	{
		g_RoundStarted = false;

		set_task( float( get_msg_arg_int( 1 ) ), "Task_RoundEnd", TASKID_ROUND );
	}
}
	
public clcmd_nightvision(id)
{
	if(!g_zombie[id] && get_pcvar_num(cvar_blocknvg) && cs_get_user_nvg(id))
	{
		client_print(id, print_center, "%L", LANG_PLAYER, "BLOCK_NVG")
		return PLUGIN_HANDLED
	}
		
	return PLUGIN_CONTINUE
}

public clcmd_teams(id)
{
	if (!get_pcvar_num(cvar_teams))
		return PLUGIN_CONTINUE
		
	client_print(id, print_center, "%L", LANG_PLAYER, "BLOCK_TEAMS")
	
	return PLUGIN_HANDLED
}

public clcmd_throw(id)
{
	static Float: Origin[3], Float: Velocity[3], Float: Angle[3], MinBox[3], MaxBox[3]
	pev(id, pev_origin, Origin)
	pev(id, pev_velocity, Velocity)
	for(new i = 0 ; i < 3 ; i++)
		Angle[i] = random_float(0.0, 360.0);

	static Health, Float: damage
	Health = get_user_health(id)
	damage = get_pcvar_float(cvar_fselfdmg)
	
	if (Health > damage)
	{
		static ent ; ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))
		
		set_pev(ent, pev_classname, CLASS_FLESH)
		engfunc(EngFunc_SetModel, ent, ZOMBIE_FLESHTHROW)
		set_pev(ent, pev_body, random_num(1, 10)); //Submodel 0 is skull/head
		MinBox = { -0.5, -0.5, -0.5 }
		MaxBox = { 0.5, 0.5, 0.5 }
		
		engfunc(EngFunc_SetSize, ent, MinBox, MaxBox)
		engfunc(EngFunc_SetOrigin, ent, Origin)
		set_pev(ent, pev_movetype, MOVETYPE_TOSS)
		set_pev(ent, pev_solid, SOLID_TRIGGER)
		set_pev(ent, pev_owner, id)
		
		velocity_by_aim(id, get_pcvar_num(cvar_fforce), Velocity)
		set_pev(ent, pev_velocity, Velocity)
		
		set_pev(ent, pev_angles, Angle)

		emit_sound(id, CHAN_VOICE, g_sound_pain[random(sizeof g_sound_pain)], VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
		set_pev(id, pev_health, Health - damage)
	}
	else
	{
		client_print(id, print_center, "%L", LANG_PLAYER, "FLESH_HEALTH")
	}
}

public fw_spawn(ent)
{
	if(!pev_valid(ent)) 
		return FMRES_IGNORED
	
	static classname[32]
	pev(ent, pev_classname, classname, 31)

	for(new i = 0; i < sizeof g_Map_Entities; ++i)
	{
		if(equal(classname, g_Map_Entities[i]))
		{
			remove_entity(ent);
			return FMRES_SUPERCEDE
		}
	}
	return FMRES_IGNORED
}
	
public fw_PlayerPreThink(id)
{
	if(!is_user_alive(id))
		return FMRES_IGNORED
	
	static Float: velocity[3], Float: Time
	static button, flag
	button = pev(id, pev_button)
	flag = pev(id, pev_flags)
	Time = get_gametime()
	
	if (g_zombie[id])
	{
		if ( (!g_infreezetime) && (button & IN_RELOAD) && (flag & FL_ONGROUND))
		{
			if (get_pcvar_num(cvar_leap))
			{
				static Float: cooldown, Float: lheight, lforce
				cooldown = get_pcvar_float(cvar_leapcd)
				lforce = get_pcvar_num(cvar_lforce)
				lheight = get_pcvar_float(cvar_lheight)
				if (Time - cooldown > g_LastLeap[id])
				{ 
					set_pev(id, pev_button, button & ~IN_RELOAD)
					velocity_by_aim(id, lforce, velocity)
					velocity[2] = lheight
					set_pev(id, pev_velocity, velocity)
					emit_sound(id, CHAN_VOICE, g_sound_pain[random(sizeof g_sound_pain)], VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
					g_LastLeap[id] = Time
				}
			}
		}
		else if ( (!g_infreezetime) && (button & IN_ATTACK) && (button & IN_ATTACK2))
		{
			if (get_pcvar_num(cvar_fleshthrow))
			{
				if(Time - 1.1 > g_LastFthrow[id])
				{
					clcmd_throw(id)
					g_LastFthrow[id] = Time
				}
			}
		}
		else if (!g_infreezetime)
		{
			static Float:speed; speed = get_pcvar_float(cvar_speed)
			set_pev(id, pev_maxspeed, speed)
		}
	}
	else if (!g_zombie[id])
	{
		if ( (button & IN_BACK)	&& (flag & FL_ONGROUND) )
		{
			pev(id, pev_velocity, velocity)
			xs_vec_mul_scalar(velocity, SURVIVOR_BACKSPEED, velocity)
			set_pev(id, pev_velocity, velocity)
		}
	}
	
	return FMRES_IGNORED
}	

public fw_SetClientKeyValue(id, infobuffer, key[], value[])
{   
	if (g_model[id] && equal(key, "model"))
		return FMRES_SUPERCEDE
	
	return FMRES_IGNORED
}

public fw_ClientUserInfoChanged(id, infobuffer)
{   
	if (!g_model[id])
		return FMRES_IGNORED
	
	new currentmodel[32]; 
	fm_get_user_model(id, currentmodel, charsmax(currentmodel) );
	
	if(!equal(currentmodel, player_model[id]))
		fm_set_user_model(id, player_model[id]) 
	
	return FMRES_IGNORED
}

public fw_EmitSound(id, channel, sample[], Float:volume, Float:attn, flag, pitch)
{
	if(!is_user_connected(id) || !g_zombie[id])
		return FMRES_IGNORED
		
	//KNIFE
	if (sample[0] == 'w' && sample[1] == 'e' && sample[8] == 'k' && sample[9] == 'n')
	{
		switch(sample[17])
		{
			case 'l': 
				return FMRES_SUPERCEDE
				
			case 's', 'w':
			{
				emit_sound(id, CHAN_WEAPON, g_sound_miss[random(sizeof g_sound_miss)], volume, attn, flag, pitch)
				return FMRES_SUPERCEDE
			}
			
			case 'b', '1', '2', '3', '4':
			{
				emit_sound(id, CHAN_WEAPON, g_sound_hit[random(sizeof g_sound_hit)], volume, attn, flag, pitch)
				return FMRES_SUPERCEDE
			}
		}
	}
	//PAIN
	else if (sample[1] == 'l' && sample[2] == 'a' && sample[3] == 'y' && ( (containi(sample, "bhit") != -1) || (containi(sample, "pain") != -1) || (containi(sample, "shot") != -1)))
	{
		emit_sound(id, CHAN_VOICE, g_sound_pain[random(sizeof g_sound_pain)], volume, attn, flag, pitch)
		return FMRES_SUPERCEDE
	}		
	//DEATH
	else if (sample[7] == 'd' && (sample[8] == 'i' && sample[9] == 'e' || sample[12] == '6'))
	{
		emit_sound(id, CHAN_VOICE, g_sound_die[random(sizeof g_sound_die)], volume, attn, flag, pitch)
		return FMRES_SUPERCEDE
	}	
	//NVG
	else if (sample[6] == 'n' && sample[7] == 'v' && sample[8] == 'g')
		return FMRES_SUPERCEDE
		
	return FMRES_IGNORED
}

public bacon_touch(ent, id)
{
	if (is_user_alive(id) && g_zombie[id])
		return HAM_SUPERCEDE
	
	return HAM_IGNORED
}

public fw_Touch(pToucher, pTouched)
{
	if ( pev_valid(pToucher))
	{
		static className[32], className2[32]
		pev(pToucher, pev_classname, className, 31)
		if ( pev_valid(pTouched)) pev(pTouched, pev_classname, className2, 31)
		
		if ( equal(className, CLASS_FLESH))
		{
			static attacker ; attacker = pev(pToucher, pev_owner)
			
			if ( pev_valid(pTouched))
			{
				if ( equal(className2, "player") && is_user_connected(pTouched))
				{
					static vOrigin[3], Float: damage
					get_user_origin(pTouched, vOrigin)
					damage = get_pcvar_float(cvar_fleshdmg)
					static CsTeams:team[2]
					team[0] = cs_get_user_team(pTouched), team[1] = cs_get_user_team(attacker)
					
					if (attacker == pTouched)
						return FMRES_SUPERCEDE
					
					if (!get_cvar_num("mp_friendlyfire") && team[0] == team[1]) 
						return FMRES_SUPERCEDE

					message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
					write_byte(TE_BLOOD)
					write_coord(vOrigin[0])
					write_coord(vOrigin[1])
					write_coord(vOrigin[2] + 10)
					write_coord(random_num(-360, 360))
					write_coord(random_num(-360, 360))
					write_coord(-10)
					write_byte(70)
					write_byte(random_num(15, 35))
					message_end() 
					ExecuteHamB(Ham_TakeDamage, pTouched, pToucher, attacker, damage, DMG_BULLET | DMG_NEVERGIB)
				}
				else if ( equal(className2, "func_breakable") && (get_pcvar_num(cvar_breakents)) )
					dllfunc(DLLFunc_Use, pTouched, attacker)		
				else if ( equal(className2, CLASS_FLESH)) 
					return FMRES_SUPERCEDE	
			}		
			remove_entity(pToucher);
		}
	}
	
	return FMRES_IGNORED
}  

public fw_Think_lights(iEnt)
{
	if (!pev_valid(iEnt))
		return FMRES_IGNORED
	
	static className[32]
	pev(iEnt, pev_classname, className, 31);
	static Float:gametime; gametime = get_gametime()
	
	if (equal(className, CLASS_WEATHER))
	{
		switch (get_pcvar_num(cvar_lights))
		{
			case 0:
			{
				engfunc(EngFunc_LightStyle, 0, "m")
				set_pev(iEnt, pev_nextthink, gametime + 0.1)
			}
			case 1:
			{
				static thinkReturn, randNum;
				if(!g_light_flashing)
				{
					randNum = random_num(0, 1)
					if(randNum)
						set_pev(iEnt, pev_message, g_sound_thunder1)
					else
						set_pev(iEnt, pev_message, g_sound_thunder2)
					g_light_flashing = true
					g_light_num = random_num(1, 3)
					dllfunc(DLLFunc_Use, iEnt, 0)
				}
				thinkReturn = lightning()
				
				if(thinkReturn)
					set_pev(iEnt, pev_nextthink, gametime + random_float(9.5, 16.5))
				else
					set_pev(iEnt, pev_nextthink, gametime + 0.1)
			}
			case 2:
			{
				engfunc(EngFunc_LightStyle, 0, "b")
				set_pev(iEnt, pev_nextthink, gametime + 0.1)
			}
			default:
			{
				engfunc(EngFunc_LightStyle, 0, "a")
				set_pev(iEnt, pev_nextthink, gametime + 0.1)
			}

		}
	}

	return FMRES_HANDLED;
}

lightning()
{
	switch(g_light_num)
	{
		// Flash 1 time
		case 1:
		{
			g_light_counter += 1;
			switch(g_light_counter)
			{
				case 1: g_light_stylenum = 1;
				case 2: g_light_stylenum = 2;
				case 3: g_light_stylenum = 1;
				case 4: g_light_stylenum = 0;
			}
			engfunc(EngFunc_LightStyle, 0, g_light_style[g_light_stylenum])
			
			if(g_light_counter == 4)
			{
				g_light_counter = 0;
				g_light_flashing = false;
				return 1;
			}
			else
				return 0;
		}
		// Flash 2 times
		case 2:
		{
			g_light_counter += 1;
			switch(g_light_counter)
			{
				case 1: g_light_stylenum = 1;
				case 2: g_light_stylenum = 2;
				case 3: g_light_stylenum = 1;
				case 4: g_light_stylenum = 2;
				case 5: g_light_stylenum = 1;
				case 6: g_light_stylenum = 0;
			}
			engfunc(EngFunc_LightStyle, 0, g_light_style[g_light_stylenum])
			
			if(g_light_counter == 6)
			{
				g_light_counter = 0;
				g_light_flashing = false;
				return 1;
			}
			else
				return 0;
		}
		// Flash 3 times
		case 3:
		{
			g_light_counter += 1;
			switch(g_light_counter)
			{
				case 1: g_light_stylenum = 1;
				case 2: g_light_stylenum = 2;
				case 3: g_light_stylenum = 1;
				case 4: g_light_stylenum = 2;
				case 5: g_light_stylenum = 1;
				case 6: g_light_stylenum = 2;
				case 7: g_light_stylenum = 1;
				case 8: g_light_stylenum = 0;
			}
			engfunc(EngFunc_LightStyle, 0, g_light_style[g_light_stylenum])
			
			if(g_light_counter == 8)
			{
				g_light_counter = 0;
				g_light_flashing = false;
				return 1;
			}
			else
				return 0;
		}
	}
	return 1;
}

public fw_Traceline(Float:start[3], Float:end[3], nomonsters, id, trace) 
{ 
	if(!is_user_connected(id)) 
		return FMRES_IGNORED; 
    
	static victim, hitgroup
	victim = get_tr2(trace, TR_pHit);
	hitgroup = get_tr2(trace, TR_iHitgroup); 

	if(!is_user_connected(victim)) 
		return FMRES_IGNORED; 
		
	static CsTeams:team[2]
	team[0] = cs_get_user_team(id), team[1] = cs_get_user_team(victim)
	if (team[0] == team[1])
	{
		return FMRES_SUPERCEDE 
	}

	switch(hitgroup)
	{
		case HIT_GENERIC:	g_hitgroups[victim] = HIT_GENERIC
		case HIT_HEAD:		g_hitgroups[victim] = HIT_HEAD
		case HIT_CHEST:	g_hitgroups[victim] = HIT_HEAD
		case HIT_STOMACH:	g_hitgroups[victim] = HIT_STOMACH
		case HIT_LEFTARM:	g_hitgroups[victim] = HIT_LEFTARM
		case HIT_RIGHTARM:	g_hitgroups[victim] = HIT_RIGHTARM
		case HIT_LEFTLEG:	g_hitgroups[victim] = HIT_LEFTLEG
		case HIT_RIGHTLEG:	g_hitgroups[victim] = HIT_RIGHTLEG
		default: return -1
	}
	
	set_tr2(trace, TR_iHitgroup, g_hitgroups[victim])
    
	return FMRES_IGNORED
}
	
/*================================================================================
 [Tasks]
=================================================================================*/

public Task_Restart()
{
	new mapname[32]
	get_mapname(mapname, 31)
	server_cmd("changelevel %s", mapname)
}

public Task_ShowHUD(task)
{
	new id = task - TASKID_SHOWHUD
	
	if(!is_user_alive(id) || !g_zombie[id])
		return PLUGIN_HANDLED
	
	static health, armour;
	health = get_user_health(id);
	armour = get_user_armor(id);
	
	set_hudmessage(255, 180, 0, 0.02, 0.97, 0, 0.0, 0.3, 0.0, 0.0)
	ShowSyncHudMsg(id, g_hudsync , "Health: %d | Armour: %d", health, armour)
	
	set_task(0.1, "Task_ShowHUD", TASKID_SHOWHUD + id)		
	
	return PLUGIN_CONTINUE
}

public Task_Strip(task) 
{
	new id = task - TASKID_STRIP
	if (cs_get_user_submodel(id)) 
		cs_set_user_submodel(id, 0)
	strip_user_weapons(id)
	give_item(id, "weapon_knife")
	set_pev(id, pev_viewmodel2, ZOMBIE_CLAWS)
	set_pev(id, pev_weaponmodel2, "")

}	 

public Task_Refresh(task)
{
	new id = task - TASKID_REFRESH
	
	client_cmd(id, "slot2")
	client_cmd(id, "slot1")
}

public Task_Model(task)
{
	new id = task - TASKID_MODEL 
	
	fm_set_user_model(id, player_model[id])
}

public Task_NVG(task)
{
	new id = task - TASKID_NVG
	
	engclient_cmd(id, "nightvision")
	for(new i = 0; i < 10; i++)
		client_cmd(id, "-nvgadjust")

}

public Task_C4()
{
	new ent = find_ent_by_class(-1, "weaponbox");
	while (ent > 0) 
	{
		new model[33]
		pev(ent, pev_model, model, charsmax(model) );
		if (equali(model, "models/w_backpack.mdl")) 
		{
			remove_entity(ent);
			return PLUGIN_CONTINUE;
		}
		ent = find_ent_by_class(-1, "weapon");
	}
	return PLUGIN_CONTINUE;
}

public Task_RoundEnd( ) {
	TerminateRound(RoundEndType_Draw);
}	

/*================================================================================
 [Stocks]
=================================================================================*/

stock fm_set_user_model(player, modelname[])
{   
	engfunc(EngFunc_SetClientKeyValue, player, engfunc(EngFunc_GetInfoKeyBuffer, player), "model", modelname)
	
	g_model[player] = true
}

stock fm_get_user_model(player, model[], len)
{   
	engfunc(EngFunc_InfoKeyValue, engfunc(EngFunc_GetInfoKeyBuffer, player), "model", model, len)
}

stock fm_reset_user_model(player)
{         
	g_model[player] = false
	
	dllfunc(DLLFunc_ClientUserInfoChanged, player, engfunc(EngFunc_GetInfoKeyBuffer, player))
}


N-am testat
Nu efectuez tranzactii pe mess, skype etc. Aveti grija la indivizii care se dau drept mine!
Nu mai ofer suport asa ca nu imi mai trimiteti mesaje in legatura cu asta!


Zombie Plague Shade 1.2-debug1 [with Item Limiter] (12 September 2015) - Bombardier Branch
User avatar
Cartias
Membru, skill +1
Membru, skill +1
Posts: 137
Joined: 29 Mar 2009, 22:16
Detinator Steam: Da
SteamID: madalin6792
Location: Rm. Sarat
Has thanked: 6 times
Contact:

28 Aug 2010, 09:57

il testez eu acum:D
Last edited by Cartias on 28 Aug 2010, 09:58, edited 1 time in total.
User avatar
KronoS eXtream
Fost administrator
Fost administrator
Posts: 4380
Joined: 02 Apr 2009, 18:18
Detinator Steam: Da
Reputatie: Fost administrator
Fost detinator Zombie-Land.eXtream.Ro
Contribuitor
Fost Scripter eXtreamCS
Dezvoltator al listei de seriozitate eXtreamCS
Location: Bucharest
Has thanked: 543 times
Been thanked: 820 times
Contact:

28 Aug 2010, 09:57

Vezi mai sus.
Nu efectuez tranzactii pe mess, skype etc. Aveti grija la indivizii care se dau drept mine!
Nu mai ofer suport asa ca nu imi mai trimiteti mesaje in legatura cu asta!


Zombie Plague Shade 1.2-debug1 [with Item Limiter] (12 September 2015) - Bombardier Branch
User avatar
Cartias
Membru, skill +1
Membru, skill +1
Posts: 137
Joined: 29 Mar 2009, 22:16
Detinator Steam: Da
SteamID: madalin6792
Location: Rm. Sarat
Has thanked: 6 times
Contact:

28 Aug 2010, 09:58

esti rapid:D
User avatar
KronoS eXtream
Fost administrator
Fost administrator
Posts: 4380
Joined: 02 Apr 2009, 18:18
Detinator Steam: Da
Reputatie: Fost administrator
Fost detinator Zombie-Land.eXtream.Ro
Contribuitor
Fost Scripter eXtreamCS
Dezvoltator al listei de seriozitate eXtreamCS
Location: Bucharest
Has thanked: 543 times
Been thanked: 820 times
Contact:

28 Aug 2010, 09:59

Sa nu uiti sa bagi round_terminator.inc in folderul includes.
Nu efectuez tranzactii pe mess, skype etc. Aveti grija la indivizii care se dau drept mine!
Nu mai ofer suport asa ca nu imi mai trimiteti mesaje in legatura cu asta!


Zombie Plague Shade 1.2-debug1 [with Item Limiter] (12 September 2015) - Bombardier Branch
User avatar
Cartias
Membru, skill +1
Membru, skill +1
Posts: 137
Joined: 29 Mar 2009, 22:16
Detinator Steam: Da
SteamID: madalin6792
Location: Rm. Sarat
Has thanked: 6 times
Contact:

28 Aug 2010, 17:45

Versiunea 3.0 imi da eroare :| Dar am descarcat versiunea 2.4 si merge:)

Dar vreau sa stiu ceva .. Pot sa fac doar echipa CT sa fie zombi?
User avatar
KronoS eXtream
Fost administrator
Fost administrator
Posts: 4380
Joined: 02 Apr 2009, 18:18
Detinator Steam: Da
Reputatie: Fost administrator
Fost detinator Zombie-Land.eXtream.Ro
Contribuitor
Fost Scripter eXtreamCS
Dezvoltator al listei de seriozitate eXtreamCS
Location: Bucharest
Has thanked: 543 times
Been thanked: 820 times
Contact:

28 Aug 2010, 17:46

Maduta wrote:Versiunea 3.0 imi da eroare :| Dar am descarcat versiunea 2.4 si merge:)

Dar vreau sa stiu ceva .. Pot sa fac doar echipa CT sa fie zombi?
Ce eroare iti da?
In zombie swarm echipa T = zombie.Vrei neaparat CT?
Nu efectuez tranzactii pe mess, skype etc. Aveti grija la indivizii care se dau drept mine!
Nu mai ofer suport asa ca nu imi mai trimiteti mesaje in legatura cu asta!


Zombie Plague Shade 1.2-debug1 [with Item Limiter] (12 September 2015) - Bombardier Branch
User avatar
Cartias
Membru, skill +1
Membru, skill +1
Posts: 137
Joined: 29 Mar 2009, 22:16
Detinator Steam: Da
SteamID: madalin6792
Location: Rm. Sarat
Has thanked: 6 times
Contact:

28 Aug 2010, 17:51

Ce eroare iti da?
In zombie swarm echipa T = zombie.Vrei neaparat CT?
DA

Eroarea.. cand scriu in consola serverului amx_plugins imi apare Unknown la plugin
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 22 guests