zombie ability as EXTRA ITEM

Unpaid Requests, Public Plugins
Post Reply
czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 598
Joined: 7 years ago
Contact:

zombie ability as EXTRA ITEM

#1

Post by czirimbolo » 5 years ago

Hello, can someone make an Extra item for zombies from this plugin?

Code: Select all

/*				Houndeye Zombie v0.4
					By Morte
					
	-. Description: Blast player and make it fly.
	
	-. Cvars: zp_houndeye_timeblast 2.5 (Time to Blast)
		  zp_houndeye_radius 150.0 (Blast Radius)
		  zp_houndeye_infect_blast 0 (Blast infect players)
		  zp_houndeye_damage 0 (Blast Damage)
		  zp_houndeye_damage_amount 25 (Blast Damage Amount)
		  
		  
	-. Changelog:
			# 0.1 - Plugin Release
			# 0.2 - Added 2 cvar's: 1) To activate the blast damage
					        2) To select the amount of the damage
			# 0.3 - Now you can't use blast hability if you are nemesis.
			# 0.4 - Fixed cvar "zp_houndeye_damage_amount".
	-. Credits:
			# shinoda - Help me with how to make players fly.
			# MeRcyLeZZ - For his Zombie Plague ^.^
			# frk_14 - For the model.

*/

#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
#include <xs>
#include <engine>
#include <zombieplague>

/*================================================================================
 [Plugin Customization]
=================================================================================*/

new const zclass_name[] = { "Houndeye Zombie" } 
new const zclass_info[] = { "Blast Power (Pressing E)" } 
new const zclass_model[] = { "houndeye" } 
new const zclass_clawmodel[] = { "v_houndeye.mdl" } 
const zclass_health = 1000 
const zclass_speed = 200 
const Float:zclass_gravity = 0.6 
const Float:zclass_knockback = 0.6

new const beam_cylinder[] = "sprites/white.spr"

new const houndeye_attack[][] = { "houndeye/he_attack1.wav", "houndeye/he_attack3.wav" }
new const houndeye_blast[][] = { "houndeye/he_blast1.wav", "houndeye/he_blast3.wav" }

/*================================================================================
 [End Customization]
=================================================================================*/

#define is_player(%0)    (1 <= %0 <= giMaxplayers)
#define TASK_BARTIME 16000

// Zombie vars
new gMsgBarTime, gMsgDeathMsg, gSprBeam, gHoundEye, giMaxplayers, cvar_timeblast, cvar_radius, cvar_blast_infect,
cvar_damage, cvar_damage_amount

public plugin_init()
{
	register_plugin("Houndeye Zombie", "0.4", "Morte")
	
	cvar_timeblast = register_cvar("zp_houndeye_timeblast", "2.5")
	cvar_radius = register_cvar("zp_houndeye_radius", "150.0")
	cvar_blast_infect = register_cvar("zp_houndeye_infect", "0")
	cvar_damage = register_cvar("zp_houndeye_damage", "0")
	cvar_damage_amount = register_cvar("zp_houndeye_damage_amount", "25")
	
	register_forward( FM_CmdStart, "CmdStart")
	
	giMaxplayers = get_maxplayers()
	gMsgBarTime = get_user_msgid("BarTime")
	gMsgDeathMsg = get_user_msgid("DeathMsg")
}

public plugin_precache()
{
	gHoundEye = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback) 
	gSprBeam = precache_model(beam_cylinder)
	
	for (new i = 0; i < sizeof houndeye_attack; i++)
		engfunc(EngFunc_PrecacheSound, houndeye_attack[i])
	for (new i = 0; i < sizeof houndeye_blast; i++)
		engfunc(EngFunc_PrecacheSound, houndeye_blast[i])
}

public CmdStart(id)
{
	if(!is_user_alive(id))
		return;
	
	static iButton; iButton = pev(id, pev_button)
	static iOldButton; iOldButton = pev(id, pev_oldbuttons)
	
	if(zp_get_user_zombie(id) && (zp_get_user_zombie_class(id) == gHoundEye) && !zp_get_user_nemesis(id))
	{
		if( ( iButton & IN_USE ) && !( iOldButton & IN_USE ) )
		{
			if(!is_user_alive(id))
				return;

			message_begin(MSG_ONE, gMsgBarTime, _, id)
			write_byte(get_pcvar_num(cvar_timeblast))
			write_byte(0)
			message_end()
			
			emit_sound(id, CHAN_VOICE, houndeye_attack[random_num(0, sizeof houndeye_attack - 1)], 1.0, ATTN_NORM, 0, PITCH_NORM)
			
			set_task(get_pcvar_float(cvar_timeblast), "blast_players", id+TASK_BARTIME)
		}
			
		if( iOldButton & IN_USE && !( iButton & IN_USE ) )
			set_task(0.1, "blast_stop", id)
	}
}

public blast_stop(id)
{
	message_begin(MSG_ONE, gMsgBarTime, _, id)
	write_byte(0)
	write_byte(0)
	message_end()
	
	remove_task(id+TASK_BARTIME)
}

public blast_players(id)
{
	id -= TASK_BARTIME
	
	new Float: iOrigin[3]
	pev(id, pev_origin, iOrigin)
	
	emit_sound(id, CHAN_VOICE, houndeye_blast[random_num(0, sizeof houndeye_blast - 1)], 1.0, ATTN_NORM, 0, PITCH_NORM)
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, iOrigin, 0)
	write_byte(TE_BEAMCYLINDER)
	engfunc(EngFunc_WriteCoord, iOrigin[0])
	engfunc(EngFunc_WriteCoord, iOrigin[1])
	engfunc(EngFunc_WriteCoord, iOrigin[2])
	engfunc(EngFunc_WriteCoord, iOrigin[0])
	engfunc(EngFunc_WriteCoord, iOrigin[1])
	engfunc(EngFunc_WriteCoord, iOrigin[2]+385.0)
	write_short(gSprBeam)
	write_byte(0)
	write_byte(0)
	write_byte(4)
	write_byte(60)
	write_byte(0)
	write_byte(255)
	write_byte(255)
	write_byte(255)
	write_byte(200)
	write_byte(0)
	message_end()
	
	static Ent, Float: originF[3]
	
	while( (Ent = engfunc(EngFunc_FindEntityInSphere, Ent, iOrigin, get_pcvar_float(cvar_radius))) )
	{
		if( is_player(Ent) && Ent != id )
		{
			if(zp_get_user_zombie(Ent) || zp_get_user_zombie(Ent))
				return PLUGIN_CONTINUE;
				
			if(get_pcvar_num(cvar_blast_infect))
			{
				zp_infect_user(Ent, 1)
				
				SendDeathMsg(id, Ent)
			}
			
			if(get_pcvar_num(cvar_damage))
			{
				if(zp_get_user_survivor(Ent))
					return PLUGIN_CONTINUE;
				
				fm_set_user_health(Ent, pev(Ent, pev_health) - get_pcvar_num(cvar_damage_amount))
			}
			
			pev(Ent, pev_origin, originF)
			
			originF[0] = (originF[0] - iOrigin[0]) * 10.0 
			originF[1] = (originF[1] - iOrigin[1]) * 10.0 
			originF[2] = (originF[2] - iOrigin[2]) + 500.0
			
			set_pev(Ent, pev_velocity, originF)
		}
	}
	
	return PLUGIN_HANDLED;
}

SendDeathMsg(attacker, victim)
{
	message_begin(MSG_BROADCAST, gMsgDeathMsg)
	write_byte(attacker)
	write_byte(victim)
	write_byte(1)
	write_string("infection")
	message_end()
}

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

stock print_chatColor(const id,const input[], any:...)
{
	new msg[191], players[32], count = 1;
	vformat(msg,190,input,3);
	replace_all(msg,190,"!g","^4");// green
	replace_all(msg,190,"!n","^1");// normal
	replace_all(msg,190,"!t","^3");// team
	
	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();
	}
}

stock fm_set_user_health(id, health)
{
	(health > 0) ? set_pev(id, pev_health, float(health)) : dllfunc(DLLFunc_ClientKill, id);
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1034\\ f0\\ fs16 \n\\ par }
*/
Image

User avatar
Night Fury
Mod Developer
Mod Developer
Posts: 677
Joined: 7 years ago
Contact:

#2

Post by Night Fury » 5 years ago

Code: Select all

/*				Houndeye Zombie v0.4
					By Morte
					
	-. Description: Blast player and make it fly.
	
	-. Cvars: zp_houndeye_timeblast 2.5 (Time to Blast)
		  zp_houndeye_radius 150.0 (Blast Radius)
		  zp_houndeye_infect_blast 0 (Blast infect players)
		  zp_houndeye_damage 0 (Blast Damage)
		  zp_houndeye_damage_amount 25 (Blast Damage Amount)
		  
		  
	-. Changelog:
			# 0.1 - Plugin Release
			# 0.2 - Added 2 cvar's: 1) To activate the blast damage
					        2) To select the amount of the damage
			# 0.3 - Now you can't use blast hability if you are nemesis.
			# 0.4 - Fixed cvar "zp_houndeye_damage_amount".
	-. Credits:
			# shinoda - Help me with how to make players fly.
			# MeRcyLeZZ - For his Zombie Plague ^.^
			# frk_14 - For the model.

*/

#include <zombie_escape>
#include <xs>
#include <engine>

/*================================================================================
 [Plugin Customization]
=================================================================================*/

new const beam_cylinder[] = "sprites/white.spr"

new const houndeye_attack[][] = { "houndeye/he_attack1.wav", "houndeye/he_attack3.wav" }
new const houndeye_blast[][] = { "houndeye/he_blast1.wav", "houndeye/he_blast3.wav" }

/*================================================================================
 [End Customization]
=================================================================================*/

#define is_player(%0)    (1 <= %0 <= giMaxplayers)
#define TASK_BARTIME 16000

// Zombie vars
new gMsgBarTime, gSprBeam, giMaxplayers, cvar_timeblast, cvar_radius, cvar_blast_infect,
cvar_damage, cvar_damage_amount, g_iItemID, bool:g_bHaveAbility[33]

public plugin_init()
{
	register_plugin("Houndeye Zombie", "0.4", "Morte")
	g_iItemID = ze_register_item("Houndeye Zombie", 0, 0)
	
	cvar_timeblast = register_cvar("zp_houndeye_timeblast", "2.5")
	cvar_radius = register_cvar("zp_houndeye_radius", "150.0")
	cvar_blast_infect = register_cvar("zp_houndeye_infect", "0")
	cvar_damage = register_cvar("zp_houndeye_damage", "0")
	cvar_damage_amount = register_cvar("zp_houndeye_damage_amount", "25")
	
	register_forward( FM_CmdStart, "CmdStart")
	
	giMaxplayers = get_member_game(m_nMaxPlayers)
	gMsgBarTime = get_user_msgid("BarTime")
}

public ze_select_item_pre(id, itemid)
{
	if (itemid != g_iItemID)
		return ZE_ITEM_AVAILABLE

	if (!ze_is_user_zombie(id))
		return ZE_ITEM_DONT_SHOW

	return ZE_ITEM_AVAILABLE
}

public ze_select_item_post(id, itemid)
{
	if (itemid != g_iItemID)
		return

	g_bHaveAbility[id] = true
}

public client_putinserver(id)
{
	if (!is_user_connected(id))
		return

	g_bHaveAbility[id] = false
}

public plugin_precache()
{
	gSprBeam = precache_model(beam_cylinder)
	
	for (new i = 0; i < sizeof houndeye_attack; i++)
		engfunc(EngFunc_PrecacheSound, houndeye_attack[i])
	for (new i = 0; i < sizeof houndeye_blast; i++)
		engfunc(EngFunc_PrecacheSound, houndeye_blast[i])
}

public CmdStart(id)
{
	if(!is_user_alive(id))
		return;
	
	static iButton; iButton = pev(id, pev_button)
	static iOldButton; iOldButton = pev(id, pev_oldbuttons)
	
	if(ze_is_user_zombie(id) && g_bHaveAbility[id])
	{
		if( ( iButton & IN_USE ) && !( iOldButton & IN_USE ) )
		{
			if(!is_user_alive(id))
				return;

			message_begin(MSG_ONE, gMsgBarTime, _, id)
			write_byte(get_pcvar_num(cvar_timeblast))
			write_byte(0)
			message_end()
			
			emit_sound(id, CHAN_VOICE, houndeye_attack[random_num(0, sizeof houndeye_attack - 1)], 1.0, ATTN_NORM, 0, PITCH_NORM)
			
			set_task(get_pcvar_float(cvar_timeblast), "blast_players", id+TASK_BARTIME)
		}
			
		if( iOldButton & IN_USE && !( iButton & IN_USE ) )
			set_task(0.1, "blast_stop", id)
	}
}

public blast_stop(id)
{
	message_begin(MSG_ONE, gMsgBarTime, _, id)
	write_byte(0)
	write_byte(0)
	message_end()
	
	remove_task(id+TASK_BARTIME)
}

public blast_players(id)
{
	id -= TASK_BARTIME
	
	new Float: iOrigin[3]
	pev(id, pev_origin, iOrigin)
	
	emit_sound(id, CHAN_VOICE, houndeye_blast[random_num(0, sizeof houndeye_blast - 1)], 1.0, ATTN_NORM, 0, PITCH_NORM)
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, iOrigin, 0)
	write_byte(TE_BEAMCYLINDER)
	engfunc(EngFunc_WriteCoord, iOrigin[0])
	engfunc(EngFunc_WriteCoord, iOrigin[1])
	engfunc(EngFunc_WriteCoord, iOrigin[2])
	engfunc(EngFunc_WriteCoord, iOrigin[0])
	engfunc(EngFunc_WriteCoord, iOrigin[1])
	engfunc(EngFunc_WriteCoord, iOrigin[2]+385.0)
	write_short(gSprBeam)
	write_byte(0)
	write_byte(0)
	write_byte(4)
	write_byte(60)
	write_byte(0)
	write_byte(255)
	write_byte(255)
	write_byte(255)
	write_byte(200)
	write_byte(0)
	message_end()
	
	static Ent, Float: originF[3]
	
	while( (Ent = engfunc(EngFunc_FindEntityInSphere, Ent, iOrigin, get_pcvar_float(cvar_radius))) )
	{
		if( is_player(Ent) && Ent != id )
		{
			if(ze_is_user_zombie(Ent) || ze_is_user_zombie(Ent))
				return PLUGIN_CONTINUE;
				
			if(get_pcvar_num(cvar_blast_infect))
			{
				ze_set_user_zombie(Ent)
				SendDeathMsg(id, Ent)
			}
			
			if(get_pcvar_num(cvar_damage))
			{
				fm_set_user_health(Ent, pev(Ent, pev_health) - get_pcvar_num(cvar_damage_amount))
			}
			
			pev(Ent, pev_origin, originF)
			
			originF[0] = (originF[0] - iOrigin[0]) * 10.0 
			originF[1] = (originF[1] - iOrigin[1]) * 10.0 
			originF[2] = (originF[2] - iOrigin[2]) + 500.0
			
			set_pev(Ent, pev_velocity, originF)
		}
	}
	
	return PLUGIN_HANDLED;
}

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

stock print_chatColor(const id,const input[], any:...)
{
	new msg[191], players[32], count = 1;
	vformat(msg,190,input,3);
	replace_all(msg,190,"!g","^4");// green
	replace_all(msg,190,"!n","^1");// normal
	replace_all(msg,190,"!t","^3");// team
	
	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();
	}
}

stock fm_set_user_health(id, health)
{
	(health > 0) ? set_pev(id, pev_health, float(health)) : dllfunc(DLLFunc_ClientKill, id);
}
Want your own mod edition? PM me.
Accepting private projects.
Discord: Fury#7469
Image

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 598
Joined: 7 years ago
Contact:

#3

Post by czirimbolo » 5 years ago

it doesnt work, I press E (use button) but nothing happens
Image

User avatar
Night Fury
Mod Developer
Mod Developer
Posts: 677
Joined: 7 years ago
Contact:

#4

Post by Night Fury » 5 years ago

czirimbolo wrote: 5 years ago it doesnt work, I press E (use button) but nothing happens
Have you bought the item?
Want your own mod edition? PM me.
Accepting private projects.
Discord: Fury#7469
Image

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 598
Joined: 7 years ago
Contact:

#5

Post by czirimbolo » 5 years ago

yes of course
Image

User avatar
Mark
VIP
VIP
United States of America
Posts: 283
Joined: 5 years ago
Location: Des Moines/USA
Contact:

#6

Post by Mark » 5 years ago

czirimbolo wrote: 5 years agoyes of course
Try !
  1. /*              Houndeye Zombie v0.4
  2.                     By Morte
  3.                    
  4.     -. Description: Blast player and make it fly.
  5.    
  6.     -. Cvars: zp_houndeye_timeblast 2.5 (Time to Blast)
  7.           zp_houndeye_radius 150.0 (Blast Radius)
  8.           zp_houndeye_infect_blast 0 (Blast infect players)
  9.           zp_houndeye_damage 0 (Blast Damage)
  10.           zp_houndeye_damage_amount 25 (Blast Damage Amount)
  11.          
  12.          
  13.     -. Changelog:
  14.             # 0.1 - Plugin Release
  15.             # 0.2 - Added 2 cvar's: 1) To activate the blast damage
  16.                             2) To select the amount of the damage
  17.             # 0.3 - Now you can't use blast hability if you are nemesis.
  18.             # 0.4 - Fixed cvar "zp_houndeye_damage_amount".
  19.     -. Credits:
  20.             # shinoda - Help me with how to make players fly.
  21.             # MeRcyLeZZ - For his Zombie Plague ^.^
  22.             # frk_14 - For the model.
  23.  
  24. */
  25.  
  26. #include <zombie_escape>
  27. #include <xs>
  28. #include <engine>
  29.  
  30. /*================================================================================
  31.  [Plugin Customization]
  32. =================================================================================*/
  33.  
  34. new const beam_cylinder[] = "sprites/white.spr"
  35.  
  36. new const houndeye_attack[][] = { "houndeye/he_attack1.wav", "houndeye/he_attack3.wav" }
  37. new const houndeye_blast[][] = { "houndeye/he_blast1.wav", "houndeye/he_blast3.wav" }
  38.  
  39. /*================================================================================
  40.  [End Customization]
  41. =================================================================================*/
  42.  
  43. #define is_player(%0)    (1 <= %0 <= giMaxplayers)
  44. #define TASK_BARTIME 16000
  45.  
  46. // Zombie vars
  47. new gMsgBarTime, gSprBeam, giMaxplayers, cvar_timeblast, cvar_radius, cvar_blast_infect,
  48. cvar_damage, cvar_damage_amount, g_iItemID, bool:g_bHaveAbility[33]
  49.  
  50. public plugin_init()
  51. {
  52.     register_plugin("Houndeye Zombie", "0.4", "Morte")
  53.     g_iItemID = ze_register_item("Houndeye Zombie", 0, 0)
  54.    
  55.     cvar_timeblast = register_cvar("zp_houndeye_timeblast", "2.5")
  56.     cvar_radius = register_cvar("zp_houndeye_radius", "150.0")
  57.     cvar_blast_infect = register_cvar("zp_houndeye_infect", "0")
  58.     cvar_damage = register_cvar("zp_houndeye_damage", "0")
  59.     cvar_damage_amount = register_cvar("zp_houndeye_damage_amount", "25")
  60.    
  61.     register_forward( FM_CmdStart, "CmdStart")
  62.    
  63.     giMaxplayers = get_member_game(m_nMaxPlayers)
  64.     gMsgBarTime = get_user_msgid("BarTime")
  65. }
  66.  
  67. public ze_select_item_pre(id, itemid)
  68. {
  69.     if (itemid != g_iItemID)
  70.         return ZE_ITEM_AVAILABLE
  71.  
  72.     if (!ze_is_user_zombie(id))
  73.         return ZE_ITEM_DONT_SHOW
  74.  
  75.     return ZE_ITEM_AVAILABLE
  76. }
  77.  
  78. public ze_select_item_post(id, itemid)
  79. {
  80.     if (itemid != g_iItemID)
  81.         return
  82.  
  83.     g_bHaveAbility[id] = true
  84.     CmdStart(id)
  85. }
  86.  
  87. public client_putinserver(id)
  88. {
  89.     if (!is_user_connected(id))
  90.         return
  91.  
  92.     g_bHaveAbility[id] = false
  93. }
  94.  
  95. public plugin_precache()
  96. {
  97.     gSprBeam = precache_model(beam_cylinder)
  98.    
  99.     for (new i = 0; i < sizeof houndeye_attack; i++)
  100.         engfunc(EngFunc_PrecacheSound, houndeye_attack[i])
  101.     for (new i = 0; i < sizeof houndeye_blast; i++)
  102.         engfunc(EngFunc_PrecacheSound, houndeye_blast[i])
  103. }
  104.  
  105. public CmdStart(id)
  106. {
  107.     if(!is_user_alive(id))
  108.         return;
  109.    
  110.     static iButton; iButton = pev(id, pev_button)
  111.     static iOldButton; iOldButton = pev(id, pev_oldbuttons)
  112.    
  113.     if(ze_is_user_zombie(id) && g_bHaveAbility[id])
  114.     {
  115.         if( ( iButton & IN_USE ) && !( iOldButton & IN_USE ) )
  116.         {
  117.             if(!is_user_alive(id))
  118.                 return;
  119.  
  120.             message_begin(MSG_ONE, gMsgBarTime, _, id)
  121.             write_byte(get_pcvar_num(cvar_timeblast))
  122.             write_byte(0)
  123.             message_end()
  124.            
  125.             emit_sound(id, CHAN_VOICE, houndeye_attack[random_num(0, sizeof houndeye_attack - 1)], 1.0, ATTN_NORM, 0, PITCH_NORM)
  126.            
  127.             set_task(get_pcvar_float(cvar_timeblast), "blast_players", id+TASK_BARTIME)
  128.         }
  129.            
  130.         if( iOldButton & IN_USE && !( iButton & IN_USE ) )
  131.             set_task(0.1, "blast_stop", id)
  132.     }
  133. }
  134.  
  135. public blast_stop(id)
  136. {
  137.     message_begin(MSG_ONE, gMsgBarTime, _, id)
  138.     write_byte(0)
  139.     write_byte(0)
  140.     message_end()
  141.    
  142.     remove_task(id+TASK_BARTIME)
  143. }
  144.  
  145. public blast_players(id)
  146. {
  147.     id -= TASK_BARTIME
  148.    
  149.     new Float: iOrigin[3]
  150.     pev(id, pev_origin, iOrigin)
  151.    
  152.     emit_sound(id, CHAN_VOICE, houndeye_blast[random_num(0, sizeof houndeye_blast - 1)], 1.0, ATTN_NORM, 0, PITCH_NORM)
  153.    
  154.     engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, iOrigin, 0)
  155.     write_byte(TE_BEAMCYLINDER)
  156.     engfunc(EngFunc_WriteCoord, iOrigin[0])
  157.     engfunc(EngFunc_WriteCoord, iOrigin[1])
  158.     engfunc(EngFunc_WriteCoord, iOrigin[2])
  159.     engfunc(EngFunc_WriteCoord, iOrigin[0])
  160.     engfunc(EngFunc_WriteCoord, iOrigin[1])
  161.     engfunc(EngFunc_WriteCoord, iOrigin[2]+385.0)
  162.     write_short(gSprBeam)
  163.     write_byte(0)
  164.     write_byte(0)
  165.     write_byte(4)
  166.     write_byte(60)
  167.     write_byte(0)
  168.     write_byte(255)
  169.     write_byte(255)
  170.     write_byte(255)
  171.     write_byte(200)
  172.     write_byte(0)
  173.     message_end()
  174.    
  175.     static Ent, Float: originF[3]
  176.    
  177.     while( (Ent = engfunc(EngFunc_FindEntityInSphere, Ent, iOrigin, get_pcvar_float(cvar_radius))) )
  178.     {
  179.         if( is_player(Ent) && Ent != id )
  180.         {
  181.             if(ze_is_user_zombie(Ent) || ze_is_user_zombie(Ent))
  182.                 return PLUGIN_CONTINUE;
  183.                
  184.             if(get_pcvar_num(cvar_blast_infect))
  185.             {
  186.                 ze_set_user_zombie(Ent)
  187.                 SendDeathMsg(id, Ent)
  188.             }
  189.            
  190.             if(get_pcvar_num(cvar_damage))
  191.             {
  192.                 fm_set_user_health(Ent, pev(Ent, pev_health) - get_pcvar_num(cvar_damage_amount))
  193.             }
  194.            
  195.             pev(Ent, pev_origin, originF)
  196.            
  197.             originF[0] = (originF[0] - iOrigin[0]) * 10.0
  198.             originF[1] = (originF[1] - iOrigin[1]) * 10.0
  199.             originF[2] = (originF[2] - iOrigin[2]) + 500.0
  200.            
  201.             set_pev(Ent, pev_velocity, originF)
  202.         }
  203.     }
  204.    
  205.     return PLUGIN_HANDLED;
  206. }
  207.  
  208. /*================================================================================
  209.  [Stocks]
  210. =================================================================================*/
  211.  
  212. stock print_chatColor(const id,const input[], any:...)
  213. {
  214.     new msg[191], players[32], count = 1;
  215.     vformat(msg,190,input,3);
  216.     replace_all(msg,190,"!g","^4");// green
  217.     replace_all(msg,190,"!n","^1");// normal
  218.     replace_all(msg,190,"!t","^3");// team
  219.    
  220.     if (id) players[0] = id; else get_players(players,count,"ch");
  221.     for (new i=0;i<count;i++)
  222.     if (is_user_connected(players[i]))
  223.     {
  224.         message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("SayText"),_,players[i]);
  225.         write_byte(players[i]);
  226.         write_string(msg);
  227.         message_end();
  228.     }
  229. }
  230.  
  231. stock fm_set_user_health(id, health)
  232. {
  233.     (health > 0) ? set_pev(id, pev_health, float(health)) : dllfunc(DLLFunc_ClientKill, id);
  234. }

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 598
Joined: 7 years ago
Contact:

#7

Post by czirimbolo » 5 years ago

still nothing, it takes coins and thats all
Image

Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Who is online

Users browsing this forum: Bing [Bot] and 4 guests