Cerere Plugin Respawn/Damage/Vision/Reward Zombie Plague

Cereri de pluginuri noi, skinuri in CS, etc.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
B3ta_Fir3
Membru, skill 0
Membru, skill 0
Posts: 59
Joined: 03 May 2020, 13:12
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: CSO.DARKCS.RO
Fond eXtream: 0
Has thanked: 7 times
Been thanked: 1 time

19 Feb 2021, 23:24

Salut am si eu nevoie de aceste pluginuri daca se poate va voi lasa ce e nevoie.
Si daca se poate acest plugin de la zombie cand te respawnezi sa ai protectie timp de 5 sec sa nu poti lua dmg cand te respawnezi https://ibb.co/H2WLjSq
Si acest vision la zm https://imgur.com/a/ehefDyK
Daca imi puteti face voi sa o pot adauga in baza script-ul https://imgur.com/a/CtgcbAB

Reward cand omori Boss/Survivor https://postimg.cc/Pp78VrQM

Daca imi puteti lasa toate aceste pluginuri sunteti cei mai tari.
RoyalServer 2
User avatar
Rainq
Membru, skill +2
Membru, skill +2
Posts: 681
Joined: 21 Jul 2015, 19:50
Detinator Steam: Da
CS Status: Retras
Detinator server CS: zm.extreamcs.com
SteamID: mrainq
Reputatie: Fost super moderator
Fost detinator ZM.eXtreamCS.COM
Fost Membru Club eXtreamCS (trei luni)
Fond eXtream: 0
Location: Bucharest
Discord: manuraiders
Has thanked: 29 times
Been thanked: 51 times
Contact:

20 Feb 2021, 03:11

nu-i nimic de modificat aici si daca ai vedea mai bine sectiunea scrie "Modificare pluginuri" nu "Cereri plugine" si daca ar fi asa,pai co.aie pune si tu modelul si in sectiunea unde trebuie
vezi asta la reward,e doar gasit pe net
zp_rewards.cfg

Code: Select all

// ================================================
// [ZP] Sub-Plugin: Rewards v1.4 Configuration File
// ------------------------------------------------
// 				By 93()|29!/<
// ================================================

// Settings
// --------
zp_rewards 1			// Toggle plugin [0-Off // 1-On]
zp_rewards_nks 3			// Amount of ammo packs a Nemesis receives for killing a Survivor [0-Disabled]
zp_rewards_nks_round 0		// Nemesis that kill a Survivor get rewarded only if it's Plague Round [0-No // 1-Yes]
zp_rewards_nem_round 35		// How many ammo packs each Nemesis gets (if more than 1) if they win the round [0-Disabled]
zp_rewards_skn 3			// Amount of ammo packs a Survivor receives for killing a Nemesis [0-Disabled]
zp_rewards_sknk 25		// Amount of ammo packs a Survivor receives for killing a Nemesis with knife [0-Disabled]
zp_rewards_skn_round 0		// Survivors that kill a Nemesis get rewarded only if it's Plague Round [0-No // 1-Yes]
zp_rewards_skz 1			// Amount of ammo packs a Survivor receives for killing a Zombie [0-Disabled]
zp_rewards_skzk 15		// Amount of ammo packs a Survivor receives for killing a Zombie with knife [0-Disabled]
zp_rewards_surv_round 35	// How many ammo packs each Survivor gets (if more than 1) if they win the round [0-Disabled]
zp_rewards_zks 35			// Amount of ammo packs a Zombie receives for killing a Survivor [0-Disabled]
zp_rewards_zks_round 0		// Zombies that kill a Survivor get rewarded only if it's Survivor Round [0-No // 1-Yes]
zp_rewards_zklh 1			// Amount of ammo packs a Zombie receives for killing the last Human [0-Disabled]
zp_rewards_zm_round 1		// How many ammo packs each Nemesis and Zombie gets if they win the round (excepting Nemesis Round) [0-Disabled]
zp_rewards_hkn 35			// Amount of ammo packs a Human receives for killing a Nemesis [0-Disabled]
zp_rewards_hknk 75		// Amount of ammo packs a Human receives for killing a Nemesis with knife [0-Disabled]
zp_rewards_hkn_round 0		// Humans that kill a Nemesis get rewarded only if it's Survivor Round [0-No // 1-Yes]
zp_rewards_hkz 1			// Amount of ammo packs a Human receives for killing a Zombie [0-Disabled]
zp_rewards_hkzk 25		// Amount of ammo packs a Human receives for killing a Zombie with knife [0-Disabled]
zp_rewards_hkfz 3			// Amount of ammo packs a Human receives for killing the first Zombie [0-Disabled]
zp_rewards_hkfzk 25		// Amount of ammo packs a Human receives for killing the first Zombie with knife [0-Disabled]
zp_rewards_hklz 1			// Amount of ammo packs a Human receives for killing the last Zombie [0-Disabled]
zp_rewards_hklzk 25		// Amount of ammo packs a Human receives for killing the last Zombie with knife [0-Disabled]
zp_rewards_hum_round 1		// How many ammo packs each Survivor and Human gets if they win the round (excepting Survivor Round) [0-Disabled]
zp_rewards_nzkih_show 1		// Show how many ammo packs a Nemesis or Zombie gets if they kill or infect a Human [0-Disabled // 1-Enabled]

// Config successfully executed
// ----------------------------
echo [ZP] Configuration file zp_rewards.cfg has been successfully read
zp_rewards.txt

Code: Select all

[en]
REWARDS_SKN = Survivor %s got %d ammo packs for killing Nemesis %s
REWARDS_SKNK = Survivor %s got %d ammo packs for killing Nemesis %s with knife
REWARDS_SKZ = Survivor %s got %d ammo packs for killing Zombie %s
REWARDS_SKZK = Survivor %s got %d ammo packs for killing Zombie %s with knife
REWARDS_HKN = Human %s got %d ammo packs for killing Nemesis %s
REWARDS_HKNK = Human %s got %d ammo packs for killing Nemesis %s with knife
REWARDS_HKZ = Human %s got %d ammo packs for killing Zombie %s
REWARDS_HKZK = Human %s got %d ammo packs for killing Zombie %s with knife
REWARDS_HKFZ = Human %s got %d ammo packs for killing first Zombie %s
REWARDS_HKFZk = Human %s got %d ammo packs for killing first Zombie %s with knife
REWARDS_HKLZ = Human %s got %d ammo packs for killing last Zombie %s
REWARDS_HKLZk = Human %s got %d ammo packs for killing last Zombie %s with knife
REWARDS_NKS = Nemesis %s got %d ammo packs for killing Survivor %s
REWARDS_NKH = Nemesis %s got %d ammo packs for killing Human %s
REWARDS_ZKS = Zombie %s got %d ammo packs for killing Survivor %s
REWARDS_ZKH = Zombie %s got %d ammo packs for killing Human %s
REWARDS_ZKLH = Zombie %s got %d ammo packs for killing last Human %s
REWARDS_ZIH = Zombie %s got %d ammo packs for infecting Human %s
REWARDS_NEM_ROUND1 = Nemesis got %d ammo packs for winning the round
REWARDS_NEM_ROUND2 = Nemesis got %d ammo packs each for winning the round
REWARDS_ZM_ROUND = Zombies got %d ammo packs each for winning the round
REWARDS_NEM_ZM_ROUND = Nemesis and Zombies got %d ammo packs each for winning the round
REWARDS_SURV_ROUND1 = Survivor got %d ammo packs for winning the round
REWARDS_SURV_ROUND2 = Survivors got %d ammo packs each for winning the round
REWARDS_HUM_ROUND = Humans got %d ammo packs each for winning the round
REWARDS_SURV_HUM_ROUND = Survivors and Humans got %d ammo packs each for winning the round

[ro]
REWARDS_SKN = Supravietuitorul %s a primit %d pachete de munitie pentru ca l'a omorat pe Nemesis %s
REWARDS_SKNK = Supravietuitorul %s a primit %d pachete de munitie pentru ca l'a omorat pe Nemesis %s cu cutitul
REWARDS_SKZ = Supravietuitorul %s a primit %d pachete de munitie pentru ca l'a omorat pe Zombie %s
REWARDS_SKZK = Supravietuitorul %s a primit %d pachete de munitie pentru ca l'a omorat pe Zombie %s cu cutitul
REWARDS_HKN = Omul %s a primit %d pachete de munitie pentru ca l'a omorat pe Nemesis %s
REWARDS_HKNK = Omul %s a primit %d pachete de munitie pentru ca l'a omorat pe Nemesis %s cu cutitul
REWARDS_HKZ = Omul %s a primit %d pachete de munitie pentru ca l'a omorat pe Zombie %s
REWARDS_HKZK = Omul %s a primit %d pachete de munitie pentru ca l'a omorat pe Zombie %s cu cutitul
REWARDS_HKFZ = Omul %s a primit %d pachete de munitie pentru ca l'a omorat pe primul Zombie %s
REWARDS_HKFZk = Omul %s a primit %d pachete de munitie pentru ca l'a omorat pe primul Zombie %s cu cutitul
REWARDS_HKLZ = Omul %s a primit %d pachete de munitie pentru ca l'a omorat pe ultimul Zombie %s
REWARDS_HKLZk = Omul %s a primit %d pachete de munitie pentru ca l'a omorat pe ultimul Zombie %s cu cutitul
REWARDS_NKS = Nemesis %s a primit %d pachete de munitie pentru ca l'a omorat pe Supravietuitorul %s
REWARDS_NKH = Nemesis %s a primit %d pachete de munitie pentru ca l'a omorat pe Omul %s
REWARDS_ZKS = Zombie %s a primit %d pachete de munitie pentru ca l'a omorat pe Supravietuitorul %s
REWARDS_ZKH = Zombie %s a primit %d pachete de munitie pentru ca l'a omorat pe Omul %s
REWARDS_ZKLH = Zombie %s a primit %d pachete de munitie pentru ca l'a omorat pe ultimul Om %s
REWARDS_ZIH = Zombie %s a primit %d pachete de munitie pentru ca l'a infectat pe Omul %s
REWARDS_NEM_ROUND1 = Nemesis a primit %d pachete de munitie pentru castigarea rundei
REWARDS_NEM_ROUND2 = Nemesis au primit %d pachete de munitie fiecare pentru castigarea rundei
REWARDS_ZM_ROUND = Zombie au primit %d pachete de munitie fiecare pentru castigarea rundei
REWARDS_NEM_ZM_ROUND = Nemesis si Zombie au primit %d pachete de munitie fiecare pentru castigarea rundei
REWARDS_SURV_ROUND1 = Supravietuitorul a primit %d pachete de munitie pentru castigarea rundei
REWARDS_SURV_ROUND2 = Supravietuitorii au primit %d pachete de munitie fiecare pentru castigarea rundei
REWARDS_HUM_ROUND = Oamenii au primit %d pachete de munitie fiecare pentru castigarea rundei
REWARDS_SURV_HUM_ROUND = Supravietuitorii si Oamenii au primit %d pachete de munitie fiecare pentru castigarea rundei

[ru]
REWARDS_SKN = Выживший %s получил %d аммо пачек за убийство Немезиды %s
REWARDS_SKNK = Выживший %s получил %d аммо пачек за убийство Немезиды %s с ножа
REWARDS_SKZ = Выживший %s получил %d аммо пачек за убийство зомби %s
REWARDS_SKZK = Выживший %s получил %d аммо пачек за убийство зомби %s с ножа
REWARDS_HKN = Человек %s получил %d аммо пачек за убийство Немезиды %s
REWARDS_HKNK = Человек %s получил %d аммо пачек за убийство Немезиды %s с ножа
REWARDS_HKZ = Человек %s получил %d аммо пачек за убийство зомби %s
REWARDS_HKZK = Человек %s получил %d аммо пачек за убийство зомби %s с ножа
REWARDS_HKFZ = Человек %s получил %d аммо пачек за убийство первого зомби %s
REWARDS_HKFZk = Человек %s получил %d аммо пачек за убийство первого зомби %s с ножа
REWARDS_HKLZ = Человек %s получил %d аммо пачек за убийство последнего зомби %s
REWARDS_HKLZk = Человек %s получил %d аммо пачек за убийство последнего зомби %s с ножа
REWARDS_NKS = Немезида %s получил %d аммо пачек за убийство Выжившего %s
REWARDS_NKH = Немезида %s получил %d аммо пачек за убийство человека %s
REWARDS_ZKS = Зомби %s получил %d аммо пачек за убийство Выжившего %s
REWARDS_ZKH = Зомби %s получил %d аммо пачек за убийство человека %s
REWARDS_ZKLH = Зомби %s получил %d аммо пачек за убийство последнего человека %s
REWARDS_ZIH = Зомби %s получил %d аммо пачек за заражение человека %s
REWARDS_NEM_ROUND1 = Немезида получил %d аммо пачек за то, что выиграл раунд
REWARDS_NEM_ROUND2 = Nemesis got %d ammo packs each for winning the round
REWARDS_ZM_ROUND = Зомби получили %d аммо пачек за то, что выиграли раунд
REWARDS_NEM_ZM_ROUND = Немезида и зомби получили %d аммо пачек за то, что выиграли раунд
REWARDS_SURV_ROUND1 = Выживший получил %d аммо пачек за то, что выиграл раунд
REWARDS_SURV_ROUND2 = Выжившие получили %d аммо пачек за то, что выиграли раунд
REWARDS_HUM_ROUND = Люди получили %d аммо пачек за то, что выиграли раунд
REWARDS_SURV_HUM_ROUND = Выжившие и люди получили %d аммо пачек за то, что выиграли раунд
zp_sub_rewards.sma

Code: Select all

/*================================================================================
	
	--------------------------------
	-*- [ZP] Sub-Plugin: Rewards -*-
	--------------------------------
	
	~~~~~~~~~~~~~~~
	- Description -
	~~~~~~~~~~~~~~~
	
	This plugin offers certain amounts of ammo packs
		to those who frag their enemies or win the round.
	Everything is configurable by cvar values.
	This is a plugin that shouldn't be missing
		from any Zombie Plague server out there...
	Enjoy it and have fun!
	
	Original forum thread: http://forums.alliedmods.net/showthread.php?p=1156585
	
	~~~~~~~~~~~~~
	- Thanks to -
	~~~~~~~~~~~~~
	
		MeRcyLeZZ - For such an awesome mod like Zombie Plague
			and for some code i used from it...once again
		XxAvalanchexX - For some code i used from his GunGame Mod
		Fry! and bmann_420 - For not ignoring me when i
			needed help the most (like other 'friends' do)
		suNx - For helping me with the plugin tests
		abdul-rehman - For being a good friend
		And all my real friends...
	
	~~~~~~~~~~~~~
	- Changelog -
	~~~~~~~~~~~~~
	
	* v1.0 (21 Apr 2010)
		- First release
	
	* v1.1 (21 Apr 2010)
		- Fixed plugin turning off when
		the toggle cvar is set to 1
		- Added rewards for surviving
		the round as Nemesis or Survivor
		- Removed unuseful cvars
	
	* v1.2 (22 Apr 2010)
		- Fixed players not getting ammo packs when fragging a enemy
			(rescripted the Player Killed part in the plugin)
		     This wasn't showing up because i was testing the plugin
			with bots and it seems that just human players count
		- Added giving the players rewards in other rounds
	
	* v1.3 (10 May 2010)
		- Fixed bug where a player that killed Nemesis got packs for
			a Zombie frag too. Well, Nemesis is just a fancy Zombie...
		- Fixed players not getting awards for winning
			other rounds than Nemesis or Survivor
		- Added knife kill rewards for Survivors and Humans
		- Added chat text to notify when a Nemesis
			or a Zombie kills or infects a Human
		- Fixed chat multiple print bug
		- Fixed tons of other chat print bugs
	
	* v1.4 (23 Jun 2010)
		- Made the plugin multi-lingual
		- Added rewards for killing the first and last Zombie
		- Added reward giving for killing the last Human
		- Improved some code
		- Fixed some chat print errors
		- Fixed bug where sometimes bazooka kills
			were considered knife kills
	
================================================================================*/

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <zombieplague>

// Cvars
new cvar_toggle, cvar_nks_ampks, cvar_nks_round, cvar_nem_round, cvar_skn_ampks,
cvar_sknk_ampks, cvar_skn_round, cvar_skz_ampks, cvar_skzk_ampks, cvar_surv_round,
cvar_zks_ampks, cvar_zks_round, cvar_zklh_ampks, cvar_zm_round, cvar_hkn_ampks,
cvar_hknk_ampks, cvar_hkn_round, cvar_hkz_ampks, cvar_hkzk_ampks, cvar_hkfz_ampks,
cvar_hkfzk_ampks, cvar_hklz_ampks, cvar_hklzk_ampks, cvar_hum_round, cvar_nzkih_show,
cvar_nzkih_ampks

// Get server's max players | Create custom chat print
new g_maxplayers, g_msgSayText

public plugin_init()
{
	register_plugin("[ZP] Sub-Plugin: Rewards", "1.4", "93()|29!/<")
	register_dictionary("zp_rewards.txt")
	
	RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
	
	g_maxplayers = get_maxplayers()
	g_msgSayText = get_user_msgid("SayText")
}

public plugin_precache()
{
	cvar_toggle = register_cvar("zp_rewards", "1")				// Turned on/off
	cvar_nks_ampks = register_cvar("zp_rewards_nks", "3")			// Nemesis kills Survivor
	cvar_nks_round = register_cvar("zp_rewards_nks_round", "0")		// Only in Plague round
	cvar_nem_round = register_cvar("zp_rewards_nem_round", "35")	// Nemesis wins the round
	cvar_skn_ampks = register_cvar("zp_rewards_skn", "3")			// Survivor kills Nemesis
	cvar_sknk_ampks = register_cvar("zp_rewards_sknk", "25")		// Survivor kills Nemesis with knife
	cvar_skn_round = register_cvar("zp_rewards_skn_round", "0")		// Only in Plague round
	cvar_skz_ampks = register_cvar("zp_rewards_skz", "1")			// Survivor kills Zombie
	cvar_skzk_ampks = register_cvar("zp_rewards_skzk", "15")		// Survivor kills Zombie with knife
	cvar_surv_round = register_cvar("zp_rewards_surv_round", "35")	// Survivor wins the round
	cvar_zks_ampks = register_cvar("zp_rewards_zks", "35")		// Zombie Kills Survivor
	cvar_zks_round = register_cvar("zp_rewards_zks_round", "0")		// Only in Survivor Round
	cvar_zklh_ampks = register_cvar("zp_rewards_zklh", "1")		// Zombie kills last Human
	cvar_zm_round = register_cvar("zp_rewards_zm_round", "1")		// Zombies win the round
	cvar_hkn_ampks = register_cvar("zp_rewards_hkn", "35")		// Human kills Nemesis
	cvar_hknk_ampks = register_cvar("zp_rewards_hknk", "75")		// Human kills Nemesis with knife
	cvar_hkn_round = register_cvar("zp_rewards_hkn_round", "0")		// Only in Nemesis round
	cvar_hkz_ampks = register_cvar("zp_rewards_hkz", "1")			// Human kills Zombie
	cvar_hkzk_ampks = register_cvar("zp_rewards_hkzk", "25")		// Human kills Zombie with knife
	cvar_hkfz_ampks = register_cvar("zp_rewards_hkfz", "3")		// Human kills first Zombie
	cvar_hkfzk_ampks = register_cvar("zp_rewards_hkfzk", "25")		// Human kills first Zombie with knife
	cvar_hklz_ampks = register_cvar("zp_rewards_hklz", "1")		// Human kills last Zombie
	cvar_hklzk_ampks = register_cvar("zp_rewards_hklzk", "25")		// Human kills last Zombie with knife
	cvar_hum_round = register_cvar("zp_rewards_hum_round", "3")		// Humans win the round
	cvar_nzkih_show = register_cvar("zp_rewards_nzkih_show", "1")	// Nemesis/Zombie kills/infects a Human
	cvar_nzkih_ampks = get_cvar_num("zp_zombie_infect_reward")		// Find out how many ammo packs a Nemesis/Zombie gets for killing/infecting a Human
}

public plugin_cfg()
{
	// Plugin is disabled
	if (!get_pcvar_num(cvar_toggle))
		return;
	
	// Get configs dir
	new cfgdir[32]
	get_configsdir(cfgdir, charsmax(cfgdir))
	
	// Execute config file (zp_rewards.cfg)
	server_cmd("exec %s/zp_rewards.cfg", cfgdir)
}

// Ham Player Killed Forward
public fw_PlayerKilled(victim, attacker, shouldgib)
{
	// Plugin is disabled
	if (!get_pcvar_num(cvar_toggle))
		return;
	
	// Get deathmatch mode status and whether the player killed himself
	static selfkill
	selfkill = (victim == attacker || !is_user_connected(attacker)) ? true : false
	
	// Killed by a non-player entity or self killed
	if (selfkill) return;
	
	// Get attacker and victim's name
	static aname[32], vname[32]
	get_user_name(attacker, aname, 31)
	get_user_name(victim, vname, 31)
	
	// A Zombie was killed
	if (zp_get_user_zombie(victim))
	{
		// Get the fragger's current weapon
		static wpnName[24]
		get_killer_weapon(attacker, pev(victim, pev_dmg_inflictor), wpnName, 23)
		
		// Victim was Nemesis. What?! He's a Zombie too, you know?
		if (zp_get_user_nemesis(victim))
		{
			// Survivor's frag
			if (zp_get_user_survivor(attacker))
			{
				// He gets enough ammo packs allready
				if (!zp_is_plague_round() && get_pcvar_num(cvar_skn_round))
					return;
				
				// He knifed the Nemesis
				if (equal(wpnName, "knife"))
				{
					// Option disabled
					if (!get_pcvar_num(cvar_sknk_ampks))
						return;
					
					// Award him
					zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + get_pcvar_num(cvar_sknk_ampks))
					zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_SKNK", aname, get_pcvar_num(cvar_sknk_ampks), vname)
				}
				// Just a normal kill
				else
				{
					// Option disabled
					if (!get_pcvar_num(cvar_skn_ampks))
						return;
					
					// Award him
					zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + get_pcvar_num(cvar_skn_ampks))
					zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_SKN", aname, get_pcvar_num(cvar_skn_ampks), vname)
				}
			}
			// Human makes the kill
			else
			{
				// But he won't be so happy
				if (!zp_is_nemesis_round() && get_pcvar_num(cvar_hkn_round))
					return;
				
				// He knifed the Nemesis
				if (equal(wpnName, "knife"))
				{
					// Option disabled
					if (!get_pcvar_num(cvar_hknk_ampks))
						return;
					
					// Award him
					zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + get_pcvar_num(cvar_hknk_ampks))
					zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_HKNK", aname, get_pcvar_num(cvar_hknk_ampks), vname)
				}
				// Just a normal kill
				else
				{
					// Option disabled
					if (!get_pcvar_num(cvar_hkn_ampks))
						return;
					
					// Award him
					zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + get_pcvar_num(cvar_hkn_ampks))
					zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_HKN", aname, get_pcvar_num(cvar_hkn_ampks), vname)
				}
			}
		}
		// Well this time it was just a Zombie
		else
		{
			// Survivor strikes again
			if (zp_get_user_survivor(attacker))
			{
				// He knifed the Zombie
				if (equal(wpnName, "knife"))
				{
					// Option disabled
					if (!get_pcvar_num(cvar_skzk_ampks))
						return;
					
					// Award him
					zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + get_pcvar_num(cvar_skzk_ampks))
					zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_SKZK", aname, get_pcvar_num(cvar_skzk_ampks), vname)
				}
				// Just a normal kill
				else
				{
					// Option disabled
					if (!get_pcvar_num(cvar_skz_ampks))
						return;
					
					// Award him
					zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + get_pcvar_num(cvar_skz_ampks))
					zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_SKZ", aname, get_pcvar_num(cvar_skz_ampks), vname)
				}
			}
			// Human wants some ammo packs
			else
			{
				// He knifed the Zombie
				if (equal(wpnName, "knife"))
				{
					// Victim was the first Zombie
					if (zp_get_user_first_zombie(victim))
					{
						// No rewards for this kind of kill
						if (!get_pcvar_num(cvar_hkfzk_ampks))
							return;
						
						// Award the killer
						zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + get_pcvar_num(cvar_hkfzk_ampks))
						zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_HKFZK", aname, get_pcvar_num(cvar_hkfzk_ampks), vname)
					}
					// Last Zombie
					else if (zp_get_user_last_zombie(victim))
					{
						// No rewards for this kind of kill
						if (!get_pcvar_num(cvar_hklzk_ampks))
							return;
						
						// Award the killer
						zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + get_pcvar_num(cvar_hklzk_ampks))
						zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_HKLZK", aname, get_pcvar_num(cvar_hklzk_ampks), vname)
					}
					// Just one of those Zombies
					else
					{
						// Option disabled
						if (!get_pcvar_num(cvar_hkzk_ampks))
							return;
						
						// Award him
						zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + get_pcvar_num(cvar_hkzk_ampks))
						zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_HKZK", aname, get_pcvar_num(cvar_hkzk_ampks), vname)
					}
				}
				// Just a normal kill
				else
				{
					// Victim was the first Zombie
					if (zp_get_user_first_zombie(victim))
					{
						// No rewards for this kind of kill
						if (!get_pcvar_num(cvar_hkfz_ampks))
							return;
						
						// Award the killer
						zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + get_pcvar_num(cvar_hkfz_ampks))
						zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_HKFZ", aname, get_pcvar_num(cvar_hkfz_ampks), vname)
					}
					// Last Zombie
					else if (zp_get_user_last_zombie(victim))
					{
						// No rewards for this kind of kill
						if (!get_pcvar_num(cvar_hklz_ampks))
							return;
						
						// Award the killer
						zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + get_pcvar_num(cvar_hklz_ampks))
						zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_HKLZ", aname, get_pcvar_num(cvar_hklz_ampks), vname)
					}
					// Just one of those Zombies
					else
					{
						// Option disabled
						if (!get_pcvar_num(cvar_hkz_ampks))
							return;
						
						// Award him
						zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + get_pcvar_num(cvar_hkz_ampks))
						zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_HKZ", aname, get_pcvar_num(cvar_hkz_ampks), vname)
					}
				}
			}
		}
	}
	// Survivor or Human
	else
	{
		// Killed player was Survivor
		if (zp_get_user_survivor(victim))
		{
			// Nemesis is the killer
			if (zp_get_user_nemesis(attacker))
			{
				// And?
				if (!get_pcvar_num(cvar_nks_ampks) || !zp_is_plague_round() && get_pcvar_num(cvar_nks_round))
					return;
				
				// And he deserves a treat
				zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + get_pcvar_num(cvar_nks_ampks))
				zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_NKS", aname, get_pcvar_num(cvar_nks_ampks), vname)
			}
			// Killer is a Zombie
			else
			{
				// So what?
				if (!get_pcvar_num(cvar_zks_ampks) || !zp_is_survivor_round() && get_pcvar_num(cvar_zks_round))
					return;
				
				// So let's give him something... Paulie want a cracker?
				zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + get_pcvar_num(cvar_zks_ampks))
				zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_ZKS", aname, get_pcvar_num(cvar_zks_ampks), vname)
			}
		}
		// A Human got killed
		else
		{
			// Last Human
			if (zp_get_user_last_human(victim))
			{
				// Feature disabled
				if (!get_pcvar_num(cvar_zklh_ampks))
					return;
				
				// Reward the killer
				zp_set_user_ammo_packs(attacker, zp_get_user_ammo_packs(attacker) + get_pcvar_num(cvar_zklh_ampks))
				zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_ZKLH", aname, get_pcvar_num(cvar_zklh_ampks), vname)
			}
			// Just a random Human
			else
			{
				// Showing this isn't allowed
				if (!get_pcvar_num(cvar_nzkih_show) || !cvar_nzkih_ampks)
					return;
				
				// Nemesis' frag
				if (zp_get_user_nemesis(attacker))
					zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_NKH", aname, cvar_nzkih_ampks, vname)
				// Zombies are good at killing too
				else
					zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_ZKH", aname, cvar_nzkih_ampks, vname)
			}
		}
	}
}

// ZP User Infected Forward
public zp_user_infected_post(id, infector, nemesis)
{
	// Plugin is disabled | Option disabled | No ammo packs to receive | Not infected by a player | Turned into Nemesis
	if (!get_pcvar_num(cvar_toggle) || !get_pcvar_num(cvar_nzkih_show) || !cvar_nzkih_ampks || !infector || nemesis)
		return;
	
	// Get infector and infected's name
	static aname[32], vname[32]
	get_user_name(infector, aname, 31)
	get_user_name(id, vname, 31)
	
	// Spread the word
	zp_colored_print(0, "^x04[ZP]^x01 %L", LANG_PLAYER, "REWARDS_ZIH", aname, cvar_nzkih_ampks, vname)
}

// ZP Round Ended Forward
public zp_round_ended(winteam)
{
	// Plugin is disabled | No one won...
	if (!get_pcvar_num(cvar_toggle) || winteam == WIN_NO_ONE)
		return;
	
	// Loop trough all the players
	static id
	for (id = 1; id <= g_maxplayers; id++)
	{
		// Zombies have conquered the world
		if (winteam == WIN_ZOMBIES)
		{
			// Was Nemesis round
			if (zp_is_nemesis_round())
			{
				// Option turned off
				if (!get_pcvar_num(cvar_nem_round))
					return;
				
				// Is Nemesis
				if (zp_get_user_nemesis(id))
					zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + get_pcvar_num(cvar_nem_round))
				
				if (zp_get_nemesis_count() > 1)
					zp_colored_print(id, "^x04[ZP]^x01 %L", id, "REWARDS_NEM_ROUND2", get_pcvar_num(cvar_nem_round))
				else
					zp_colored_print(id, "^x04[ZP]^x01 %L", id, "REWARDS_NEM_ROUND1", get_pcvar_num(cvar_nem_round))
			}
			// Other rounds
			else
			{
				// Option turned off
				if (!get_pcvar_num(cvar_zm_round))
					return;
				
				// Is Zombie
				if (zp_get_user_zombie(id))
					zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + get_pcvar_num(cvar_zm_round))
				
				// No Nemesis was found
				if (!zp_get_nemesis_count())
					zp_colored_print(id, "^x04[ZP]^x01 %L", id, "REWARDS_ZM_ROUND", get_pcvar_num(cvar_zm_round))
				// One or more Nemesis were present
				else
					zp_colored_print(id, "^x04[ZP]^x01 %L", id, "REWARDS_NEM_ZM_ROUND", get_pcvar_num(cvar_zm_round))
			}
		}
		
		// Humans survived
		if (winteam == WIN_HUMANS)
		{
			// Was Survivor round
			if (zp_is_survivor_round())
			{
				// Option turned off
				if (!get_pcvar_num(cvar_surv_round))
					return;
				
				// Is Survivor
				if (zp_get_user_survivor(id))
					zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + get_pcvar_num(cvar_surv_round))
				
				// More than one Survivor
				if (zp_get_survivor_count() > 1)
					zp_colored_print(id, "^x04[ZP]^x01 %L", id, "REWARDS_SURV_ROUND2", get_pcvar_num(cvar_surv_round))
				// Only one Survivor
				else
					zp_colored_print(id, "^x04[ZP]^x01 %L", id, "REWARDS_SURV_ROUND1", get_pcvar_num(cvar_surv_round))
			}
			// Other rounds
			else
			{
				// Option turned on
				if (!get_pcvar_num(cvar_hum_round))
					return;
				
				// Isn't Zombie
				if (!zp_get_user_zombie(id))
					zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + get_pcvar_num(cvar_hum_round))
				
				// No Survivors
				if (!zp_get_survivor_count())
					zp_colored_print(id, "^x04[ZP]^x01 %L", id, "REWARDS_HUM_ROUND", get_pcvar_num(cvar_hum_round))
				// There are Survivors too
				else
					zp_colored_print(id, "^x04[ZP]^x01 %L", id, "REWARDS_SURV_HUM_ROUND", get_pcvar_num(cvar_hum_round))
			}
		}
	}
}

// Colored chat print. Thanks to MeRcyLeZZ
zp_colored_print(target, const message[], any:...)
{
	static buffer[512], i, argscount
	argscount = numargs()
	
	// Send to everyone
	if (!target)
	{
		static player
		for (player = 1; player <= g_maxplayers; player++)
		{
			// Not connected
			if (!is_user_connected(player))
				continue;
			
			// Remember changed arguments
			static changed[5], changedcount // [5] = max LANG_PLAYER occurencies
			changedcount = 0
			
			// Replace LANG_PLAYER with player id
			for (i = 2; i < argscount; i++)
			{
				if (getarg(i) == LANG_PLAYER)
				{
					setarg(i, 0, player)
					changed[changedcount] = i
					changedcount++
				}
			}
			
			// Format message for player
			vformat(buffer, charsmax(buffer), message, 3)
			
			// Send it
			message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, player)
			write_byte(player)
			write_string(buffer)
			message_end()
			
			// Replace back player id's with LANG_PLAYER
			for (i = 0; i < changedcount; i++)
				setarg(changed[i], 0, LANG_PLAYER)
		}
	}
	// Send to specific target
	else
	{
		// Not connected
		if (!is_user_connected(target))
			return;
		
		// Format message for player
		vformat(buffer, charsmax(buffer), message, 3)
		
		// Send it
		message_begin(MSG_ONE, g_msgSayText, _, target)
		write_byte(target)
		write_string(buffer)
		message_end()
	}
}

// Stock from AmxMisc
stock get_configsdir(name[], len)
{
	return get_localinfo("amxx_configsdir", name, len);
}

// Gets the weapon that the killer used
stock get_killer_weapon(killer, inflictor, retVar[], retLen)
{
	static killer_weapon_name[32];
	killer_weapon_name = "world"; // by default, the player is killed by the world

	if (pev_valid(killer) && (pev(killer, pev_flags) & FL_CLIENT))
	{
		if (pev_valid(inflictor))
		{
			if (inflictor == killer)
			{
				// if the inflictor is the killer, then it must be their current weapon doing the damage
				new weapon = get_user_weapon(killer);
				get_weaponname(weapon, killer_weapon_name, 31);
			}
			else pev(inflictor, pev_classname, killer_weapon_name, 31); // it's just that easy
		}
	}
	else
	{
		if (pev_valid(killer)) pev(inflictor, pev_classname, killer_weapon_name, 31);
		else if (killer == 0) killer_weapon_name = "worldspawn";
	}
	
	// Strip the monster_* or weapon_* from the inflictor's classname
	if (equal(killer_weapon_name, "weapon_", 7))
		format(killer_weapon_name, 31, "%s", killer_weapon_name[7]);
	else if (equal(killer_weapon_name, "monster_", 8))
		format(killer_weapon_name, 31, "%s", killer_weapon_name[8]);
	else if (equal(killer_weapon_name, "func_", 5))
		format(killer_weapon_name, 31, "%s", killer_weapon_name[5]);
	
	// Output
	formatex(retVar, retLen, "%s", killer_weapon_name);
}
Image
B3ta_Fir3
Membru, skill 0
Membru, skill 0
Posts: 59
Joined: 03 May 2020, 13:12
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: CSO.DARKCS.RO
Fond eXtream: 0
Has thanked: 7 times
Been thanked: 1 time

20 Feb 2021, 08:11

Ai si pluginurile alea cu vision de zm?
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests