Gunxpmod Gun Run time error 19: function not found

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
Infamous2018
Извън линия
Foreigner
Foreigner
Мнения: 456
Регистриран на: 08 Апр 2018, 16:56
Се отблагодари: 14 пъти
Получена благодарност: 19 пъти

Gunxpmod Gun Run time error 19: function not found

Мнение от Infamous2018 » 16 Ное 2020, 17:12

L 11/16/2020 - 16:07:43: [AMXX] Displaying debug trace (plugin "elite_fire.amxx", version "1.2")
L 11/16/2020 - 16:07:43: [AMXX] Run time error 19: function not found
L 11/16/2020 - 16:07:43: [AMXX] [0] elite_fire.sma::plugin_init (line 37)
L 11/16/2020 - 16:07:48: Invalid CVAR pointer


Using 1.8.3 Compiler (need it for my Swarm Mod)


Can anyone help please to fix it?

Код за потвърждение: Избери целия код

#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
#include <cstrike>
#include <gxm_shop>

new g_elemental[33], bullets[33], g_zoom[33]
new tracer_spr, fire_spr, smoke_spr, g_burning[33], burn_time[33]

new  cvar_dmgmultiplier, cvar_burndmg, cvar_burntime, cvar_delay, cvar_minhealth, cvar_uclip, cvar_tracer

const SECONDARY_BIT_SUM = (1<<CSW_USP)|(1<<CSW_DEAGLE)|(1<<CSW_GLOCK18)|(1<<CSW_P228)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)

new const burn_sounds[][] = { "zombie_plague/zombie_burn3.wav", "zombie_plague/zombie_burn4.wav", "zombie_plague/zombie_burn5.wav",
"zombie_plague/zombie_burn6.wav", "zombie_plague/zombie_burn7.wav" }

new EL_V_MODEL[64] = "models/gunxp/v_Elemental.mdl"
new EL_P_MODEL[64] = "models/gunxp/p_Elemental.mdl"
new EL_W_MODEL[64] = "models/gunxp/w_Elemental.mdl"
new EL_OLD_W_MODEL[64] = "models/w_elite.mdl"
new ItemIndex;
public plugin_init()
{
	register_plugin("[ZP] Extra Item: Elemental", "1.2", "[P]erfec[T] [S]cr[@]s[H]")
	register_cvar("zp_elemental", "1.2", FCVAR_SERVER|FCVAR_SPONLY)
	
	cvar_dmgmultiplier = register_cvar("usbr_elemental_dmg_multiplier", "3")    	  // Elemental Damage Multipler
	cvar_uclip = register_cvar("usbr_elemental_unlimited_clip", "1")        		  // Unlimited Clip (0 - Off | 1 - On)
	cvar_tracer = register_cvar("usbr_elemental_tracers", "1")           		  // Tracer? (0 - Off | 1 - On)
	cvar_burndmg = register_cvar("usbr_elemental_fire_dmg", "10")      		  // Fire Damage (When burning the zm)
	cvar_burntime = register_cvar("usbr_elemental_fire_time", "12")        		  // Time will be burning
	cvar_delay = register_cvar("usbr_elemental_delay", "4.0")            		  // Time that led to the zm be burned again
	cvar_minhealth = register_cvar("usbr_elemental_fire_minhp", "50")        		  // Minimum HP for Zombie Burn

	
	// Events
	register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
	register_event("CurWeapon", "event_CurWeapon", "b", "1=1") 
	register_event("CurWeapon","checkWeapon","be","1=1")
	register_event("CurWeapon", "make_tracer", "be", "1=1", "3>0")
	
	// Forwards
	register_forward(FM_CmdStart, "fw_CmdStart")
	register_forward(FM_SetModel, "fw_SetModel")
	
	// Hams
	RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
	
	
	//register_gxm_item("Elemental dual [Fire] (Elite)", "+Power", 2400, 5, GUN_SECTION_PISTOL, GUN_SECOND_ACCESS_ID, CSW_ELITE);
	ItemIndex = gxm_register_pistol("Dual Fire Elite", 700,0,0,0,"10")
	
}

/*------------------------------------------=[Precaches]=--------------------------------------------*/
public plugin_precache() 
{
	// Models
	precache_model(EL_V_MODEL)
	precache_model(EL_P_MODEL)
	precache_model(EL_W_MODEL)
	precache_model(EL_OLD_W_MODEL)
	
	// Sounds
	precache_sound("warcraft3/impalehit.wav");
	
	// Tracer Spr
	tracer_spr = precache_model("sprites/dot.spr")
	
	precache_sound("weapons/zoom.wav")
	
	// Fire Spr
	fire_spr = precache_model("sprites/flame.spr")
	smoke_spr = precache_model("sprites/black_smoke3.spr")
	
	// Sound of Burning Zombies
	for(new i = 0; i < sizeof burn_sounds; i++) precache_sound(burn_sounds[i])
}

/*---------------------------------------=[Bug Prevention]=-----------------------------------------*/

public client_putinserver(id)
{
	g_elemental[id] = false
}

public client_disconnected(id)
{
	g_elemental[id] = false
}

public client_connect(id)
{
	g_elemental[id] = false
}

/*----------------------------------=[Action on Choose the Item]=------------------------------------*/
public gxm_pistol_selected(id, itemid) {
	if(ItemIndex == itemid)
	g_elemental[id] = true
}
/*----------------------------------------=[Custom Model]=-------------------------------------------*/
public event_CurWeapon(id)
{
	if (!is_user_alive(id)) return PLUGIN_HANDLED
	
	new g_Weapon = read_data(2)
	if (g_Weapon == CSW_ELITE && g_elemental[id])
	{
		set_pev(id, pev_viewmodel2, EL_V_MODEL)
		set_pev(id, pev_weaponmodel2, EL_P_MODEL)
	}
	return PLUGIN_CONTINUE
}

/*----------------------------------------=[Unlimited Clip]=------------------------------------------*/
public checkWeapon(id)
{
	new plrClip, plrAmmo, plrWeap[32], plrWeapId

	plrWeapId = get_user_weapon(id, plrClip , plrAmmo)
	
	if (plrWeapId == CSW_ELITE && g_elemental[id]) event_CurWeapon(id)
	else return PLUGIN_CONTINUE
	
	if (plrClip == 0 && get_pcvar_num(cvar_uclip))
	{
		// If the user is out of ammo..
		get_weaponname(plrWeapId, plrWeap, 31)
		give_item(id, plrWeap)
		engclient_cmd(id, plrWeap)  // Get the name of their weapon
		engclient_cmd(id, plrWeap)
		engclient_cmd(id, plrWeap)
	}
	return PLUGIN_HANDLED
}

/*----------------------------------------=[Weapon Tracer]=------------------------------------------*/
public make_tracer(id)
{
	if (get_pcvar_num(cvar_tracer))
	{
		new clip,ammo, wpnid = get_user_weapon(id,clip,ammo), pteam[16]
		get_user_team(id, pteam, 15)
		
		static iVictim, iDummy
		get_user_aiming(id, iVictim, iDummy, 9999);
		
		if ((bullets[id] > clip) && (wpnid == CSW_ELITE) && g_elemental[id])
		{
			new vec1[3], vec2[3], rgb[3]
			get_user_origin(id, vec1, 1) // origin; your camera point.
			get_user_origin(id, vec2, 4) // termina; where your bullet goes (4 is cs-only)
						
			switch(random_num(0,100))
			{
				case 1..30: rgb[0] = 0, rgb[1] = 100, rgb[2] = 255, set_user_weapon_anim(id, random_num(2,6))
				case 31..100: rgb[0] = 255, rgb[1] = 69, rgb[2] = 0, set_user_weapon_anim(id, random_num(8,12))			
			} 

			set_user_tracer(id, rgb[0], rgb[1], rgb[2])
		}
		bullets[id] = clip
	}
}

public set_user_tracer(id, R, G, B)
{
	if (get_pcvar_num(cvar_tracer))
	{
		new vec1[3], vec2[3]
		get_user_origin(id, vec1, 1) // origin; your camera point.
		get_user_origin(id, vec2, 4) // termina; where your bullet goes (4 is cs-only)

		//BEAMENTPOINTS
		message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
		write_byte (0)    //TE_BEAMENTPOINTS 0
		write_coord(vec1[0])
		write_coord(vec1[1])
		write_coord(vec1[2])
		write_coord(vec2[0])
		write_coord(vec2[1])
		write_coord(vec2[2])
		write_short(tracer_spr)
		write_byte(1) // framestart
		write_byte(5) // framerate
		write_byte(2) // life
		write_byte(10) // width
		write_byte(0) // noise
		write_byte(R) // r, g, b
		write_byte(G) // r, g, b
		write_byte(B) // r, g, b
		write_byte(200) // brightness
		write_byte(150) // speed
		message_end()
	}
}

/*-----------------------------------------=[Take Damage]=-------------------------------------------*/
public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type)
{
	if(is_user_alive(attacker) && g_elemental[attacker] && get_user_weapon(attacker) == CSW_ELITE)
	{
		SetHamParamFloat(4, damage * get_pcvar_float(cvar_dmgmultiplier))
		
		switch(random_num(0,100))
		{
			case 0..30: set_user_tracer(attacker, 0, 100, 255), set_user_weapon_anim(attacker, random_num(2,6))
			case 31..100: set_user_burn(victim), set_user_tracer(attacker, 255, 69, 0), set_user_weapon_anim(attacker, random_num(8,12))
		}
	}

	return PLUGIN_CONTINUE
}

/*-----------------------------------------=[Weapon Zoom]=-------------------------------------------*/
public fw_CmdStart(id, uc_handle, seed)
{
	new szClip, szAmmo, szWeapID = get_user_weapon(id, szClip, szAmmo)

	if(!is_user_alive(id) || szWeapID != CSW_ELITE && g_zoom[id]) 
	{
		g_zoom[id] = false
		cs_set_user_zoom(id, CS_RESET_ZOOM, 0)
		return PLUGIN_HANDLED;
	}

	if((get_uc(uc_handle, UC_Buttons) & IN_ATTACK2) && !(pev(id, pev_oldbuttons) & IN_ATTACK2))
	{		
		if(szWeapID == CSW_ELITE && g_elemental[id] && !g_zoom[id])
		{
			g_zoom[id] = true
			cs_set_user_zoom(id, CS_SET_AUGSG552_ZOOM, 0)
			emit_sound(id, CHAN_ITEM, "weapons/zoom.wav", 0.20, 2.40, 0, 100)
		}
		else if (szWeapID == CSW_ELITE && g_elemental[id] && g_zoom[id])
		{
			g_zoom[id] = false
			cs_set_user_zoom(id, CS_RESET_ZOOM, 0)
		}
	}	
	return PLUGIN_HANDLED
}

/*-----------------------------------------=[World Model]=-------------------------------------------*/
public fw_SetModel(entity, model[])
{
	if(!pev_valid(entity) || !equal(model, EL_OLD_W_MODEL)) return FMRES_IGNORED;
	
	static szClassName[33]; pev(entity, pev_classname, szClassName, charsmax(szClassName))
	if(!equal(szClassName, "weaponbox")) return FMRES_IGNORED;
	
	static owner, wpn
	owner = pev(entity, pev_owner)
	wpn = find_ent_by_owner(-1, "weapon_elite", entity)
	
	if(g_elemental[owner] && pev_valid(wpn))
	{
		engfunc(EngFunc_SetModel, entity, EL_W_MODEL)
		
		return FMRES_SUPERCEDE
	}
	return FMRES_IGNORED
}

/*-------------------------------------=[Flame Power and Effects]=-----------------------------------*/
public set_user_burn(victim)
{
	if(is_user_alive(victim))
	{
		if(!g_burning[victim] && get_user_health(victim) > get_pcvar_num(cvar_minhealth))
		{
			burn_time[victim] = get_pcvar_num(cvar_burntime)
						
			g_burning[victim] = true // Burn / ON
			set_burn_flame(victim) // Burn victim
						
						
			// Emit burn sound      
			emit_sound(victim, CHAN_VOICE, burn_sounds[random_num(0, sizeof burn_sounds - 1)], 1.0, ATTN_NORM, 0, PITCH_NORM )  
		}
		set_aura_effect(victim, 255, 69, 0, 50)
	}
}

public set_burn_flame(victim)
{
	// Get user origin
	static Origin[3]; get_user_origin(victim, Origin)
	
	// If burn time is over or victim are in water
	if(burn_time[victim] <= 0 || pev(victim, pev_flags) & FL_INWATER)
	{   
		// Show Smoke sprite   
		message_begin(MSG_PVS, SVC_TEMPENTITY, Origin)
		write_byte(TE_SMOKE) // TE id
		write_coord(Origin[0]) // x
		write_coord(Origin[1]) // y
		write_coord(Origin[2]-50) // z
		write_short(smoke_spr) // sprite
		write_byte(random_num(15, 20)) // scale
		write_byte(random_num(10, 20)) // framerate
		message_end()
		
		// Delay to allow burn again
		set_task(get_pcvar_float(cvar_delay), "Stop", victim)
		
		return
	}
	else
	{      
		// At half-burntime
		if(get_pcvar_num(cvar_burntime) * 0.5 == burn_time[victim]) emit_sound(victim, CHAN_VOICE, burn_sounds[random_num(0, charsmax(burn_sounds))], 1.0, ATTN_NORM, 0, PITCH_NORM) // Play another sound
		
		// Flame sprite   
		message_begin(MSG_PVS, SVC_TEMPENTITY, Origin)
		write_byte(TE_SPRITE) // TE id
		write_coord(Origin[0]+random_num(-5, 5)) // x
		write_coord(Origin[1]+random_num(-5, 5)) // y
		write_coord(Origin[2]+random_num(-10, 10)) // z
		write_short(fire_spr) // sprite
		write_byte(random_num(5, 10)) // scale
		write_byte(200) // brightness
		message_end()
		
		// Decrease Time
		burn_time[victim]--
		
		// Decrease life (random)
		set_user_health(victim, get_user_health(victim) - get_pcvar_num(cvar_burndmg))
		
		// Stop fire if health <= min health.
		if(get_user_health(victim) <= get_pcvar_num(cvar_minhealth))
		{
			g_burning[victim] = false
			return
		}
		
		// Repeat
		set_task(0.5, "set_burn_flame", victim)
	}
}

public Stop(victim) g_burning[victim] = false // Allow burn again

stock set_aura_effect(id, r, g, b, size)
{
	static Float:originF3[3]; pev(id, pev_origin, originF3)
	
	// Efeito da Aura
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF3, 0)
	write_byte(TE_DLIGHT) // TE id
	engfunc(EngFunc_WriteCoord, originF3[0]) // x
	engfunc(EngFunc_WriteCoord, originF3[1]) // y
	engfunc(EngFunc_WriteCoord, originF3[2]) // z
	write_byte(size) // radio
	write_byte(r) // r
	write_byte(g) // g
	write_byte(b) // b
	write_byte(30) // vida en 0.1, 30 = 3 segundos
	write_byte(30) // velocidad de decaimiento
	message_end() 
}

/*---------------------------------------------=[Stocks]=--------------------------------------------*/
// Glow Without using the Include fakemeta_util
stock fm_set_rendering(entity, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16)
{
	static Float:color[3]
	color[0] = float(r)
	color[1] = float(g)
	color[2] = float(b)
	
	set_pev(entity, pev_renderfx, fx)
	set_pev(entity, pev_rendercolor, color)
	set_pev(entity, pev_rendermode, render)
	set_pev(entity, pev_renderamt, float(amount))
} 

stock give_item(index, const item[]) 
{
	if (!equal(item, "weapon_", 7) && !equal(item, "ammo_", 5) && !equal(item, "item_", 5) && !equal(item, "tf_weapon_", 10))
		return 0;

	new ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, item));
	
	if (!pev_valid(ent))
		return 0;

	new Float:origin[3];
	pev(index, pev_origin, origin);
	set_pev(ent, pev_origin, origin);
	set_pev(ent, pev_spawnflags, pev(ent, pev_spawnflags) | SF_NORESPAWN);
	dllfunc(DLLFunc_Spawn, ent);

	new save = pev(ent, pev_solid);
	dllfunc(DLLFunc_Touch, ent, index);
	if (pev(ent, pev_solid) != save)
		return ent;

	engfunc(EngFunc_RemoveEntity, ent);

	return -1;
}

stock set_user_health(index, health) 
{
	health > 0 ? set_pev(index, pev_health, float(health)) : dllfunc(DLLFunc_ClientKill, index);
	return 1;
}

stock find_ent_by_owner(index, const classname[], owner, jghgtype = 0) {
	new strtype[11] = "classname", ent = index;
	switch (jghgtype) {
		case 1: strtype = "target";
		case 2: strtype = "targetname";
	}

	while ((ent = engfunc(EngFunc_FindEntityByString, ent, strtype, classname)) && pev(ent, pev_owner) != owner) {}

	return ent;
}

stock drop_prim(id) 
{
	new weapons[32], num
	get_user_weapons(id, weapons, num)
	for (new i = 0; i < num; i++) 
	{
		if (SECONDARY_BIT_SUM & (1<<weapons[i])) 
		{
			static wname[32]
			get_weaponname(weapons[i], wname, sizeof wname - 1)
			engclient_cmd(id, "drop", wname)
		}
	}
}

stock set_user_weapon_anim(id, anim)
{
	set_pev(id, pev_weaponanim, anim)
	message_begin(MSG_ONE_UNRELIABLE, SVC_WEAPONANIM, {0, 0, 0}, id)
	write_byte(anim)
	write_byte(pev(id, pev_body))
	message_end()
}

// Colored Chat (client_printcolor)
stock client_printcolor(const id, const input[], any:...)
{
	new count = 1, players[32]
	static msg[191]
	vformat(msg, 190, input, 3)
	
	replace_all(msg, 190, "/g", "^4")  // Green Chat
	replace_all(msg, 190, "/y", "^1")  // Normal Chat
	replace_all(msg, 190, "/t", "^3")  // Team Chat
	
	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();
			}
		}
	}
}

Код за потвърждение: Избери целия код

// Gun Xp Mod Include File //
#if defined _gunxpmod_included
  #endinput
#endif
#define _gunxpmod_included

#if !defined charsmax
    #define charsmax(%1) sizeof(%1)-1
#endif 

// Returns player Experience.
native get_user_xp(id)

// Sets player Experience.
native set_user_xp(id, amount)

// Returns player Level.
native get_user_level(id)

// Sets player Level.
native set_user_level(id, amount)

// Returns player Level by Xp.
native get_user_max_level(id)

// Return player prestige
native get_user_prestige(id)

// Sets player prestige
native set_user_prestige(id, amount)

// Sets player save type
native set_user_save_type(id, amount)

// Gets player save type
native get_user_save_type(id)

// check_level(id)
native check_level_native(id)

// Sets xp enabled
native set_xp_enabled(id, bool:enabled)

// Sends unlocks list to core plugin. Used for gunxp shop
native send_unlocks_list(id, list[])


// Check if loaded. Fix dissappearing bug
native get_xp_loaded(id)
native set_xp_loaded(id, bool:set)
native get_power_loaded(id)

native get_password(id, psw[])
native set_pass(id, psw[])

// 0 - IP ; 1 - Steam ; 2 - Name
forward OnSaveTypeChange(id, which)
// 0 - Not Loaded Yet ; 1 - Loaded
forward OnPowersLoaded(id, condition)

// Used to add XP with gxm_add_kill_text(id, xp, string[])
forward XPOnPreKill(id)
forward XPOnPreInfect(id)
forward XPOnPreDamage(id)

forward OnLevelSaveDisconnect(id)
forward OnLevelSave(id, xp, prestige)
forward OnLevelLoad(id)
forward OnLevelLoaded(id, szAuth[], xp, prestige)
forward XPOnItemBought(id, name[], cost)

native gxm_add_kill_text(id, xp, string[])
native gxm_add_damage_text(id, xp, string[])
native gxm_add_bonus(id, xp, string[])


// Translates into multilanguage
stock Translate(const key[], client)
{
	new translation[64];
	formatex(translation, charsmax(translation), "%L", client, key);
	
	return translation;
}

stock client_printcolor(const id, const input[], any:...)
{
	new count = 1, players[32];
	static msg[191];
	vformat(msg,190,input,3);
	replace_all(msg,190,"/g","^4");// green txt
	replace_all(msg,190,"/y","^1");// orange txt
	replace_all(msg,190,"/ctr","^3");// team txt
	replace_all(msg,190,"/w","^0");// team txt
	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();
		}
}

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 6721
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 115 пъти
Получена благодарност: 935 пъти
Обратна връзка:

Gunxpmod Gun Run time error 19: function not found

Мнение от OciXCrom » 16 Ное 2020, 20:12

Код за потвърждение: Избери целия код

register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
There is no "event_round_start" function in the code. Either remove this line or find and add the missing function.

Аватар
Infamous2018
Извън линия
Foreigner
Foreigner
Мнения: 456
Регистриран на: 08 Апр 2018, 16:56
Се отблагодари: 14 пъти
Получена благодарност: 19 пъти

Gunxpmod Gun Run time error 19: function not found

Мнение от Infamous2018 » 16 Ное 2020, 20:20

ANd how should i know what is the missing function ? xD

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 6721
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 115 пъти
Получена благодарност: 935 пъти
Обратна връзка:

Gunxpmod Gun Run time error 19: function not found

Мнение от OciXCrom » 16 Ное 2020, 21:10

Same goes for me. Delete the line if you have no idea.

Аватар
Infamous2018
Извън линия
Foreigner
Foreigner
Мнения: 456
Регистриран на: 08 Апр 2018, 16:56
Се отблагодари: 14 пъти
Получена благодарност: 19 пъти

Gunxpmod Gun Run time error 19: function not found

Мнение от Infamous2018 » 16 Ное 2020, 21:30

Ok thx. Its solved like this way. ♥

Публикувай отговор
  • Подобни теми
    Отговори
    Преглеждания
     Последно мнение

Обратно към “Заявки за плъгини”

Кой е на линия

Потребители разглеждащи този форум: Google [Bot] и 8 госта