Raised This Month: $ Target: $400
 0% 

error 021: symbol already defined


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
victorrr
Junior Member
Join Date: Feb 2021
Location: Austria
Old 01-10-2022 , 13:57   error 021: symbol already defined
Reply With Quote #1

Hello, I have a problem with a plugin.
When I compile it it shows me this error: error 021: symbol already defined: "zp_get_user_level".
The code:
HTML Code:
#include <amxmodx>
#include <fun>
#include <zombie_plague_special>
#include <zombiexp>

#define CLASS_MESSAGE_PRINT "[ZP] Damage inflicted to you will be dealt back to your enemy." // Edit to whatever you like

new const zclass_name[] = "\yReflectorul"
new const zclass_info[] = "\rReflecta Gloantele Spre Tine"
new const zclass_model[] = "zombieLV24"
new const zclass_clawmodel[] = "v_knifeLV24.mdl"
const zclass_health = 39500
const zclass_speed = 999
const Float:zclass_gravity = 0.6 
const Float:zclass_knockback = 0.6 
const zclass_level = 24 

new g_zclass_mirror, g_zclass_glow_r, g_zclass_glow_g, g_zclass_glow_b, g_zclass_swarm, g_zclass_plague, g_zclass_survivor

public plugin_init() 
{
	register_plugin("[ZP] ZClass: Mirror Zombie", "1.8", "007")
	
	register_event("Damage", "mirror_dmg", "b", "2!0", "3=0", "4!0")
	
	g_zclass_swarm = register_cvar("zp_mirror_swarm", "1")
	g_zclass_plague = register_cvar("zp_mirror_plague", "1")
	g_zclass_survivor = register_cvar("zp_mirror_survivor", "0")
	
	g_zclass_glow_r = register_cvar("zp_mirror_glow_r", "250")
	g_zclass_glow_g = register_cvar("zp_mirror_glow_g", "0")
	g_zclass_glow_b = register_cvar("zp_mirror_glow_b", "0")
}

public plugin_precache()
{
	g_zclass_mirror = zpxp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback, zclass_level)	
}

public zp_user_infected_post(id, infector)
{
	if (zp_get_user_zombie_class(id) == g_zclass_mirror && !zp_get_user_nemesis(id))
	{
		set_user_rendering(id, kRenderFxGlowShell, get_pcvar_num(g_zclass_glow_r), get_pcvar_num(g_zclass_glow_g), get_pcvar_num(g_zclass_glow_b), kRenderNormal, 20) // Glow
		client_print(id, print_chat, CLASS_MESSAGE_PRINT)
	}
}

public zp_user_unfrozen(id)
{
	if (zp_get_user_zombie_class(id) == g_zclass_mirror)
	{
		set_user_rendering(id, kRenderFxGlowShell, get_pcvar_num(g_zclass_glow_r), get_pcvar_num(g_zclass_glow_g), get_pcvar_num(g_zclass_glow_b), kRenderNormal, 20) // Fix in glow(Thanks Merc3y.)
	}
}  

public mirror_dmg(id)
{
	new damage = read_data(2) // Get damage
	new victim = read_data(0) // Victim(Thats you!)
	new attacker = get_user_attacker(victim) // Attacker(Your enemy)
	
	// Not alive or not a zombie
	if(!is_user_alive(id) || zp_get_user_zombie_class(id) != g_zclass_mirror || zp_get_user_nemesis(id) || zp_get_user_survivor(id))
		return PLUGIN_HANDLED
	
	if(get_pcvar_num(g_zclass_swarm) == 0)
	{
		if(zp_is_swarm_round())
			return PLUGIN_HANDLED
	}
	
	if(get_pcvar_num(g_zclass_plague) == 0)
	{
		if(zp_is_plague_round())
			return PLUGIN_HANDLED
	}
	
	if(get_pcvar_num (g_zclass_survivor) == 0)
	{
		if(zp_is_survivor_round())
			return PLUGIN_HANDLED
	}
	
	if(victim != attacker) // The victim cannot be himself
	{
		new HP = get_user_health(attacker) - damage
		if(HP > 0)
		{
			set_user_health(attacker,(HP))
		}
		else 
		{
			user_kill(attacker) // BUG FIX: This fix a bug that human doesn't die
		}
	}
	return PLUGIN_HANDLED
}
Could you please help me? thank you in advance.
victorrr is offline
 


Thread Tools
Display Modes

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 11:38.


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