[ZE] Nemesis Round [Fixed]

Useless Stuffs, Spam ... etc
Post Reply
User avatar
Muhammet20
Veteran Member
Veteran Member
Syria
Posts: 399
Joined: 1 Year Ago
Location: Turkey
Has thanked: 36 times
Been thanked: 5 times
Age: 13
Contact:

[ZE] Nemesis Round [Fixed]

#1

Post by Muhammet20 » 3 Months 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 29 times
Nemesis Round.rar
Nemesis Round's Resouces: Model+Claw+Config File
(936.32 KiB) Downloaded 29 times
[Note]
What i added for this plugin ?
I Make It In A Random Round
Last edited by Muhammet20 on 02 Aug 2019, 20:43, edited 23 times in total.
.::Kaya Gaming || Never Give Up || Zombie Escape::. [Server is Under The Work]
https://kaya-gaming.ga/

I just believe in two things, First thing is who i see in the mirror, second thing is who i don't see in the sky.

User avatar
lizoumapper
Senior Member
Senior Member
Morocco
Posts: 150
Joined: 9 Months Ago
Location: Morocco
Has thanked: 3 times
Been thanked: 7 times
Age: 17
Contact:

#2

Post by lizoumapper » 3 Months Ago

Nice You Awesome
I try this work or not work
Cool ... :)
I Love Learn Languages Programmations

User avatar
lizoumapper
Senior Member
Senior Member
Morocco
Posts: 150
Joined: 9 Months Ago
Location: Morocco
Has thanked: 3 times
Been thanked: 7 times
Age: 17
Contact:

#3

Post by lizoumapper » 3 Months Ago

You can use skins nemesis
copy skins model and claw in my topic nemesis round ok :D
I Love Learn Languages Programmations

User avatar
lizoumapper
Senior Member
Senior Member
Morocco
Posts: 150
Joined: 9 Months Ago
Location: Morocco
Has thanked: 3 times
Been thanked: 7 times
Age: 17
Contact:

#4

Post by lizoumapper » 3 Months 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).

I Love Learn Languages Programmations

User avatar
lizoumapper
Senior Member
Senior Member
Morocco
Posts: 150
Joined: 9 Months Ago
Location: Morocco
Has thanked: 3 times
Been thanked: 7 times
Age: 17
Contact:

#5

Post by lizoumapper » 3 Months 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).
I Love Learn Languages Programmations

User avatar
Muhammet20
Veteran Member
Veteran Member
Syria
Posts: 399
Joined: 1 Year Ago
Location: Turkey
Has thanked: 36 times
Been thanked: 5 times
Age: 13
Contact:

#6

Post by Muhammet20 » 3 Months Ago

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

[ Post made via Android ]
.::Kaya Gaming || Never Give Up || Zombie Escape::. [Server is Under The Work]
https://kaya-gaming.ga/

I just believe in two things, First thing is who i see in the mirror, second thing is who i don't see in the sky.

User avatar
lizoumapper
Senior Member
Senior Member
Morocco
Posts: 150
Joined: 9 Months Ago
Location: Morocco
Has thanked: 3 times
Been thanked: 7 times
Age: 17
Contact:

#7

Post by lizoumapper » 3 Months 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 18 times
ze_nemesis.sma
FIX FIX FIX FIX FIX FIX FIX FIX FIX FIX FIX FIX
(2.54 KiB) Downloaded 18 times
I Love Learn Languages Programmations

User avatar
Muhammet20
Veteran Member
Veteran Member
Syria
Posts: 399
Joined: 1 Year Ago
Location: Turkey
Has thanked: 36 times
Been thanked: 5 times
Age: 13
Contact:

#8

Post by Muhammet20 » 3 Months Ago

lizoumapper wrote:
3 Months Ago
I Fixed all Problem in ze_nemesis_round

ze_nemesis.sma
i fixed it too check again
.::Kaya Gaming || Never Give Up || Zombie Escape::. [Server is Under The Work]
https://kaya-gaming.ga/

I just believe in two things, First thing is who i see in the mirror, second thing is who i don't see in the sky.

User avatar
lizoumapper
Senior Member
Senior Member
Morocco
Posts: 150
Joined: 9 Months Ago
Location: Morocco
Has thanked: 3 times
Been thanked: 7 times
Age: 17
Contact:

#9

Post by lizoumapper » 3 Months Ago

problem in ze_nemesis_model not compiled
I Love Learn Languages Programmations

User avatar
Muhammet20
Veteran Member
Veteran Member
Syria
Posts: 399
Joined: 1 Year Ago
Location: Turkey
Has thanked: 36 times
Been thanked: 5 times
Age: 13
Contact:

#10

Post by Muhammet20 » 3 Months Ago

lizoumapper wrote:
3 Months Ago
problem in ze_nemesis_model not compiled
any error messages ?
.::Kaya Gaming || Never Give Up || Zombie Escape::. [Server is Under The Work]
https://kaya-gaming.ga/

I just believe in two things, First thing is who i see in the mirror, second thing is who i don't see in the sky.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests