Nemesis mod question & problem

General Discussion


Post Reply
empLea
Member
Member
Posts: 4
Joined: 3 years ago
Contact:

Nemesis mod question & problem

#1

Post by empLea » 2 years ago

I tested the latest version of Zombie escape 1.6.I'd say it's much better than other modes, but there's a problem.I want to use Nemesis mod, and unfortunately none of the plugins that pass as nemesis mod on the forum are what I want.The problem is that nemesis is chosen, but instead of killing nemesis, as in the classic zombie infection, it makes it a virus.Can someone tell me how to fix it, or can nemesis mode be used in this mode? Likewise, the nemesis leap doesn't work. :/

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

#2

Post by Night Fury » 2 years ago

What code do you use?
There has been several nemesis codes on the forum here
Want your own mod edition? PM me.
Accepting private projects.
Discord: Fury#7469
Image

empLea
Member
Member
Posts: 4
Joined: 3 years ago
Contact:

#3

Post by empLea » 2 years ago

I tried both plugins.But nemesis was spreading as an infection, and it haven't a leap. :/

viewtopic.php?f=15&t=3877 -- viewtopic.php?f=21&t=3642

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

#4

Post by Night Fury » 2 years ago

Try this code:

Code: Select all

/*
	If you need help visit : www.escapers-zone.net
	Compatible with: 1.6 Only 

	# Chane Logs: 
	- v1.0
		- Release
	- v1.1
		- Fix bugs
		- Use API ZE v1.6 
		- Added 2 cvars block freeze and burning !
*/

#include <zombie_escape>

// Defines 
#define MODEL_MAX_LENGTH 	64

// Enum 
enum _:TOTAL_COLORS { RED = 0, GREEN, BLUE }
enum _:TOTAL_NADES { FROST = 0, FIRE }

// File Setting 
new const ZE_SETTING_RESOURCE[] = "zombie_escape.ini"

// Default Models 
new const szNemesisModel[][MODEL_MAX_LENGTH] = { "ze_nemesis" }
new const szNemesisKnife[][MODEL_MAX_LENGTH] = { "models/zombie_escape/v_knife_nemesis.mdl" }

// Variablies
new g_bIsNemesis[MAX_PLAYERS + 1]
new g_pCvarHealth, g_pCvarSpeed, g_pCvarGravity, g_pCvarGlow, g_pCvarGlowColor[TOTAL_COLORS], g_pCvarKnockBack, g_pCvarDamage, g_pCvarNades[TOTAL_NADES]
new Array:g_szNemesisModel, Array:g_szNemesisKnife

public plugin_init()
{
	// Load plugin 
	register_plugin("[ZE] Class: Nemesis", "1.1", AUTHORS)

	// Cvars 
	g_pCvarHealth = register_cvar("ze_nemesis_health", "20000")
	g_pCvarSpeed = register_cvar("ze_nemesis_speed", "310")
	g_pCvarGravity = register_cvar("ze_nemesis_gravity", "500")
	g_pCvarGlow = register_cvar("ze_nemesis_glow", "1")
	g_pCvarGlowColor[RED] = register_cvar("ze_nemesis_glow_r", "255")
	g_pCvarGlowColor[GREEN] = register_cvar("ze_nemesis_glow_g", "0")
	g_pCvarGlowColor[BLUE] = register_cvar("ze_nemesis_glow_b", "0")
	g_pCvarNades[FROST] = register_cvar("ze_nemesis_freeze", "1")
	g_pCvarNades[FIRE] = register_cvar("ze_nemesis_fire", "1")
	g_pCvarKnockBack = register_cvar("ze_nemesis_knockback", "250")
	g_pCvarDamage = register_cvar("ze_nemesis_damage", "4")
}

public plugin_precache()
{
	// Initialise Arrays 
	g_szNemesisModel = ArrayCreate(MODEL_MAX_LENGTH, 1)
	g_szNemesisKnife = ArrayCreate(MODEL_MAX_LENGTH, 1)

	// Load from external file 
	amx_load_setting_string_arr(ZE_SETTING_RESOURCE, "Player Models", "NEMESIS", g_szNemesisModel)
	amx_load_setting_string_arr(ZE_SETTING_RESOURCE, "Weapon Models", "V_KNIFE NEMESIS", g_szNemesisKnife)

	new i
	if (ArraySize(g_szNemesisModel) == 0)
	{
		for (i = 0; i < sizeof(szNemesisModel); i++)
			ArrayPushString(g_szNemesisModel, szNemesisModel[i])

		// Save from external file 
		amx_save_setting_string_arr(ZE_SETTING_RESOURCE, "Player Models", "NEMESIS", g_szNemesisModel)
	}

	if (ArraySize(g_szNemesisKnife) == 0)
	{
		for (i = 0; i < sizeof(szNemesisKnife); i++)
			ArrayPushString(g_szNemesisKnife, szNemesisKnife[i])

		// Save from external file 
		amx_save_setting_string_arr(ZE_SETTING_RESOURCE, "Weapon Models", "V_KNIFE NEMESIS", g_szNemesisKnife)
	}

	// Precache Models 
	new szPlayerModel[MODEL_MAX_LENGTH], szModel[MODEL_MAX_LENGTH], szPathModel[MODEL_MAX_LENGTH * 2]
	for (i = 0; i < ArraySize(g_szNemesisModel); i++)
	{
		ArrayGetString(g_szNemesisModel, i, szPlayerModel, charsmax(szPlayerModel))
		formatex(szPathModel, charsmax(szPathModel), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
		precache_model(szPathModel)
	}

	for (i = 0; i < ArraySize(g_szNemesisKnife); i++)
	{
		ArrayGetString(g_szNemesisKnife, i, szModel, charsmax(szModel))
		precache_model(szModel)
	}
}

public plugin_natives()
{
	register_native("ze_set_user_nemesis", "native_ze_set_user_nemesis", 1)
	register_native("ze_is_user_nemesis", "native_ze_is_user_nemesis", 1)
}

public ze_frost_pre(iIndex)
{
	// Check from player is a nemesis 
	if (g_bIsNemesis[iIndex] && get_pcvar_num(g_pCvarNades[FROST]))
		return ZE_STOP
	return ZE_CONTINUE
}

public ze_fire_pre(iIndex)
{
	// Check from player is a nemesis 
	if (g_bIsNemesis[iIndex] && get_pcvar_num(g_pCvarNades[FIRE]))
		return ZE_STOP
	return ZE_CONTINUE
}

public ze_user_infected_pre(iVictim, iInfector, iDamage)
{
	if (iInfector != 0)
	{
		if (g_bIsNemesis[iInfector])
		{
			iDamage *= get_pcvar_num(g_pCvarDamage)

			// Damage human 
			new iHealth = rg_get_user_health(iVictim)

			if (iHealth > 0)
			{
				// Damage human 
				if ((iHealth - iDamage) > 0)
				{
					rg_set_user_health(iVictim, iHealth - iDamage)
				}
				else 
				{
					// Kill human 
					ExecuteHam(Ham_Killed, iVictim, iInfector, false)
				}
			}

			// Block infection.
			return ZE_STOP
		}
	}

	return ZE_CONTINUE
}

public Set_User_Nemesis(iIndex)
{
	// Set player nemesis 
	if (!g_bIsNemesis[iIndex])
		g_bIsNemesis[iIndex] = true 

	// Set player zombie if not 
	if (!ze_is_user_zombie(iIndex))
		ze_set_user_zombie(iIndex)

	// Set nemesis attributes
	rg_set_user_health(iIndex, get_pcvar_num(g_pCvarHealth))
	ze_set_zombie_speed(iIndex, get_pcvar_num(g_pCvarSpeed)) 
	ze_set_user_gravity(iIndex, get_pcvar_num(g_pCvarGravity))
	if (get_pcvar_num(g_pCvarGlow) != 0)
		Set_Rendering(iIndex, kRenderFxGlowShell, get_pcvar_num(g_pCvarGlowColor[RED]), get_pcvar_num(g_pCvarGlowColor[GREEN]), get_pcvar_num(g_pCvarGlowColor[BLUE]), kRenderNormal, 16)
	ze_set_user_knockback(iIndex, get_pcvar_float(g_pCvarKnockBack))

	// Set nemesis model (i use set_task because ze_resource is problem)
	set_task(1.0, "Set_Nemesis_Model", iIndex)
}

public Set_Nemesis_Model(iIndex)
{
	new szPlayerModel[MODEL_MAX_LENGTH]
	ArrayGetString(g_szNemesisModel, random_num(0, ArraySize(g_szNemesisModel) - 1), szPlayerModel, charsmax(szPlayerModel))
	rg_set_user_model(iIndex, szPlayerModel)	// Set nemesis model 

	new szModel[MODEL_MAX_LENGTH]
	ArrayGetString(g_szNemesisKnife, random_num(0, ArraySize(g_szNemesisKnife) - 1), szModel, charsmax(szModel))
	cs_set_player_view_model(iIndex, CSW_KNIFE, szModel)	// Set nemesis v_ knife 
	cs_set_player_weap_model(iIndex, CSW_KNIFE, "")			// Set nemesis p_ knife 
}

public Remove_User_Nemesis(iIndex)
{
	// Remove player nemesis 
	if (g_bIsNemesis[iIndex])
		g_bIsNemesis[iIndex] = false 

	// Remove nemesis attributes 
	ze_reset_zombie_speed(iIndex)
	ze_reset_user_knockback(iIndex)
	ze_reset_user_gravity(iIndex)
	Set_Rendering(iIndex)
}

// Functions Natives
public native_ze_set_user_nemesis(iIndex, bool:bSet)
{
	// Player is not a connected 
	if (!is_user_connected(iIndex))
	{
		log_error(AMX_ERR_NATIVE, "[ZE] Invalid Player (%d)", iIndex)
		return false 
	}

	if ( bSet )
	{
		if (!g_bIsNemesis[iIndex]) 
			Set_User_Nemesis(iIndex)
	}
	else 
	{
		if (g_bIsNemesis[iIndex]) 
			Remove_User_Nemesis(iIndex)
	}

	return true 
}

public native_ze_is_user_nemesis(iIndex)
{
	// Player is not a connected 
	if (!is_user_connected(iIndex))
	{
		log_error(AMX_ERR_NATIVE, "[ZE] Invalid Player (%d)", iIndex)
		return -1 
	}

	return g_bIsNemesis[iIndex] = true 
}

/// Stocks ///
stock rg_set_user_health(const index, amout)
{
	set_entvar(index, var_health, float(amout))
}

stock rg_get_user_health(const index)
{
	return floatround(get_entvar(index, var_health))
}
This leap code was separated but I forget where it was
But try the one in this: viewtopic.php?f=21&t=3642
Otherwise, post the code you're using
Want your own mod edition? PM me.
Accepting private projects.
Discord: Fury#7469
Image

empLea
Member
Member
Posts: 4
Joined: 3 years ago
Contact:

#5

Post by empLea » 2 years ago

Thank u, solved! <3

ngamerz
Member
Member
Philippines
Posts: 37
Joined: 3 years ago
Location: Philippines From South Korea

#6

Post by ngamerz » 2 years ago

empLea wrote: 2 years ago I tried both plugins.But nemesis was spreading as an infection, and it haven't a leap. :/

viewtopic.php?f=15&t=3877 -- viewtopic.php?f=21&t=3642
Actually you can make one via zp50 natives, you can port it. ZP50 API and ZE API are pretty much same.

ISSHIKI
Member
Member
India
Posts: 1
Joined: 2 years ago
Contact:

#7

Post by ISSHIKI » 2 years ago

Thanks guys for creating and providing the solution...saved my time😀kinemaster mod

User avatar
z0h1r-LK
Mod Developer
Mod Developer
Morocco
Posts: 473
Joined: 5 years ago
Location: The Red City ❤
Contact:

#8

Post by z0h1r-LK » 2 years ago


User avatar
z0h1r-LK
Mod Developer
Mod Developer
Morocco
Posts: 473
Joined: 5 years ago
Location: The Red City ❤
Contact:

#9

Post by z0h1r-LK » 1 year ago

Dishan wrote: 1 year ago Can i use both nemesis mode and leap long jump mode together? GBWhatsApp APK
This plugin is useless, Try use ze v1.7 is support nemesis/leap

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: No registered users and 2 guests