Raised This Month: $32 Target: $400
 8% 

Help me with this zombie class


Post New Thread Reply   
 
Thread Tools Display Modes
FitnessMan
Junior Member
Join Date: Oct 2014
Old 04-23-2015 , 17:25   Re: Help me with this zombie class
Reply With Quote #11

Im make const zadminflags = ADMIN_BAN , class is not for admins ... all users get this clasas. This is for BaseBuilder 6.5 Tirant.

Code:
#include < amxmodx >
#include < fakemeta >
#include < zombieplague >
#include < engine >

new const zname[ ] = "Paralize Zombie"
new const zinfo[ ] = "\y[\rDisarm hit's\y]"
new const zmodel[ ] = "bb_zmparalize"
new const zclawmodel[ ] = "v_zmparalize"
const zhealth = 2500
const zspeed = 280
const Float:zgravity = 0.9
const Float:zknockback = 1.0
const zadminflags = ADMIN_BAN

new zClassId, SurvivorDisarm, DisarmTime, DisarmChance, ScreenFadeEffects, SpR_Paralyzed
new bool: CantFire[ 33 ] = false;

public plugin_init() 
{
         register_plugin("BB CLASS : Paralizer Zombie", "1.1", "THE_WINNER")
	
	register_event("Damage", "Event_Damage", "b", "2!0", "3=0", "4!0")
	
	DisarmChance = 		register_cvar("Chance to disarm (%)", "8" )
	DisarmTime = 		register_cvar("Disarm Time", "2.0" ) // How much time the Human will stay disarm
	zClassId = 		zp_register_zombie_class(zname, zinfo, zmodel, zclawmodel, zhealth, zspeed, zgravity, zknockback, zadminflags)
	ScreenFadeEffects = 	get_user_msgid( "ScreenFade" )
}

public plugin_precache( )
	SpR_Paralyzed = precache_model( "sprites/paralyzed.spr" )

public Event_Damage( victim )
{
	new id
	id = get_user_attacker( victim )
	if( zp_get_user_zombie_class( victim ) != zClassId 
	|| !zp_get_user_zombie( victim ) )
		return PLUGIN_CONTINUE;
	
	new Rand = random_num( 1, 100 )
	if( Rand > 0 && Rand <= get_pcvar_num( DisarmChance ) ) 
	{
		CantFire[ id ] = true
		Effects( id )
		set_task( get_pcvar_float( DisarmTime ), "StopDisarmCc", id )
	}
	
	return PLUGIN_CONTINUE;
}

public client_PreThink( Player )
{	
	if( !CantFire[ Player ] )
		return PLUGIN_CONTINUE;
	entity_set_int( Player, EV_INT_button, entity_get_int( Player, EV_INT_button ) & ~IN_ATTACK ) // Player will scared :D
	return PLUGIN_CONTINUE;
}

public Effects( id )
{
	message_begin( MSG_ONE_UNRELIABLE, ScreenFadeEffects,.player = id )
	write_short( ( 1<<10 ) )
	write_short( 0 )
	write_short( 0x0000 )
	write_byte( 255 ) // Red color 
	write_byte( 0 ) // G
	write_byte( 0 ) // B
	write_byte( 255 )
	message_end( )
	
	new Float: HumanOrigin[ 3 ]
	entity_get_vector( id, EV_VEC_origin, HumanOrigin )
	engfunc( EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, HumanOrigin, 0)
	write_byte( TE_SPRITETRAIL )	
	engfunc( EngFunc_WriteCoord, HumanOrigin[ 0 ] )
	engfunc( EngFunc_WriteCoord, HumanOrigin[ 1 ] )
	engfunc( EngFunc_WriteCoord, HumanOrigin[ 2 ] )
	engfunc( EngFunc_WriteCoord, HumanOrigin[ 0 ] )
	engfunc( EngFunc_WriteCoord, HumanOrigin[ 1 ] )
	engfunc( EngFunc_WriteCoord, HumanOrigin[ 2 ] + 30 )
	write_short( SpR_Paralyzed ) 
	write_byte( 3 ) 
	write_byte( 30 )
	write_byte( 10 ) 
	write_byte( 45 )
	write_byte( 40 )
	message_end( )
}

public StopDisarmCc( id )
{
	CantFire[ id ] = false
}
FitnessMan is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 04-23-2015 , 18:06   Re: Help me with this zombie class
Reply With Quote #12

maybe replace #include <zombieplague> with #include <basebuilder>
Depresie is offline
FitnessMan
Junior Member
Join Date: Oct 2014
Old 04-24-2015 , 07:28   Re: Help me with this zombie class
Reply With Quote #13

Admin flag is work,paralize effect not work,becouse in basebuilder not have nativ's for paralize? how to add?

Last edited by FitnessMan; 04-24-2015 at 08:12.
FitnessMan is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:59.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode