Raised This Month: $51 Target: $400
 12% 

zombie class "tight" problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xElinaz
New Member
Join Date: Aug 2020
Old 08-18-2020 , 08:52   zombie class "tight" problem
Reply With Quote #1

hi. this is a sma from another thread so nemesis cant multijump, but i want also assassin
I tried to add
Quote:
if zp_get_user_nemesis(id) || zp_get_user_assassin(id)
return PLUGIN_HANDLED
, but it shows an error when I try to compile it.

Code:
/*
Multijump addon by twistedeuphoria
Plagued by Dabbi
Classed by B!gBud

CVARS:
	zp_tight_jump 2 (Default)

*/

#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fakemeta>
#include <zombieplague>

new jumpznum[33] = 0
new bool:dozjump[33] = false
new cvar_jumps
new g_zclass_tight

// Tight Zombie Atributes
new const zclass_name[] = { "Tight Zombie" } // name
new const zclass_info[] = { "HP-- Speed++ Jump++ Knockback++" } // description
new const zclass_model[] = { "zombie_source" } // model
new const zclass_clawmodel[] = { "v_knife_zombie.mdl" } // claw model
const zclass_health = 1000 // health
const zclass_speed = 220 // speed
const Float:zclass_gravity = 0.8 // gravity
const Float:zclass_knockback = 1.5 // knockback

public plugin_init()
{
	register_plugin("[ZP] Class Tight", "1.0c", "MultiJump by twistedeuphoria, Plagued by Dabbi, Classed by B!gBud")
	cvar_jumps = register_cvar("zp_tight_jump","2")	
}

public plugin_precache()
{
	g_zclass_tight = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
}

public client_putinserver(id)
{
	jumpznum[id] = 0
	dozjump[id] = false
}

public client_disconnect(id)
{
	jumpznum[id] = 0
	dozjump[id] = false
}

public client_PreThink(id)
{
	if(!is_user_alive(id) || !zp_get_user_zombie(id)) return PLUGIN_CONTINUE
	if(zp_get_user_zombie_class(id) != g_zclass_tight) return PLUGIN_CONTINUE
	
	new nzbut = get_user_button(id)
	new ozbut = get_user_oldbutton(id)
	if((nzbut & IN_JUMP) && !zp_get_user_nemesis(id) && zp_get_user_zombie(id) && !(get_entity_flags(id) & FL_ONGROUND) && !(ozbut & IN_JUMP))

	{
		if (jumpznum[id] < get_pcvar_num(cvar_jumps))
		{
			dozjump[id] = true
			jumpznum[id]++
			return PLUGIN_CONTINUE
		}
	}
	if((nzbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
	{
		jumpznum[id] = 0
		return PLUGIN_CONTINUE
	}	
	return PLUGIN_CONTINUE
}

public client_PostThink(id)
{
	if(!is_user_alive(id) || !zp_get_user_zombie(id)) return PLUGIN_CONTINUE
	if(zp_get_user_zombie_class(id) != g_zclass_tight) return PLUGIN_CONTINUE
	
	if(dozjump[id] == true)
	{
		new Float:vezlocityz[3]	
		entity_get_vector(id,EV_VEC_velocity,vezlocityz)
		vezlocityz[2] = random_float(265.0,285.0)
		entity_set_vector(id,EV_VEC_velocity,vezlocityz)
		dozjump[id] = false
		return PLUGIN_CONTINUE
	}	
	return PLUGIN_CONTINUE
}

Last edited by xElinaz; 08-18-2020 at 08:53.
xElinaz is offline
OST_Aloe
Junior Member
Join Date: Apr 2019
Location: Russia
Old 08-29-2020 , 19:21   Re: zombie class "tight" problem
Reply With Quote #2

I take it you want to ban the Nemesis jump? And assassins the ability to jump?
OST_Aloe is offline
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 08-30-2020 , 00:20   Re: zombie class "tight" problem
Reply With Quote #3

Hi xElinaz,

Did you maybe forgot to add an #include for the "zp_get_user_assassin" that calls Assassin?
__________________
H.RED.ZONE 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 09:37.


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