[ZE] Nemesis Round [Fixed]

Useless Stuffs, Spam ... etc
Muhammet20
Veteran Member
Veteran Member
Posts: 408
Joined: 5 years ago
Contact:

[ZE] Nemesis Round [Fixed]

#1

Post by Muhammet20 » 4 years ago

Hi All,
I know that i posted this plugin before,
but wasn't working,
now i'am sure my plugin working i changed the codes fully,
i hope you will give a try for it,

Special Thanks To:

@Raheem
@Jack Gameplay
@Lizoumapper


Commands:
______________

Code: Select all

"ze_nemesis_chance" "20"
"ze_nemesis_gravity" "650"
"ze_nemesis_health" "30000"
"ze_nemesis_speed" "330"
"ze_nemesis_glow" "1"
"ze_nemesis_leap" "1"
Codes:
_____________

1- Nemesis Round

Code: Select all

#include <zombie_escape>
#include <fun>

new g_nemesis_round, g_cvar_nemesis_chance, g_cvar_nemesis_gravity, g_cvar_nemesis_health, g_cvar_nemesis_speed, g_cvar_nemesis_glow, g_cvar_nemesis_leap
new g_MaxPlayers

native give_longjump(id)
public plugin_init()
{
	register_plugin("[ZE] Nemsis round", "1.0", "Kaya Gaming")	
	
	register_event("HLTV", "event_newround", "a", "1=0", "2=0")
	
	register_event("Damage", "Damage", "b", "2!=0")
	
	g_cvar_nemesis_chance = register_cvar("ze_nemesis_chance","20")
	g_cvar_nemesis_gravity = register_cvar("ze_nemesis_gravity","650")
	g_cvar_nemesis_health = register_cvar("ze_nemesis_health","30000")
	g_cvar_nemesis_speed = register_cvar("ze_nemesis_speed","330")
	g_cvar_nemesis_glow = register_cvar("ze_nemesis_glow","1")
	g_cvar_nemesis_leap = register_cvar("ze_nemesis_leap","1")
	
	g_MaxPlayers = get_maxplayers();
}
public plugin_natives()
{
	register_native("ze_is_nemesis_round","native_nemesis_round",1)
}
public native_nemesis_round(id)
{
	return g_nemesis_round
}
public Damage(id)
{
 	new g_attacker = read_data(1)
	new g_victim = read_data(2)
	
	if(g_attacker != g_victim && ze_is_user_zombie(g_attacker) && g_nemesis_round)
	{
		user_silentkill(g_victim)
	}
	return PLUGIN_CONTINUE
}
public event_newround(id)
{
	if(random_num(1, get_pcvar_num(g_cvar_nemesis_chance)) == 1)
	{
		g_nemesis_round = true
	}
}
public ze_zombie_appear()
{
	if(g_nemesis_round)
	{
		for(new id = 0; id < g_MaxPlayers; id++)
		{
			client_cmd(id,"spk zombie_escape/Nemesis_scream.wav")
			set_hudmessage(255, 0, 0, -1.0, 0.30, 0, 6.0, 6.0)
			show_hudmessage(id, "=== Nemesis Round ===")
			if(ze_is_user_zombie(id))
			{
				nemesis_features(id)
			}
		}
	}
}
public nemesis_features(id)
{
	// User Zombie ? Nemesis Round ?
	if(!ze_is_user_zombie(id) && !g_nemesis_round)
		return
	
	// Nemesis Glow
	if(get_pcvar_num(g_cvar_nemesis_glow) == 1)
		Set_Rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 25)
		
	// Nemesis Leap Jump
	if(get_pcvar_num(g_cvar_nemesis_leap) == 1)
		give_longjump(id)
		
	// Nemesis Gravity
	set_user_gravity(id,get_pcvar_float(g_cvar_nemesis_gravity))
	
	// Nemesis Health
	set_user_health(id,get_pcvar_num(g_cvar_nemesis_health))
	
	// Nemesis Speed
	fm_set_user_speed(id,get_pcvar_float(g_cvar_nemesis_speed))
}
public ze_roundend(id)
{
	Set_Rendering(id, kRenderFxNone, 255, 255, 255, kRenderNormal, 16)
	g_nemesis_round = false
}
stock fm_set_user_speed(id, Float:Speed)
{
	set_pev(id, pev_maxspeed, Speed)
}
2- Nemesis Model & Knife/Claw

Code: Select all

#include <zombie_escape>

// Setting File
new const ZE_SETTING_RESOURCES[] = "nemesis_models.ini"

// Defines
#define MODEL_MAX_LENGTH 64
#define PLAYERMODEL_MAX_LENGTH 32
#define ACCESS_MAX_LENGTH 32

// Default Models
new const szNemesisZombieModel[][] = 
{
	"ze_nemesis_host"
}
new const v_szNemesisZombieKnifeModel[][] = 
{
	"models/zombie_escape/v_knife_nemesis.mdl"
}

// Dynamic Arrays: Models
new Array:g_szNemesisZombieModel, Array:g_v_szNemesisZombieKnifeModel

native ze_is_nemesis_round(id)
public plugin_init()
{
	register_plugin("[ZE] Nemesis Model & Claw", "1.0", "Kaya Gaming")
}

public plugin_precache()
{
	// Initialize Arrays
	g_szNemesisZombieModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
	g_v_szNemesisZombieKnifeModel = ArrayCreate(MODEL_MAX_LENGTH, 1)
	
	// Load From External File
	amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "NEMESIS_ZOMBIE_MODEL", g_szNemesisZombieModel)
	amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Weapon Models", "NEMESIS_ZOMBIE_CLAW", g_v_szNemesisZombieKnifeModel)
	
	// Load our Default Values
	new iIndex
	if(ArraySize(g_szNemesisZombieModel) == 0)
	{
		for(iIndex = 0; iIndex < sizeof szNemesisZombieModel; iIndex++)
			ArrayPushString(g_szNemesisZombieModel, szNemesisZombieModel[iIndex])
		
		// Save to external file
		amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "NEMESIS_ZOMBIE_MODEL", g_szNemesisZombieModel)
	}
	if(ArraySize(g_v_szNemesisZombieKnifeModel) == 0)
	{
		for(iIndex = 0; iIndex < sizeof v_szNemesisZombieKnifeModel; iIndex++)
			ArrayPushString(g_v_szNemesisZombieKnifeModel, v_szNemesisZombieKnifeModel[iIndex])
		
		// Save to external file
		amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Weapon Models", "NEMESIS_ZOMBIE_CLAW", g_v_szNemesisZombieKnifeModel)
	}
	// Precache
	new szPlayerModel[PLAYERMODEL_MAX_LENGTH], szModel[MODEL_MAX_LENGTH], szModelPath[128]
	
	for (iIndex = 0; iIndex < ArraySize(g_szNemesisZombieModel); iIndex++)
	{
		ArrayGetString(g_szNemesisZombieModel, iIndex, szPlayerModel, charsmax(szPlayerModel))
		formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
		precache_model(szModelPath)
	}
	
	for (iIndex = 0; iIndex < ArraySize(g_szNemesisZombieModel); iIndex++)
	{
		ArrayGetString(g_szNemesisZombieModel, iIndex, szPlayerModel, charsmax(szPlayerModel))
		formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
		precache_model(szModelPath)
	}
	for (iIndex = 0; iIndex < ArraySize(g_v_szNemesisZombieKnifeModel); iIndex++)
	{
		ArrayGetString(g_v_szNemesisZombieKnifeModel, iIndex, szModel, charsmax(szModel))
		precache_model(szModel)
	}
}
public ze_user_infected(iVictim, iInfector)
{
	if(!is_user_alive(iVictim))
		return
		
	// Set Zombie Models
	new szPlayerModel[PLAYERMODEL_MAX_LENGTH], szModel[MODEL_MAX_LENGTH]
	
	// Nemesis Round?
	if(ze_is_nemesis_round(iVictim))
	{
		// Set Zombie Nemesis Model
		ArrayGetString(g_szNemesisZombieModel, random_num(0, ArraySize(g_szNemesisZombieModel) - 1), szPlayerModel, charsmax(szPlayerModel))
		rg_set_user_model(iVictim, szPlayerModel)
		
		// Set Nemesis Zombie Knife Model
		ArrayGetString(g_v_szNemesisZombieKnifeModel, random_num(0, ArraySize(g_v_szNemesisZombieKnifeModel) - 1), szModel, charsmax(szModel))
		cs_set_player_view_model(iVictim, CSW_KNIFE, szModel)
		cs_set_player_weap_model(iVictim, CSW_KNIFE, "") // Leave Blank so knife not appear with zombies
	}
}
3- Leap Jump ------ [Info: don't replace original extra item]

Code: Select all

#include <zombie_escape>

#define PLUGIN "[ZE] Extra Item:Leap"
#define VERSION "1.5.7"
#define AUTHOR "Fry!"

/*================================================================================
 [Plugin Customization]
=================================================================================*/

new bool:g_hasLongJump[33],g_SayText
new Float:g_last_LongJump_time[33]
new g_LongJump_force, g_LongJump_height, g_LongJump_cooldown
public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_cvar("ze_leap",VERSION,FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY)
	
	g_LongJump_force = register_cvar("ze_longjump_force", "580")
	g_LongJump_height = register_cvar("ze_longjump_height", "320")
	g_LongJump_cooldown = register_cvar("ze_longjump_cooldown", "5.0")
	
	register_forward(FM_PlayerPreThink, "fw_PlayerPreThink")
	
	register_event("DeathMsg", "death", "a")
	register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
	g_SayText = get_user_msgid("SayText")
}
public plugin_natives()
{
	register_native("give_longjump","native_give_longjump",1)
}
public native_give_longjump(id)
{
	if(ze_is_user_zombie(id))
	{
		g_hasLongJump[id] = true
	}
	else
	{
		g_hasLongJump[id] = false
	}
}
stock Color(const id, const input[], any:...)
{
	static msg[191]
	vformat(msg, 190, input, 3)
	
	replace_all(msg, 190, "!g", "^4")
	replace_all(msg, 190, "!y", "^1")
	replace_all(msg, 190, "!t", "^3")
	
	message_begin(MSG_ONE_UNRELIABLE, g_SayText, _, id)
	write_byte(id)
	write_string(msg)
	message_end()
}
// Reset on disconnection
public client_disconnected(id)
{
	g_hasLongJump[id] = false
}

// Reset on death
public death()
{
	g_hasLongJump[read_data(2)] = false
}

// Reset if turned into human
public ze_user_humanized(id)
{
	g_hasLongJump[id] = false
}

// Reset at round start (for everyone)
public event_round_start()
{
	for (new i = 1; i <= 32; i++)
		g_hasLongJump[i] = false
}	
public fw_PlayerPreThink(id)
{
	if (!is_user_alive(id))
		return FMRES_IGNORED
	
	if (allow_LongJump(id))
	{
		static Float:velocity[3]
		velocity_by_aim(id, get_pcvar_num(g_LongJump_force), velocity)
		
		velocity[2] = get_pcvar_float(g_LongJump_height)
		
		set_pev(id, pev_velocity, velocity)
		
		g_last_LongJump_time[id] = get_gametime()
	}
	
	return FMRES_IGNORED
}

// Check if the player can longjump
allow_LongJump(id)
{
	if (!g_hasLongJump[id])
		return false
	
	if (!(pev(id, pev_flags) & FL_ONGROUND) || fm_get_speed(id) < 80)
		return false
	
	static buttons
	buttons = pev(id, pev_button)
	
	if (!is_user_bot(id) && (!(buttons & IN_JUMP) || !(buttons & IN_DUCK)))
		return false
	
	if (get_gametime() - g_last_LongJump_time[id] < get_pcvar_float(g_LongJump_cooldown))
		return false
		
	if(g_last_LongJump_time[id] == get_pcvar_float(g_LongJump_cooldown))
	{
		client_print(id,print_chat,"[ZE] You can use the Leap Jump now.")
		return true
	}
	
	return true
}

// Get entity's speed (from fakemeta_util)
stock fm_get_speed(entity)
{
	static Float:velocity[3]
	pev(entity, pev_velocity, velocity)
	
	return floatround(vector_length(velocity))
}
Resources:
__________________
Nemesis Round.rar
Nemesis Round's Resouces: Model+Claw+Config File
(936.32 KiB) Downloaded 638 times
Nemesis Round.rar
Nemesis Round's Resouces: Model+Claw+Config File
(936.32 KiB) Downloaded 638 times
[Note]
What i added for this plugin ?
I Make It In A Random Round
Last edited by Muhammet20 4 years ago, edited 23 times in total.

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

#2

Post by z0h1r-LK » 4 years ago

Nice You Awesome
I try this work or not work
Cool ... :)

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

#3

Post by z0h1r-LK » 4 years ago

You can use skins nemesis
copy skins model and claw in my topic nemesis round ok :D

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

#4

Post by z0h1r-LK » 4 years ago

Plugins don't Compiler fix plz

Code: Select all

AMX Mod X Compiler 1.9.0.5241
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team

Error: Function heading differs from prototype on line 46
Error: Undefined symbol "starttype" on line 67
Warning: Loose indentation on line 67
Warning: Expression has no effect on line 67
Warning: Expression has no effect on line 67
Warning: Expression has no effect on line 67
Warning: Expression has no effect on line 67
Warning: Expression has no effect on line 67
Warning: Expression has no effect on line 67
Error: Expected token: ";", but found ")" on line 67
Error: Invalid expression, assumed zero on line 67
Error: Too many error messages on one line on line 67

Compilation aborted.
5 Errors.
Could not locate output file C:\Users\poste1\Desktop\ze_nemesis.amx (compile failed).


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

#5

Post by z0h1r-LK » 4 years ago

this is ze_nemesis_model plugin :(

Code: Select all

AMX Mod X Compiler 1.9.0.5241
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team

Error: Undefined symbol "i" on line 37
Warning: Redundant code: constant expression is zero on line 37
Error: Undefined symbol "i" on line 37
Error: Expected token: ")", but found ";" on line 37
Error: Too many error messages on one line on line 37

Compilation aborted.
4 Errors.
Could not locate output file C:\Users\poste1\Desktop\ze_nemesis_model.amx (compile failed).

Muhammet20
Veteran Member
Veteran Member
Posts: 408
Joined: 5 years ago
Contact:

#6

Post by Muhammet20 » 4 years ago

okay bro will fix when open my pc
sorry for that bro

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

#7

Post by z0h1r-LK » 4 years ago

I Fixed all Problem in ze_nemesis_round
ze_nemesis.sma
FIX FIX FIX FIX FIX FIX FIX FIX FIX FIX FIX FIX
(2.54 KiB) Downloaded 544 times
ze_nemesis.sma
FIX FIX FIX FIX FIX FIX FIX FIX FIX FIX FIX FIX
(2.54 KiB) Downloaded 544 times

Muhammet20
Veteran Member
Veteran Member
Posts: 408
Joined: 5 years ago
Contact:

#8

Post by Muhammet20 » 4 years ago

lizoumapper wrote: 4 years ago I Fixed all Problem in ze_nemesis_round

ze_nemesis.sma
i fixed it too check again

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 » 4 years ago

problem in ze_nemesis_model not compiled

Muhammet20
Veteran Member
Veteran Member
Posts: 408
Joined: 5 years ago
Contact:

#10

Post by Muhammet20 » 4 years ago

lizoumapper wrote: 4 years ago problem in ze_nemesis_model not compiled
any error messages ?

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

#11

Post by z0h1r-LK » 4 years ago

yes this :

Code: Select all

AMX Mod X Compiler 1.9.0.5241
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team

Error: Undefined symbol "temp_string" on line 39
Error: Number of arguments does not match definition on line 39
Error: "sizeof" operator is invalid on "function" symbols on line 39
Error: Too many error messages on one line on line 39

Compilation aborted.
4 Errors.
Could not locate output file C:\Users\poste1\Desktop\ze_nemesis_models.amx (compile failed).


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

#12

Post by z0h1r-LK » 4 years ago

ze_nemesis_models not compiler

Muhammet20
Veteran Member
Veteran Member
Posts: 408
Joined: 5 years ago
Contact:

#13

Post by Muhammet20 » 4 years ago

okay now is night here in my country
tommorow i will fix it

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#14

Post by Raheem » 4 years ago

So which one working? Yours or [mention]lizoumapper[/mention] one? Got confused.
He who fails to plan is planning to fail

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

#15

Post by z0h1r-LK » 4 years ago

@Raheem
This private created by Muhammet20
I help only

Muhammet20
Veteran Member
Veteran Member
Posts: 408
Joined: 5 years ago
Contact:

#16

Post by Muhammet20 » 4 years ago

Raheem wrote: 4 years ago So which one working? Yours or @lizoumapper one? Got confused.
two plugins working
the difference is my plugin in a random round
and lizoumapper's plugin is in the first round

Muhammet20
Veteran Member
Veteran Member
Posts: 408
Joined: 5 years ago
Contact:

#17

Post by Muhammet20 » 4 years ago

fixed, check again

Muhammet20
Veteran Member
Veteran Member
Posts: 408
Joined: 5 years ago
Contact:

#18

Post by Muhammet20 » 4 years ago

@Raheem my plugin working with map time left and map rounds left

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

#19

Post by z0h1r-LK » 4 years ago

@Muhammet20 your plugin is prefect
plugin is moved topic off ok that is bad nemesis in first round is not good
nice your fix all thing, are you fix ze_nemesis_mode not compiled

Muhammet20
Veteran Member
Veteran Member
Posts: 408
Joined: 5 years ago
Contact:

#20

Post by Muhammet20 » 4 years ago

lizoumapper wrote: 4 years ago @Muhammet20 your plugin is prefect
plugin is moved topic off ok that is bad nemesis in first round is not good
nice your fix all thing, are you fix ze_nemesis_mode not compiled
yyes bro i fixed it i said check again
and thanks bro for this nice words :)

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