Заявка за редакция на - OciXCrom Knife Models

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Заключена
Потребителски аватар

Автор на темата
TSChannel
Потребител
Потребител
Мнения: 105
Регистриран: 16 апр 2019, 21:19

Заявка за редакция на - OciXCrom Knife Models

Мнение от TSChannel » 05 май 2019, 00:44

Здравейте. Бихте ли ми направили плъгина да може да се използва само за ЦТ/Humans Zombie Plague 4.3 смисъл да се използва, за човеците само и когато някой зомби напише /knife да изписва [ZP] Only humans can use this command!

Код: Избери всички

#include <amxmodx>
#include <amxmisc>
#include <crxknives_const>
#include <cromchat>
#include <fakemeta>
#include <hamsandwich>
#include <nvault>

native crxranks_get_max_levels()
native crxranks_get_rank_by_level(level, buffer[], len)
native crxranks_get_user_level(id)
native crxranks_get_user_xp(id)

new const g_szNatives[][] =
{
	"crxranks_get_max_levels",
	"crxranks_get_rank_by_level",
	"crxranks_get_user_level",
	"crxranks_get_user_xp"
}

#if !defined m_pPlayer
const m_pPlayer = 41
#endif

#if !defined client_disconnected
	#define client_disconnected client_disconnect
#endif

new const PLUGIN_VERSION[] = "3.1"
const Float:DELAY_ON_CONNECT = 3.0

#if !defined MAX_AUTHID_LENGTH
const MAX_AUTHID_LENGTH = 35
#endif

#if !defined MAX_NAME_LENGTH
const MAX_NAME_LENGTH = 32
#endif

#if !defined MAX_PLAYERS
const MAX_PLAYERS = 32
#endif

enum
{
	SOUND_NONE = 0,
	SOUND_DEPLOY,
	SOUND_HIT,
	SOUND_HITWALL,
	SOUND_SLASH,
	SOUND_STAB
}

enum _:Knives
{
	NAME[MAX_NAME_LENGTH],
	V_MODEL[CRXKNIVES_MAX_SOUND_LENGTH],
	P_MODEL[CRXKNIVES_MAX_SOUND_LENGTH],
	DEPLOY_SOUND[CRXKNIVES_MAX_SOUND_LENGTH],
	HIT_SOUND[CRXKNIVES_MAX_SOUND_LENGTH],
	HITWALL_SOUND[CRXKNIVES_MAX_SOUND_LENGTH],
	SLASH_SOUND[CRXKNIVES_MAX_SOUND_LENGTH],
	STAB_SOUND[CRXKNIVES_MAX_SOUND_LENGTH],
	SELECT_SOUND[CRXKNIVES_MAX_SOUND_LENGTH],
	FLAG,
	LEVEL,
	XP,
	SELECT_MESSAGES_NUM,
	bool:SHOW_RANK,
	bool:HAS_CUSTOM_SOUND,
	Array:SELECT_MESSAGES,
	Trie:ATTRIBUTES
}

enum _:CvarsReg
{
	cvar_km_open_at_spawn,
	cvar_km_save_choice,
	cvar_km_only_dead,
	cvar_km_select_message,
	cvar_km_knife_only_skills,
	cvar_km_admin_bypass
}

enum _:Cvars
{
	km_open_at_spawn,
	km_save_choice,
	km_only_dead,
	km_select_message,
	km_knife_only_skills,
	km_admin_bypass
}

new Array:g_aKnives,
	bool:g_bFirstTime[MAX_PLAYERS + 1],
	bool:g_bRankSystem,
	bool:g_bGetLevel,
	bool:g_bGetXP,
	g_eCvars[Cvars],
	g_eCvarsReg[CvarsReg],
	g_eKnife[MAX_PLAYERS + 1][Knives],
	g_szAuth[MAX_PLAYERS + 1][MAX_AUTHID_LENGTH],
	g_iKnife[MAX_PLAYERS + 1],
	g_fwdKnifeUpdated,
	g_fwdAttemptChange,
	g_iMenuFlags,
	g_iKnivesNum,
	g_iCallback,
	g_iVault

public plugin_init()
{
	register_plugin("Knife Models", PLUGIN_VERSION, "OciXCrom")
	register_cvar("CRXKnifeModels", PLUGIN_VERSION, FCVAR_SERVER|FCVAR_SPONLY|FCVAR_UNLOGGED)

	if(!g_iKnivesNum)
	{
		set_fail_state("No knives found in the configuration file.")
	}

	register_dictionary("KnifeModels.txt")

	RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn", 1)
	register_forward(FM_EmitSound,	"OnEmitSound")
	RegisterHam(Ham_Item_Deploy, "weapon_knife", "OnSelectKnife", 1)

	register_clcmd("say /knife",       "Cmd_Knife")
	register_clcmd("say_team /knife",  "Cmd_Knife")
	register_clcmd("crxknives_select", "Cmd_Select", _, "<knife id>")

	g_fwdKnifeUpdated  = CreateMultiForward("crxknives_knife_updated",  ET_IGNORE, FP_CELL, FP_CELL, FP_CELL)
	g_fwdAttemptChange = CreateMultiForward("crxknives_attempt_change", ET_STOP,   FP_CELL, FP_CELL)

	g_iCallback = menu_makecallback("CheckKnifeAccess")

	g_eCvarsReg[cvar_km_open_at_spawn]     = register_cvar("km_open_at_spawn",     "0")
	g_eCvarsReg[cvar_km_save_choice]       = register_cvar("km_save_choice",       "1")
	g_eCvarsReg[cvar_km_only_dead]         = register_cvar("km_only_dead",         "0")
	g_eCvarsReg[cvar_km_select_message]    = register_cvar("km_select_message",    "1")
	g_eCvarsReg[cvar_km_knife_only_skills] = register_cvar("km_knife_only_skills", "1")
	g_eCvarsReg[cvar_km_admin_bypass]      = register_cvar("km_admin_bypass",      "0")
}

public plugin_precache()
{
	if(LibraryExists("crxranks", LibType_Library))
	{
		g_bRankSystem = true
	}

	g_aKnives = ArrayCreate(Knives)
	ReadFile()
}

public plugin_cfg()
{
	g_eCvars[km_save_choice]       = get_pcvar_num(g_eCvarsReg[cvar_km_save_choice])
	g_eCvars[km_open_at_spawn]     = get_pcvar_num(g_eCvarsReg[cvar_km_open_at_spawn])
	g_eCvars[km_only_dead]         = get_pcvar_num(g_eCvarsReg[cvar_km_only_dead])
	g_eCvars[km_select_message]    = get_pcvar_num(g_eCvarsReg[cvar_km_select_message])
	g_eCvars[km_knife_only_skills] = get_pcvar_num(g_eCvarsReg[cvar_km_knife_only_skills])
	g_eCvars[km_admin_bypass]      = get_pcvar_num(g_eCvarsReg[cvar_km_admin_bypass])

	if(g_eCvars[km_save_choice])
	{
		g_iVault = nvault_open("KnifeModels")
	}
}

public plugin_end()
{
	for(new eKnife[Knives], i; i < g_iKnivesNum; i++)
	{
		ArrayGetArray(g_aKnives, i, eKnife)
		ArrayDestroy(eKnife[SELECT_MESSAGES])
		TrieDestroy(eKnife[ATTRIBUTES])
	}

	ArrayDestroy(g_aKnives)

	if(g_eCvars[km_save_choice])
	{
		nvault_close(g_iVault)
	}
}

ReadFile()
{
	new szFilename[256]
	get_configsdir(szFilename, charsmax(szFilename))
	add(szFilename, charsmax(szFilename), "/KnifeModels.ini")
	new iFilePointer = fopen(szFilename, "rt")

	if(iFilePointer)
	{
		new szData[160], szKey[32], szValue[128], szSound[128], iMaxLevels
		new eKnife[Knives], bool:bCustom

		if(g_bRankSystem)
		{
			iMaxLevels = crxranks_get_max_levels()
		}

		while(!feof(iFilePointer))
		{
			fgets(iFilePointer, szData, charsmax(szData))
			trim(szData)

			switch(szData[0])
			{
				case EOS, '#', ';': continue
				case '[':
				{
					if(szData[strlen(szData) - 1] == ']')
					{
						if(g_iKnivesNum)
						{
							push_knife(eKnife)
						}

						g_iKnivesNum++
						replace(szData, charsmax(szData), "[", "")
						replace(szData, charsmax(szData), "]", "")
						copy(eKnife[NAME], charsmax(eKnife[NAME]), szData)

						eKnife[V_MODEL][0] = EOS
						eKnife[P_MODEL][0] = EOS
						eKnife[DEPLOY_SOUND][0] = EOS
						eKnife[HIT_SOUND][0] = EOS
						eKnife[HITWALL_SOUND][0] = EOS
						eKnife[SLASH_SOUND][0] = EOS
						eKnife[STAB_SOUND][0] = EOS
						eKnife[SELECT_SOUND][0] = EOS
						eKnife[FLAG] = ADMIN_ALL
						eKnife[HAS_CUSTOM_SOUND] = false
						eKnife[SELECT_MESSAGES_NUM] = 0
						eKnife[SELECT_MESSAGES] = _:ArrayCreate(CRXKNIVES_MAX_MESSAGE_LENGTH)
						eKnife[ATTRIBUTES] = _:TrieCreate()

						if(g_bRankSystem)
						{
							eKnife[LEVEL] = 0
							eKnife[SHOW_RANK] = false
							eKnife[XP] = 0
						}

						static const ATTRIBUTE_NAME[] = "NAME"
						TrieSetString(eKnife[ATTRIBUTES], ATTRIBUTE_NAME, szData)
					}
					else continue
				}
				default:
				{
					strtok(szData, szKey, charsmax(szKey), szValue, charsmax(szValue), '=')
					trim(szKey); trim(szValue)
					bCustom = true

					TrieSetString(eKnife[ATTRIBUTES], szKey, szValue)

					if(equal(szKey, "FLAG"))
					{
						eKnife[FLAG] = read_flags(szValue)
						g_iMenuFlags |= eKnife[FLAG]
					}
					else if(equal(szKey, "LEVEL") && g_bRankSystem)
					{
						eKnife[LEVEL] = clamp(str_to_num(szValue), 0, iMaxLevels)

						if(!g_bGetLevel)
						{
							g_bGetLevel = true
						}
					}
					else if(equal(szKey, "SHOW_RANK") && g_bRankSystem)
					{
						eKnife[SHOW_RANK] = _:clamp(str_to_num(szValue), false, true)
					}
					else if(equal(szKey, "XP") && g_bRankSystem)
					{
						eKnife[XP] = _:clamp(str_to_num(szValue), 0)

						if(!g_bGetXP)
						{
							g_bGetXP = true
						}
					}
					else if(equal(szKey, "V_MODEL"))
					{
						copy(eKnife[V_MODEL], charsmax(eKnife[V_MODEL]), szValue)
					}
					else if(equal(szKey, "P_MODEL"))
					{
						copy(eKnife[P_MODEL], charsmax(eKnife[P_MODEL]), szValue)
					}
					else if(equal(szKey, "DEPLOY_SOUND"))
					{
						copy(eKnife[DEPLOY_SOUND], charsmax(eKnife[DEPLOY_SOUND]), szValue)
					}
					else if(equal(szKey, "HIT_SOUND"))
					{
						copy(eKnife[HIT_SOUND], charsmax(eKnife[HIT_SOUND]), szValue)
					}
					else if(equal(szKey, "HITWALL_SOUND"))
					{
						copy(eKnife[HITWALL_SOUND], charsmax(eKnife[HITWALL_SOUND]), szValue)
					}
					else if(equal(szKey, "SLASH_SOUND"))
					{
						copy(eKnife[SLASH_SOUND], charsmax(eKnife[SLASH_SOUND]), szValue)
					}
					else if(equal(szKey, "STAB_SOUND"))
					{
						copy(eKnife[STAB_SOUND], charsmax(eKnife[STAB_SOUND]), szValue)
					}
					else if(equal(szKey, "SELECT_SOUND"))
					{
						bCustom = false
						copy(eKnife[SELECT_SOUND], charsmax(eKnife[SELECT_SOUND]), szValue)
					}
					else if(equal(szKey, "SELECT_MESSAGE"))
					{
						ArrayPushString(eKnife[SELECT_MESSAGES], szValue)
						eKnife[SELECT_MESSAGES_NUM]++
					}
					else continue

					static const szModelArg[] = "_MODEL"
					static const szSoundArg[] = "_SOUND"

					if(contain(szKey, szModelArg) != -1)
					{
						if(!file_exists(szValue))
						{
							log_amx("ERROR: model ^"%s^" not found!", szValue)
						}
						else
						{
							precache_model(szValue)
						}
					}
					else if(contain(szKey, szSoundArg) != -1)
					{
						formatex(szSound, charsmax(szSound), "sound/%s", szValue)

						if(!file_exists(szSound))
						{
							log_amx("ERROR: sound ^"%s^" not found!", szSound)
						}
						else
						{
							precache_sound(szValue)
						}

						if(bCustom)
						{
							eKnife[HAS_CUSTOM_SOUND] = true
						}
					}
				}
			}
		}

		if(g_iKnivesNum)
		{
			push_knife(eKnife)
		}

		fclose(iFilePointer)
	}
}

public client_connect(id)
{
	g_bFirstTime[id] = true
	ArrayGetArray(g_aKnives, 0, g_eKnife[id])
	g_iKnife[id] = 0

	new iReturn
	ExecuteForward(g_fwdKnifeUpdated, iReturn, id, g_iKnife[id], true)

	if(g_eCvars[km_save_choice])
	{
		get_user_authid(id, g_szAuth[id], charsmax(g_szAuth[]))
		set_task(DELAY_ON_CONNECT, "load_data", id)
	}
}

public client_disconnected(id)
{
	if(g_eCvars[km_save_choice])
	{
		use_vault(id, true)
	}
}

public OnEmitSound(id, iChannel, const szSample[])
{
	if(!is_user_connected(id) || !g_eKnife[id][HAS_CUSTOM_SOUND] || !is_knife_sound(szSample))
	{
		return FMRES_IGNORED
	}

	switch(detect_knife_sound(szSample))
	{
		case SOUND_DEPLOY: 		if(g_eKnife[id][DEPLOY_SOUND][0]) 		{ play_knife_sound(id, g_eKnife[id][DEPLOY_SOUND][0]);      return FMRES_SUPERCEDE; }
		case SOUND_HIT: 		if(g_eKnife[id][HIT_SOUND][0]) 			{ play_knife_sound(id, g_eKnife[id][HIT_SOUND][0]);         return FMRES_SUPERCEDE; }
		case SOUND_HITWALL:		if(g_eKnife[id][HITWALL_SOUND][0]) 		{ play_knife_sound(id, g_eKnife[id][HITWALL_SOUND][0]);     return FMRES_SUPERCEDE; }
		case SOUND_SLASH: 		if(g_eKnife[id][SLASH_SOUND][0]) 		{ play_knife_sound(id, g_eKnife[id][SLASH_SOUND][0]);       return FMRES_SUPERCEDE; }
		case SOUND_STAB: 		if(g_eKnife[id][STAB_SOUND][0]) 		{ play_knife_sound(id, g_eKnife[id][STAB_SOUND][0]);        return FMRES_SUPERCEDE; }
	}

	return FMRES_IGNORED
}

public Cmd_Knife(id)
{
	if(g_eCvars[km_only_dead] && is_user_alive(id))
	{
		CC_SendMessage(id, "%l %l", "KM_CHAT_PREFIX", "KM_ONLY_DEAD")
		return PLUGIN_HANDLED
	}

	static eKnife[Knives]
	new szTitle[128], szItem[128], iLevel, iXP
	formatex(szTitle, charsmax(szTitle), "%L", id, "KM_MENU_TITLE")

	if(g_bGetLevel)
	{
		iLevel = crxranks_get_user_level(id)
	}

	if(g_bGetXP)
	{
		iXP = crxranks_get_user_xp(id)
	}

	new iMenu = menu_create(szTitle, "MenuHandler")

	for(new iFlags = get_user_flags(id), i; i < g_iKnivesNum; i++)
	{
		ArrayGetArray(g_aKnives, i, eKnife)
		copy(szItem, charsmax(szItem), eKnife[NAME])

		if(g_bRankSystem)
		{
			if(eKnife[LEVEL] && iLevel < eKnife[LEVEL])
			{
				if(eKnife[SHOW_RANK])
				{
					static szRank[32]
					crxranks_get_rank_by_level(eKnife[LEVEL], szRank, charsmax(szRank))
					format(szItem, charsmax(szItem), "%s %L", szItem, id, "KM_MENU_RANK", szRank)
				}
				else
				{
					format(szItem, charsmax(szItem), "%s %L", szItem, id, "KM_MENU_LEVEL", eKnife[LEVEL])
				}
			}

			if(eKnife[XP] && iXP < eKnife[XP])
			{
				format(szItem, charsmax(szItem), "%s %L", szItem, id, "KM_MENU_XP", eKnife[XP])
			}
		}

		if(eKnife[FLAG] != ADMIN_ALL && !(iFlags & eKnife[FLAG]))
		{
			format(szItem, charsmax(szItem), "%s %L", szItem, id, "KM_MENU_VIP_ONLY")
		}

		if(g_iKnife[id] == i)
		{
			format(szItem, charsmax(szItem), "%s %L", szItem, id, "KM_MENU_SELECTED")
		}

		menu_additem(iMenu, szItem, eKnife[NAME], eKnife[FLAG], g_iCallback)
	}

	if(menu_pages(iMenu) > 1)
	{
		formatex(szItem, charsmax(szItem), "%s%L", szTitle, id, "KM_MENU_TITLE_PAGE")
		menu_setprop(iMenu, MPROP_TITLE, szItem)
	}

	menu_display(id, iMenu)
	return PLUGIN_HANDLED
}

public Cmd_Select(id, iLevel, iCid)
{
	if(!cmd_access(id, iLevel, iCid, 2))
	{
		return PLUGIN_HANDLED
	}

	if(g_eCvars[km_only_dead] && is_user_alive(id))
	{
		CC_SendMessage(id, "%l %l", "KM_CHAT_PREFIX", "KM_ONLY_DEAD")
		return PLUGIN_HANDLED
	}

	new szKnife[4]
	read_argv(1, szKnife, charsmax(szKnife))

	new iKnife = str_to_num(szKnife)

	if(!is_knife_valid(iKnife))
	{
		console_print(id, "%l", "KM_INVALID_KNIFE", g_iKnivesNum - 1)
		return PLUGIN_HANDLED
	}

	if(!has_knife_access(id, iKnife))
	{
		console_print(id, "%l", "KM_NO_ACCESS")
		return PLUGIN_HANDLED
	}

	select_knife(id, iKnife)
	return PLUGIN_HANDLED
}

public MenuHandler(id, iMenu, iItem)
{
	if(g_eCvars[km_only_dead] && is_user_alive(id))
	{
		CC_SendMessage(id, "%l %l", "KM_CHAT_PREFIX", "KM_ONLY_DEAD")
		goto @MENU_DESTROY
	}

	if(!is_user_connected(id))
	{
		goto @MENU_DESTROY
	}

	if(iItem != MENU_EXIT)
	{
		select_knife(id, iItem)
	}

	@MENU_DESTROY:
	menu_destroy(iMenu)
	return PLUGIN_HANDLED
}

select_knife(id, iKnife)
{
	new iReturn
	ExecuteForward(g_fwdAttemptChange, iReturn, id, iKnife)

	if(iReturn == PLUGIN_HANDLED)
	{
		return
	}

	g_iKnife[id] = iKnife
	ArrayGetArray(g_aKnives, iKnife, g_eKnife[id])
	ExecuteForward(g_fwdKnifeUpdated, iReturn, id, iKnife, false)

	if(is_user_alive(id) && get_user_weapon(id) == CSW_KNIFE)
	{
		refresh_knife_model(id)
	}

	if(g_eCvars[km_select_message])
	{
		CC_SendMessage(id, "%l %l", "KM_CHAT_PREFIX", "KM_CHAT_SELECTED", g_eKnife[id][NAME])
	}

	if(g_eKnife[id][SELECT_MESSAGES_NUM])
	{
		for(new i; i < g_eKnife[id][SELECT_MESSAGES_NUM]; i++)
		{
			CC_SendMessage(id, "%a", ArrayGetStringHandle(g_eKnife[id][SELECT_MESSAGES], i))
		}
	}

	if(g_eKnife[id][SELECT_SOUND][0])
	{
		play_knife_sound(id, g_eKnife[id][SELECT_SOUND])
	}
}

public load_data(id)
{
	if(is_user_connected(id))
	{
		use_vault(id, false)
	}
}

public CheckKnifeAccess(id, iMenu, iItem)
{
	return ((g_iKnife[id] == iItem) || !has_knife_access(id, iItem)) ? ITEM_DISABLED : ITEM_ENABLED
}

public OnPlayerSpawn(id)
{
	if(is_user_alive(id) && g_eCvars[km_open_at_spawn] && !g_iKnife[id] && g_bFirstTime[id] && (g_iMenuFlags & ADMIN_USER || get_user_flags(id) & g_iMenuFlags))
	{
		g_bFirstTime[id] = false
		Cmd_Knife(id)
	}
}

public OnSelectKnife(iEnt)
{
	new id = get_pdata_cbase(iEnt, m_pPlayer, 4)

	if(is_user_connected(id))
	{
		refresh_knife_model(id)
	}
}

refresh_knife_model(const id)
{
	set_pev(id, pev_viewmodel2, g_eKnife[id][V_MODEL])
	set_pev(id, pev_weaponmodel2, g_eKnife[id][P_MODEL])
}

push_knife(eKnife[Knives])
{
	if(!eKnife[V_MODEL][0])
	{
		copy(eKnife[V_MODEL], charsmax(eKnife[V_MODEL]), CRXKNIVES_DEFAULT_V)
	}

	if(!eKnife[P_MODEL][0])
	{
		copy(eKnife[P_MODEL], charsmax(eKnife[P_MODEL]), CRXKNIVES_DEFAULT_P)
	}

	if(!eKnife[FLAG])
	{
		g_iMenuFlags |= ADMIN_USER
	}

	ArrayPushArray(g_aKnives, eKnife)
}

bool:has_knife_access(const id, const iKnife)
{
	static eKnife[Knives]
	ArrayGetArray(g_aKnives, iKnife, eKnife)

	if(eKnife[FLAG] != ADMIN_ALL)
	{
		if(get_user_flags(id) & eKnife[FLAG])
		{
			if(g_eCvars[km_admin_bypass])
			{
				return true
			}
		}
		else
		{
			return false
		}
	}

	if(g_bRankSystem)
	{
		if(eKnife[LEVEL] && crxranks_get_user_level(id) < eKnife[LEVEL])
		{
			return false
		}

		if(eKnife[XP] && crxranks_get_user_xp(id) < eKnife[XP])
		{
			return false
		}
	}

	return true
}

bool:is_knife_sound(const szSample[])
{
	return bool:equal(szSample[8], "kni", 3)
}

detect_knife_sound(const szSample[])
{
	static iSound
	iSound = SOUND_NONE

	if(equal(szSample, "weapons/knife_deploy1.wav"))
	{
		iSound = SOUND_DEPLOY
	}
	else if(equal(szSample[14], "hit", 3))
	{
		iSound = szSample[17] == 'w' ? SOUND_HITWALL : SOUND_HIT
	}
	else if(equal(szSample[14], "sla", 3))
	{
		iSound = SOUND_SLASH
	}
	else if(equal(szSample[14], "sta", 3))
	{
		iSound = SOUND_STAB
	}

	return iSound
}

use_vault(const id, const bool:bSave)
{
	if(bSave)
	{
		new szData[4]
		num_to_str(g_iKnife[id], szData, charsmax(szData))
		nvault_set(g_iVault, g_szAuth[id], szData)
	}
	else
	{
		new iKnife
		iKnife = nvault_get(g_iVault, g_szAuth[id])

		if(!is_knife_valid(iKnife))
		{
			iKnife = 0
		}
		else if(has_knife_access(id, iKnife))
		{
			g_iKnife[id] = iKnife

			new iReturn
			ArrayGetArray(g_aKnives, iKnife, g_eKnife[id])
			ExecuteForward(g_fwdKnifeUpdated, iReturn, id, iKnife, false)

			if(is_user_alive(id) && get_user_weapon(id) == CSW_KNIFE)
			{
				refresh_knife_model(id)
			}
		}
	}
}

play_knife_sound(const id, const szSound[])
{
	engfunc(EngFunc_EmitSound, id, CHAN_AUTO, szSound, 1.0, ATTN_NORM, 0, PITCH_NORM)
}

bool:is_knife_valid(const iKnife)
{
	return 0 <= iKnife < g_iKnivesNum
}

public plugin_natives()
{
	register_library("crxknives")
	register_native("crxknives_can_use_skill",       "_crxknives_can_use_skill")
	register_native("crxknives_get_attribute_int",   "_crxknives_get_attribute_int")
	register_native("crxknives_get_attribute_float", "_crxknives_get_attribute_float")
	register_native("crxknives_get_attribute_str",   "_crxknives_get_attribute_str")
	register_native("crxknives_get_knives_num",      "_crxknives_get_knives_num")
	register_native("crxknives_get_user_knife",      "_crxknives_get_user_knife")
	register_native("crxknives_has_knife_access",    "_crxknives_has_knife_access")
	register_native("crxknives_is_knife_valid",      "_crxknives_is_knife_valid")
	set_native_filter("native_filter")
}

public native_filter(const szNative[], id, iTrap)
{
	if(!iTrap)
	{
		static i

		for(i = 0; i < sizeof(g_szNatives); i++)
		{
			if(equal(szNative, g_szNatives[i]))
			{
				return PLUGIN_HANDLED
			}
		}
	}

	return PLUGIN_CONTINUE
}

public bool:_crxknives_can_use_skill(iPlugin, iParams)
{
	return !g_eCvars[km_knife_only_skills] || (get_user_weapon(get_param(1)) == CSW_KNIFE)
}

public bool:_crxknives_get_attribute_int(iPlugin, iParams)
{
	static szAttribute[MAX_NAME_LENGTH], szValue[CRXKNIVES_MAX_ATTRIBUTE_LENGTH], id
	get_string(2, szAttribute, charsmax(szAttribute))
	id = get_param(1)

	if(!get_param(4))
	{
		if(!is_knife_valid(id))
		{
			return false
		}

		static eKnife[Knives]
		ArrayGetArray(g_aKnives, id, eKnife)

		if(!TrieKeyExists(eKnife[ATTRIBUTES], szAttribute))
		{
			return false
		}

		TrieGetString(eKnife[ATTRIBUTES], szAttribute, szValue, charsmax(szValue))
		goto @SET_ATTRIBUTE
	}

	if(!TrieKeyExists(g_eKnife[id][ATTRIBUTES], szAttribute))
	{
		return false
	}

	TrieGetString(g_eKnife[id][ATTRIBUTES], szAttribute, szValue, charsmax(szValue))

	@SET_ATTRIBUTE:
	set_param_byref(3, str_to_num(szValue))
	return true
}

public bool:_crxknives_get_attribute_float(iPlugin, iParams)
{
	static szAttribute[MAX_NAME_LENGTH], szValue[CRXKNIVES_MAX_ATTRIBUTE_LENGTH], id
	get_string(2, szAttribute, charsmax(szAttribute))
	id = get_param(1)

	if(!get_param(4))
	{
		if(!is_knife_valid(id))
		{
			return false
		}

		static eKnife[Knives]
		ArrayGetArray(g_aKnives, id, eKnife)

		if(!TrieKeyExists(eKnife[ATTRIBUTES], szAttribute))
		{
			return false
		}

		TrieGetString(eKnife[ATTRIBUTES], szAttribute, szValue, charsmax(szValue))
		goto @SET_ATTRIBUTE
	}

	if(!TrieKeyExists(g_eKnife[id][ATTRIBUTES], szAttribute))
	{
		return false
	}

	TrieGetString(g_eKnife[id][ATTRIBUTES], szAttribute, szValue, charsmax(szValue))

	@SET_ATTRIBUTE:
	set_float_byref(3, str_to_float(szValue))
	return true
}

public bool:_crxknives_get_attribute_str(iPlugin, iParams)
{
	static szAttribute[MAX_NAME_LENGTH], szValue[CRXKNIVES_MAX_ATTRIBUTE_LENGTH], id
	get_string(2, szAttribute, charsmax(szAttribute))
	id = get_param(1)

	if(!get_param(5))
	{
		if(!is_knife_valid(id))
		{
			return false
		}

		static eKnife[Knives]
		ArrayGetArray(g_aKnives, id, eKnife)

		if(!TrieKeyExists(eKnife[ATTRIBUTES], szAttribute))
		{
			return false
		}

		TrieGetString(eKnife[ATTRIBUTES], szAttribute, szValue, charsmax(szValue))
		goto @SET_ATTRIBUTE
	}

	if(!TrieKeyExists(g_eKnife[id][ATTRIBUTES], szAttribute))
	{
		return false
	}

	TrieGetString(g_eKnife[id][ATTRIBUTES], szAttribute, szValue, charsmax(szValue))

	@SET_ATTRIBUTE:
	set_string(3, szValue, get_param(4))
	return true
}

public _crxknives_get_knives_num(iPlugin, iParams)
{
	return g_iKnivesNum
}

public _crxknives_get_user_knife(iPlugin, iParams)
{
	return g_iKnife[get_param(1)]
}

public bool:_crxknives_has_knife_access(iPlugin, iParams)
{
	return has_knife_access(get_param(1), get_param(2))
}

public bool:_crxknives_is_knife_valid(iPlugin, iParams)
{
	return is_knife_valid(get_param(1))
-=Zombie Plague 4.3=-[Jetpack - UltimateAmmo|BestItems - Skins|FreeVIP]
Join Now - 93.123.18.40:27018
-=Zombie Plague 4.3=-

Потребителски аватар

Halu xv1rg0
Потребител
Потребител
Мнения: 43
Регистриран: 06 апр 2019, 17:11
Се отблагодари: 4 пъти
Получена благодарност: 8 пъти

Заявка за редакция на - OciXCrom Knife Models

Мнение от Halu xv1rg0 » 05 май 2019, 20:19

Защо ти е това , след като има Knifes с Hammer , Warhammer и тем подобни? Ето ти. Разгледай .sma и направи нужните редакции от теб самия , с каквито ти искаш модели. А така само да се виждат "някви скинове на ножовки" , в такъв сървър е безмислено - поне по мое мнение , знаеш хората обичат специалните неща и съответно ножовете да нямат просто скин ами и способности :)

Ресурсите за менюто : <премахнат линк>

Код: Избери всички

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

#define PLUGIN    "ZP knife menu"
#define VERSION    "1.0"
#define AUTHOR    "Mohamed"

#define VIP ADMIN_LEVEL_H
#define ADMIN_FLAG ADMIN_BAN
#define SVIP ADMIN_LEVEL_G
#define BOSS ADMIN_PASSWORD
#define MAXPLAYERS 32
#define ID_FBURN1	(taskid - 100)
#define ID_FBURN2	(taskid - 100)
#define ID_FBURN3	(taskid - 100)
#define ID_FBURN4	(taskid - 100)
#define ID_FBURN5	(taskid - 100)
#define ID_FBURN6	(taskid - 100)
#define ID_FBURN7	(taskid - 100)
#define TASK_FBURN                   100
#define ID_FBURN8                ( taskid - TASK_FBURN )
#define FIRE_DURATION1            5
#define FIRE_DAMAGE1              1000
new bool:g_fRoundEnd

new g_burning1[33],
    g_burning2[33],
    g_burning3[33],
    g_burning4[33],
    g_burning5[33],
    g_burning6[33],
    g_burning7[33],
    g_sprite1,
    g_sprite2,
    g_sprite3,
    g_sprite4,
    g_sprite5,
    g_sprite6,
    g_sprite7,
    g_flameSpr8,
    g_skull,
    g_burning_duration8[ MAXPLAYERS + 1 ]

new combat_v_model[] = "models/zp_knife_menu/v_combat_knife.mdl"
new combat_p_model[] = "models/zp_knife_menu/p_combat_knife.mdl"

new strong_v_model[] = "models/zp_knife_menu/v_strong_knife.mdl"
new strong_p_model[] = "models/zp_knife_menu/p_strong_knife.mdl"

new axe_v_model[] = "models/zp_knife_menu/v_axe_knife.mdl"	
new axe_p_model[] = "models/zp_knife_menu/p_axe_knife.mdl"	

new katana_v_model[] = "models/zp_knife_menu/v_warhammer.mdl"	
new katana_p_model[] = "models/zp_knife_menu/p_warhammer.mdl"

new hammer_v_model[] = "models/zp_knife_menu/v_warhammer_storm.mdl"	
new hammer_p_model[] = "models/zp_knife_menu/p_warhammer_storm.mdl"	

new thanatos_v_model[] = "models/zp_knife_menu/v_warhammer_ice.mdl"	
new thanatos_p_model[] = "models/zp_knife_menu/p_warhammer_ice.mdl"

new boss_v_model[] = "models/zp_knife_menu/v_boss_hammer.mdl"	
new boss_p_model[] = "models/zp_knife_menu/p_boss_hammer.mdl"

new sur_v_model[] = "models/zp_knife_menu/v_sur_hammer.mdl"	
new sur_p_model[] = "models/zp_knife_menu/p_sur_hammer.mdl"


const m_pPlayer = 41 
const m_flNextPrimaryAttack = 46 
const m_flNextSecondaryAttack = 47 
const m_flTimeWeaponIdle = 48 

new g_hasSpeed[33], SayText
new bool:g_WasShowed[MAXPLAYERS + 1]
new g_knife_combat[33], cvar_knife_combat_jump, cvar_knife_combat_spd, cvar_knife_combat_dmg, cvar_knife_combat_knock, cvar_knife_combat_spd_attack2
new g_knife_strong[33], cvar_knife_strong_jump, cvar_knife_strong_spd, cvar_knife_strong_dmg, cvar_knife_strong_knock, cvar_knife_strong_spd_attack2
new g_knife_axe[33], cvar_knife_axe_jump, cvar_knife_axe_spd, cvar_knife_axe_dmg, cvar_knife_axe_knock, cvar_knife_axe_spd_attack2
new g_knife_katana[33], cvar_knife_katana_jump, cvar_knife_katana_spd, cvar_knife_katana_dmg, cvar_knife_katana_knock, cvar_knife_katana_spd_attack2
new g_knife_hammer[33], cvar_knife_hammer_jump, cvar_knife_hammer_spd, cvar_knife_hammer_dmg, cvar_knife_hammer_knock, cvar_hammer_spd_attack2
new g_knife_thanatos[33], cvar_knife_thanatos_jump, cvar_knife_thanatos_spd, cvar_knife_thanatos_dmg, cvar_knife_thanatos_knock, cvar_thanatos_spd_attack2
new g_knife_boss[33], cvar_knife_boss_jump, cvar_knife_boss_spd, cvar_knife_boss_dmg, cvar_knife_boss_knock, cvar_boss_spd_attack2
new g_knife_sur[33], cvar_knife_sur_jump, cvar_knife_sur_spd, cvar_knife_sur_dmg, cvar_knife_sur_knock, cvar_sur_spd_attack2

new const g_sound_knife[] = { "items/gunpickup2.wav" }

new const combat_sounds[][] =
{
	"zp_knife_menu/cabret_deploy.wav",
	"zp_knife_menu/cabret_hit.wav"	,
	"zp_knife_menu/cabret_hit.wav"	,
	"zp_knife_menu/cabret_hit.wav"	,
	"zp_knife_menu/cabret_hit.wav"	,
	"zp_knife_menu/cabret_hitwall.wav",
	"zp_knife_menu/cabret_slash.wav",
	"zp_knife_menu/cabret_slash.wav",
	"zp_knife_menu/cabret_stab.wav"
}

new const strong_sounds[][] =
{
	"zp_knife_menu/katana_deploy.wav",
	"zp_knife_menu/katana_hit.wav",
	"zp_knife_menu/katana_hit.wav",
	"zp_knife_menu/katana_hit.wav",
	"zp_knife_menu/katana_hit.wav",
	"zp_knife_menu/katana_hitwall.wav",
	"zp_knife_menu/katana_slash.wav",
	"zp_knife_menu/katana_slash.wav",
	"zp_knife_menu/katana_stab.wav"
}

new const axe_sounds[][] =
{
	"zp_knife_menu/thanatos_deploy.wav",
	"zp_knife_menu/thanatos_hit.wav",
	"zp_knife_menu/thanatos_hit.wav",
	"zp_knife_menu/thanatos_hit.wav",
	"zp_knife_menu/thanatos_hit.wav",
	"zp_knife_menu/thanatos_hitwall.wav",
	"zp_knife_menu/thanatos_slash.wav",
	"zp_knife_menu/thanatos_slash.wav",
	"zp_knife_menu/thanatos_stab.wav"
}

new const katana_sounds[][] =
{
	"zp_knife_menu/hammer_deploy.wav",
	"zp_knife_menu/hammer_hit.wav",
	"zp_knife_menu/hammer_hit.wav",
	"zp_knife_menu/hammer_hit.wav",
	"zp_knife_menu/hammer_hit.wav",
	"zp_knife_menu/hammer_hitwall.wav",
	"zp_knife_menu/hammer_slash.wav",
	"zp_knife_menu/hammer_slash.wav",
	"zp_knife_menu/hammer_stab.wav"
}

new const hammer_sounds[][] =
{
	"zp_knife_menu/warhammer_deploy.wav",
	"zp_knife_menu/warhammer_hit.wav",
	"zp_knife_menu/warhammer_hit.wav",
	"zp_knife_menu/warhammer_hit.wav",
	"zp_knife_menu/warhammer_hit.wav",
	"zp_knife_menu/warhammer_hitwall.wav",
	"zp_knife_menu/warhammer_slash.wav",
	"zp_knife_menu/warhammer_slash.wav",
	"zp_knife_menu/warhammer_stab.wav"
}

new const thanatos_sounds[][] =
{
	"zp_knife_menu/warhammer_deploy.wav",
	"zp_knife_menu/warhammer_hit.wav",
	"zp_knife_menu/warhammer_hit.wav",
	"zp_knife_menu/warhammer_hit.wav",
	"zp_knife_menu/warhammer_hit.wav",
	"zp_knife_menu/warhammer_hitwall.wav",
	"zp_knife_menu/warhammer_slash.wav",
	"zp_knife_menu/warhammer_slash.wav",
	"zp_knife_menu/warhammer_stab.wav"
}

new const boss_sounds[][] =
{
	"zp_knife_menu/warhammer_deploy.wav",
	"zp_knife_menu/warhammer_hit.wav",
	"zp_knife_menu/warhammer_hit.wav",
	"zp_knife_menu/warhammer_hit.wav",
	"zp_knife_menu/warhammer_hit.wav",
	"zp_knife_menu/warhammer_hitwall.wav",
	"zp_knife_menu/warhammer_slash.wav",
	"zp_knife_menu/warhammer_slash.wav",
	"zp_knife_menu/warhammer_stab.wav"
}
new const sur_sounds[][] =
{
	"zp_knife_menu/warhammer_deploy.wav",
	"zp_knife_menu/warhammer_hit.wav",
	"zp_knife_menu/warhammer_hit.wav",
	"zp_knife_menu/warhammer_hit.wav",
	"zp_knife_menu/warhammer_hit.wav",
	"zp_knife_menu/warhammer_hitwall.wav",
	"zp_knife_menu/warhammer_slash.wav",
	"zp_knife_menu/warhammer_slash.wav",
	"zp_knife_menu/warhammer_stab.wav"
}
new const oldknife_sounds[][] =
{
"weapons/knife_deploy1.wav",
"weapons/knife_hit1.wav",
"weapons/knife_hit2.wav",
"weapons/knife_hit3.wav",
"weapons/knife_hit4.wav",
"weapons/knife_hitwall1.wav",
"weapons/knife_slash1.wav",
"weapons/knife_slash2.wav",
"weapons/knife_stab.wav"

}

public plugin_init()
{
	register_plugin(PLUGIN , VERSION , AUTHOR);
	register_cvar("zp_addon_knife", VERSION, FCVAR_SERVER);
        SayText = get_user_msgid("SayText")   

 	register_clcmd("say /knife","knife_menu",ADMIN_ALL,"knife_menu")
 	register_clcmd("/knife","knife_menu",ADMIN_ALL,"knife_menu")
	register_clcmd("combat", "give_combat")
	register_clcmd("strong", "give_strong")
	register_clcmd("axe", "give_axe")
	register_clcmd("katana", "give_katana")
	register_clcmd("hammer", "give_hammer")
	register_clcmd("thanatos", "give_thanatos")
        register_clcmd("boss", "give_boss")
        register_clcmd("sur", "give_sur")

	register_event("CurWeapon","checkWeapon","be","1=1");
	register_event("Damage" , "event_Damage" , "b" , "2>0");

	register_forward(FM_PlayerPreThink, "fw_PlayerPreThink");
        register_forward(FM_EmitSound, "fw_EmitSound");

	register_message(get_user_msgid("DeathMsg"), "message_DeathMsg");

	RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage");
        RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_knife", "fw_Knife_SecondaryAttack_Post", 1) 

	cvar_knife_combat_jump= register_cvar("zp_knife_combat_jump", "270.0");
	cvar_knife_combat_spd = register_cvar("zp_knife_combat_spd", "310.0");
	cvar_knife_combat_dmg = register_cvar("zp_knife_combat_dmg" , "4.0");
	cvar_knife_combat_knock = register_cvar("zp_knife_combat_knock" , "6.0");
	cvar_knife_combat_spd_attack2 = register_cvar("zp_knife_combat_spd_attack2" , "1.2");

	cvar_knife_strong_jump= register_cvar("zp_knife_strong_jump", "265.0");
	cvar_knife_strong_spd = register_cvar("zp_knife_strong_spd", "255.0");
	cvar_knife_strong_dmg = register_cvar("zp_knife_strong_dmg" , "12.0");
	cvar_knife_strong_knock = register_cvar("zp_knife_strong_knock" , "7.0");
	cvar_knife_strong_spd_attack2 = register_cvar("zp_knife_strong_spd_attack2" , "1.6");

	cvar_knife_axe_jump= register_cvar("zp_knife_axe_jump", "335.0");
	cvar_knife_axe_spd = register_cvar("zp_knife_axe_spd", "250.0");
	cvar_knife_axe_dmg = register_cvar("zp_knife_axe_dmg" , "5.0");
	cvar_knife_axe_knock = register_cvar("zp_knife_axe_knock" , "6.0");
	cvar_knife_axe_spd_attack2 = register_cvar("zp_knife_axe_spd_attack2" , "1.4");

	cvar_knife_katana_jump= register_cvar("zp_knife_katana_jump", "275.0");
	cvar_knife_katana_spd = register_cvar("zp_knife_katana_spd", "265.0");
	cvar_knife_katana_dmg = register_cvar("zp_knife_katana_dmg" , "5.0");
	cvar_knife_katana_knock = register_cvar("zp_knife_katana_knock" , "15.0");
	cvar_knife_katana_spd_attack2 = register_cvar("zp_knife_katana_spd_attack2" , "1.2");

	cvar_knife_hammer_jump= register_cvar("zp_knife_hammer_jump", "335.0");
	cvar_knife_hammer_spd= register_cvar("zp_knife_hammer_spd", "315.0");
	cvar_knife_hammer_dmg = register_cvar("zp_knife_hammer_dmg" , "15.0");
	cvar_knife_hammer_knock = register_cvar("zp_knife_hammer_knock" , "15.0");
	cvar_hammer_spd_attack2 = register_cvar("zp_knife_hammer_spd_attack2" , "1.8");

	cvar_knife_thanatos_jump= register_cvar("zp_knife_thanatos_jump", "385.0");
	cvar_knife_thanatos_spd= register_cvar("zp_knife_thanatos_spd", "320.0");
	cvar_knife_thanatos_dmg = register_cvar("zp_knife_thanatos_dmg" , "17.0");
	cvar_knife_thanatos_knock = register_cvar("zp_knife_thanatos_knock" , "17.0");
	cvar_thanatos_spd_attack2 = register_cvar("zp_knife_thanatos_spd_attack2" , "1.8");

        cvar_knife_boss_jump= register_cvar("zp_knife_boss_jump", "400.0");
 	cvar_knife_boss_spd= register_cvar("zp_knife_boss_spd", "350.0");
	cvar_knife_boss_dmg = register_cvar("zp_knife_boss_dmg" , "20.0");
	cvar_knife_boss_knock = register_cvar("zp_knife_boss_knock" , "25.0");
	cvar_boss_spd_attack2 = register_cvar("zp_knife_boss_spd_attack2" , "2.0");
	
        cvar_knife_sur_jump= register_cvar("zp_knife_sur_jump", "380.0");
 	cvar_knife_sur_spd= register_cvar("zp_knife_sur_spd", "370.0");
	cvar_knife_sur_dmg = register_cvar("zp_knife_sur_dmg" , "12.0");
	cvar_knife_sur_knock = register_cvar("zp_knife_sur_knock" , "20.0");
	cvar_sur_spd_attack2 = register_cvar("zp_knife_sur_spd_attack2" , "2.0");

    	register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
}

public zp_user_humanized_post( iPlayer ) 
{
    for(new id = 1; id <=get_maxplayers(); id++)
    {
        if(zp_get_user_survivor(id))
        set_task(1.0, "task_give", id+45634)
    }
}

public task_give(id)
{
    id -= 45634
    if(zp_get_user_survivor(id))
    {   
              give_sur(id)
    }  
}  

public zp_round_ended()
{
    for(new id = 1; id <=get_maxplayers(); id++)
    {
        if(zp_get_user_survivor(id))
        set_task(1.0, "task_remove", id-45634)
    }
}

public task_remove(id)
{
    id -= -45634
    if(zp_get_user_survivor(id))
    {
		remove_sur(id)
    }
}  
public client_connect(id)
{
	g_knife_combat[id] = false
	g_knife_strong[id] = false
	g_knife_axe[id] = false
	g_knife_katana[id] = false
	g_knife_hammer[id] = false
	g_knife_thanatos[id] = false
        g_knife_boss[id] = false
        g_knife_sur[id] = false
	g_hasSpeed[id] = false
}

public client_disconnect(id)
{
	g_knife_combat[id] = false
	g_knife_strong[id] = false
	g_knife_axe[id] = false
	g_knife_katana[id] = false
	g_knife_hammer[id] = false
	g_knife_thanatos[id] = false
        g_knife_boss[id] = false
        g_knife_sur[id] = false
	g_hasSpeed[id] = false
}

public plugin_precache()
{
	precache_model(combat_v_model)
	precache_model(combat_p_model)
	precache_model(strong_v_model)
	precache_model(strong_p_model)
	precache_model(axe_v_model)
	precache_model(axe_p_model)
	precache_model(katana_v_model)
	precache_model(katana_p_model)
	precache_model(hammer_v_model)
	precache_model(hammer_p_model)
	precache_model(thanatos_p_model)
	precache_model(thanatos_v_model)
        precache_model(boss_p_model)
	precache_model(boss_v_model)
        precache_model(sur_p_model)
	precache_model(sur_v_model)

	precache_sound(g_sound_knife)

	for(new i = 0; i < sizeof combat_sounds; i++)
		precache_sound(combat_sounds[i])

	for(new i = 0; i < sizeof strong_sounds; i++)
		precache_sound(strong_sounds[i])

	for(new i = 0; i < sizeof axe_sounds; i++)
		precache_sound(axe_sounds[i])  

	for(new i = 0; i < sizeof katana_sounds; i++)
		precache_sound(katana_sounds[i])

	for(new i = 0; i < sizeof hammer_sounds; i++)
		precache_sound(hammer_sounds[i])

	for(new i = 0; i < sizeof thanatos_sounds; i++)
		precache_sound(thanatos_sounds[i])

        for(new i = 0; i < sizeof boss_sounds; i++)
		precache_sound(boss_sounds[i])
        for(new i = 0; i < sizeof sur_sounds; i++)
		precache_sound(sur_sounds[i])

        g_sprite1 = precache_model("sprites/zp_knife_menu/1.spr")
	
	g_sprite2 = precache_model("sprites/zp_knife_menu/2.spr")
        g_sprite3 = precache_model("sprites/zp_knife_menu/3.spr")
        g_sprite4 = precache_model("sprites/zp_knife_menu/4.spr")
        g_sprite5 = precache_model("sprites/zp_knife_menu/5.spr")
        g_sprite6 = precache_model("sprites/zp_knife_menu/6.spr") 
        g_sprite7 = precache_model("sprites/zp_knife_menu/7.spr") 
        g_flameSpr8 = precache_model( "sprites/zp_knife_menu/6.spr" );
        g_skull = precache_model( "sprites/zp_knife_menu/blueskull.spr" );

}

public event_round_start(id)
{
    	for (new i; i < MAXPLAYERS + 1; i++)
        	g_WasShowed[i] = false
}

public knife_menu(id)
{

	if(is_user_alive(id) && !zp_get_user_zombie(id) && !zp_get_user_survivor(id))
	{
		my_menu(id)
	}

	return PLUGIN_HANDLED
}

public my_menu(id)
{
	new menu = menu_create("\w|\r**\w[ZP] \rNEW Knife \yMenu\r**\w|^n\w|\r**\wBy \yMohamed :D\r**\w|^n", "menu_handler");
	menu_additem(menu, "\r|\wCombat \dKnife\r| \w[\wSpeed]", "1", 0);
	menu_additem(menu, "\r|\wStrong \dKnife\r| \w[\wDamage]", "2", 0);
	menu_additem(menu, "\r|\wAxe \dKnife\r| \w[\wJump]^n", "3", 0);

        if(get_user_flags(id) & VIP)
	menu_additem(menu, "\r|\wWar \dHammer\r| \r[\wVip \yx2\r]", "4", 0);
        else
        menu_additem(menu, "\r|\wWar \dHammer\r| \r[\wVIP \yCost - 2 boost\r]", "4", 0);
 
        if(get_user_flags(id) & SVIP)
	menu_additem(menu, "\r|\wStorm \dHammer\r| \r[\wSvip \yx4\r]", "5", 0);
        else
        menu_additem(menu, "\r|\wStorm \dHammer\r| \r[\wSVIP \yCost - 4 boost\r]", "5", 0);
        if(get_user_flags(id) & ADMIN_FLAG)
	menu_additem(menu, "\r|\wIce \dHammer\r| \r[\wADMIN \yx6\r]^n", "6", 0);
        else
        menu_additem(menu, "\r|\wIce \dHammer\r| \r[\wAdmin \yCost - 6 boost\r]", "6", 0);   
        if(get_user_flags(id) & BOSS)
	menu_additem(menu, "\r|\wBoss \dHammer\r| \r[\wOwner \yFull Skill xXx\r]", "7", 0);
        
        else
        menu_additem(menu, "\r|\wBoss \dHammer\r| \r[\wOWNER \yCost - 20 Euro\r]", "7", 0);   
 
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
    
	menu_display(id, menu, 0);    
} 

public menu_handler(id, menu, item)
{
	if( item == MENU_EXIT )
	{
       		menu_destroy(menu);
        	return PLUGIN_HANDLED;    
	}
    
	new data[7], iName[64];
	new access, callback;
    
	menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
    
	new key = str_to_num(data);
    
	switch(key)
	{
        	case 1:
        	{
			give_combat(id)
			menu_destroy(menu);
			return PLUGIN_HANDLED
		}
		case 2:
		{
			give_strong(id)
			menu_destroy(menu);
			return PLUGIN_HANDLED
		}
		case 3:
		{
			give_axe(id)
			menu_destroy(menu);
			return PLUGIN_HANDLED
		}
		case 4:
		{
			give_katana(id)
			menu_destroy(menu);
			return PLUGIN_HANDLED
		}
		case 5:
		{
			give_hammer(id)
			menu_destroy(menu);
			return PLUGIN_HANDLED
		}
		case 6:
		{
			give_thanatos(id)
			menu_destroy(menu);
			return PLUGIN_HANDLED
		}
                case 7:
		{
			give_boss(id)
			menu_destroy(menu);
			return PLUGIN_HANDLED
		}
	}
	menu_destroy(menu);
	return PLUGIN_HANDLED
}

public give_combat(id)
{
	g_knife_combat[id] = true	
	g_knife_strong[id] = false
	g_knife_axe[id] = false	
	g_knife_katana[id] = false	
	g_knife_hammer[id] = false
	g_knife_thanatos[id] = false
        g_knife_boss[id] = false
        g_knife_sur[id] = false
	g_hasSpeed[id] =  true
	g_WasShowed[id] = true

	engfunc(EngFunc_EmitSound, id, CHAN_BODY, g_sound_knife, 1.0, ATTN_NORM, 0, PITCH_NORM)
}

public give_strong(id)
{
	g_knife_combat[id] = false	
	g_knife_strong[id] = true	
	g_knife_axe[id] = false
	g_knife_katana[id] = false	
	g_knife_hammer[id] = false
	g_knife_thanatos[id] = false
        g_knife_boss[id] = false
    
        g_knife_sur[id] = false
	g_hasSpeed[id] = true
	g_WasShowed[id] = true

	engfunc(EngFunc_EmitSound, id, CHAN_BODY, g_sound_knife, 1.0, ATTN_NORM, 0, PITCH_NORM)
}

public give_axe(id)
{
	g_knife_combat[id] = false	
	g_knife_strong[id] = false	
	g_knife_axe[id] = true
	g_knife_katana[id] = false	
	g_knife_hammer[id] = false
	g_knife_thanatos[id] = false
        
        g_knife_sur[id] = false
        g_knife_boss[id] = false
	g_hasSpeed[id] = true
	g_WasShowed[id] = true

	engfunc(EngFunc_EmitSound, id, CHAN_BODY, g_sound_knife, 1.0, ATTN_NORM, 0, PITCH_NORM)
}

public give_katana(id)

	if (get_user_flags(id) & VIP)
{
	g_knife_combat[id] = false	
	g_knife_strong[id] = false	
	g_knife_axe[id] = false
	g_knife_katana[id] = true	
	g_knife_hammer[id] = false
	g_knife_thanatos[id] = false
        g_knife_boss[id] = false
      
        g_knife_sur[id] = false
	g_hasSpeed[id] = true
	g_WasShowed[id] = true

	engfunc(EngFunc_EmitSound, id, CHAN_BODY, g_sound_knife, 1.0, ATTN_NORM, 0, PITCH_NORM)
}


public give_hammer(id)

	if (get_user_flags(id) & SVIP)
	{
		g_knife_combat[id] = false	
		g_knife_strong[id] = false	
		g_knife_axe[id] = false
		g_knife_katana[id] = false
		g_knife_hammer[id] = true
		g_knife_thanatos[id] = false
                g_knife_boss[id] = false
             
                g_knife_sur[id] = false
		g_hasSpeed[id] =  true
		g_WasShowed[id] = true

		engfunc(EngFunc_EmitSound, id, CHAN_BODY, g_sound_knife, 1.0, ATTN_NORM, 0, PITCH_NORM)
	}

public give_thanatos(id)

	if (get_user_flags(id) & ADMIN_FLAG)
	{
		g_knife_combat[id] = false	
		g_knife_strong[id] = false	
		g_knife_axe[id] = false
		g_knife_katana[id] = false
		g_knife_hammer[id] = false
		g_knife_thanatos[id] = true
                g_knife_boss[id] = false
               
                g_knife_sur[id] = false
		g_hasSpeed[id] =  true
		g_WasShowed[id] = true

		engfunc(EngFunc_EmitSound, id, CHAN_BODY, g_sound_knife, 1.0, ATTN_NORM, 0, PITCH_NORM)
	}

public give_boss(id)

       if (get_user_flags(id) & BOSS)
       {
		g_knife_combat[id] = false	
		g_knife_strong[id] = false	
		g_knife_axe[id] = false
		g_knife_katana[id] = false
		g_knife_hammer[id] = false
		g_knife_thanatos[id] = false
                g_knife_boss[id] = true
                g_knife_sur[id] = false
 
		g_hasSpeed[id] =  true
		g_WasShowed[id] = true

		engfunc(EngFunc_EmitSound, id, CHAN_BODY, g_sound_knife, 1.0, ATTN_NORM, 0, PITCH_NORM)
       }
	
public give_sur(id)

       if (zp_get_user_survivor(id))
       {
		g_knife_combat[id] = false	
		g_knife_strong[id] = false	
		g_knife_axe[id] = false
		g_knife_katana[id] = false
		g_knife_hammer[id] = false
		g_knife_thanatos[id] = false
                g_knife_boss[id] = false
                g_knife_sur[id] = true
 
		g_hasSpeed[id] =  true
		g_WasShowed[id] = true

		engfunc(EngFunc_EmitSound, id, CHAN_BODY, g_sound_knife, 1.0, ATTN_NORM, 0, PITCH_NORM)
       }

public remove_sur(id)
{
       if (zp_get_user_survivor(id))
       {
		g_knife_combat[id] = false	
		g_knife_strong[id] = true	
		g_knife_axe[id] = false
		g_knife_katana[id] = false
		g_knife_hammer[id] = false
		g_knife_thanatos[id] = false
                g_knife_boss[id] = false
                g_knife_sur[id] = false
 
		g_hasSpeed[id] =  true
		g_WasShowed[id] = true

		engfunc(EngFunc_EmitSound, id, CHAN_BODY, g_sound_knife, 1.0, ATTN_NORM, 0, PITCH_NORM)
       }
	
}
public checkWeapon(id)
{
	new plrWeapId
    
	plrWeapId = get_user_weapon(id)
    
	if (plrWeapId == CSW_KNIFE && (g_knife_combat[id] || g_knife_strong[id] || g_knife_axe[id] || g_knife_katana[id] || g_knife_hammer[id]|| g_knife_thanatos[id] || g_knife_boss[id] || g_knife_sur[id]))
	{
		checkModel(id)
	}
}

public checkModel(id)
{
	if (zp_get_user_zombie(id))
		return PLUGIN_HANDLED
    
	if (g_knife_combat[id])
	{
		set_pev(id, pev_viewmodel2, combat_v_model)
		set_pev(id, pev_weaponmodel2, combat_p_model)
	}

	if (g_knife_strong[id])
	{
		set_pev(id, pev_viewmodel2, strong_v_model)
		set_pev(id, pev_weaponmodel2, strong_p_model)
	}

	if (g_knife_axe[id])
	{
		set_pev(id, pev_viewmodel2, axe_v_model)
		set_pev(id, pev_weaponmodel2, axe_p_model)
	}

	if (g_knife_katana[id])
	{
		set_pev(id, pev_viewmodel2, katana_v_model)
		set_pev(id, pev_weaponmodel2, katana_p_model)
	}

	if (g_knife_hammer[id])
	{
		set_pev(id, pev_viewmodel2, hammer_v_model)
		set_pev(id, pev_weaponmodel2, hammer_p_model)
	}
	if (g_knife_thanatos[id])
	{
		set_pev(id, pev_viewmodel2, thanatos_v_model)
		set_pev(id, pev_weaponmodel2, thanatos_p_model)
	}
        if (g_knife_boss[id])
	{
		set_pev(id, pev_viewmodel2, boss_v_model)
		set_pev(id, pev_weaponmodel2, boss_p_model)
	}
        if (g_knife_sur[id])
	{
		set_pev(id, pev_viewmodel2, sur_v_model)
		set_pev(id, pev_weaponmodel2, sur_p_model)
	}

	return PLUGIN_HANDLED
}

public fw_EmitSound(id, channel, const sound[])
{
	if(!is_user_alive(id) || zp_get_user_zombie(id))
		return FMRES_IGNORED
        
	for(new i = 0; i < sizeof combat_sounds; i++) 
	for(new i = 0; i < sizeof strong_sounds; i++)
	for(new i = 0; i < sizeof axe_sounds; i++)
	for(new i = 0; i < sizeof katana_sounds; i++)
	for(new i = 0; i < sizeof hammer_sounds; i++)
        for(new i = 0; i < sizeof thanatos_sounds; i++)
	{
		if(equal(sound, oldknife_sounds[i]))
		{
			if (g_knife_combat[id])
			{
				emit_sound(id, channel, combat_sounds[i], 1.0, ATTN_NORM, 0, PITCH_NORM)
				return FMRES_SUPERCEDE
			}
			if (g_knife_strong[id])
			{
				emit_sound(id, channel, strong_sounds[i], 1.0, ATTN_NORM, 0, PITCH_NORM)
				return FMRES_SUPERCEDE
			}
			if (g_knife_axe[id])
			{
				emit_sound(id, channel, axe_sounds[i], 1.0, ATTN_NORM, 0, PITCH_NORM)
				return FMRES_SUPERCEDE
			}
			if (g_knife_katana[id])
			{
				emit_sound(id, channel, katana_sounds[i], 1.0, ATTN_NORM, 0, PITCH_NORM)
				return FMRES_SUPERCEDE
			}
			if (g_knife_hammer[id])
			{
				emit_sound(id, channel, hammer_sounds[i], 1.0, ATTN_NORM, 0, PITCH_NORM)
				return FMRES_SUPERCEDE
			}
			if (g_knife_thanatos[id])
			{
				emit_sound(id, channel, hammer_sounds[i], 1.0, ATTN_NORM, 0, PITCH_NORM)
				return FMRES_SUPERCEDE
			}
			if (g_knife_boss[id])
			{
				emit_sound(id, channel, hammer_sounds[i], 1.0, ATTN_NORM, 0, PITCH_NORM)
				return FMRES_SUPERCEDE
			}			
			if (g_knife_sur[id])
			{
				emit_sound(id, channel, hammer_sounds[i], 1.0, ATTN_NORM, 0, PITCH_NORM)
				return FMRES_SUPERCEDE
			}
                        if (!g_knife_combat[id] || !g_knife_strong[id] || !g_knife_axe[id] || !g_knife_katana[id] || !g_knife_hammer[id])
			{
				emit_sound(id, channel, oldknife_sounds[i], 1.0, ATTN_NORM, 0, PITCH_NORM)
				return FMRES_SUPERCEDE
			}
		}
	}
	return FMRES_IGNORED
}

public message_DeathMsg(msg_id, msg_dest, id)
{
	static szTruncatedWeapon[33], iattacker, ivictim
	
	get_msg_arg_string(4, szTruncatedWeapon, charsmax(szTruncatedWeapon))
	
	iattacker = get_msg_arg_int(1)
	ivictim = get_msg_arg_int(2)
	
	if(!is_user_connected(iattacker) || iattacker == ivictim)
		return PLUGIN_CONTINUE

	if (!zp_get_user_zombie(iattacker))
	{
		if(equal(szTruncatedWeapon, "knife") && get_user_weapon(iattacker) == CSW_KNIFE)
		{
			if(g_knife_combat[iattacker])
				set_msg_arg_string(4, "Combat knife")
		}
	
		if(equal(szTruncatedWeapon, "knife") && get_user_weapon(iattacker) == CSW_KNIFE)
		{
			if(g_knife_strong[iattacker])
				set_msg_arg_string(4, "Strong knife")
		}

		if(equal(szTruncatedWeapon, "knife") && get_user_weapon(iattacker) == CSW_KNIFE)
		{
			if(g_knife_axe[iattacker])
				set_msg_arg_string(4, "Axe knife")
		}

		if(equal(szTruncatedWeapon, "knife") && get_user_weapon(iattacker) == CSW_KNIFE)
		{
			if(g_knife_katana[iattacker])
				set_msg_arg_string(4, "Katana knife")
		}

		if(equal(szTruncatedWeapon, "knife") && get_user_weapon(iattacker) == CSW_KNIFE)
		{
			if(g_knife_hammer[iattacker])
				set_msg_arg_string(4, "Ice knife")
		}
		if(equal(szTruncatedWeapon, "knife") && get_user_weapon(iattacker) == CSW_KNIFE)
		{
			if(g_knife_thanatos[iattacker])
				set_msg_arg_string(4, "Scythe knife")
		}
                if(equal(szTruncatedWeapon, "knife") && get_user_weapon(iattacker) == CSW_KNIFE)
		{
			if(g_knife_boss[iattacker])
				set_msg_arg_string(4, "Fire knife")
		}
                
                if(equal(szTruncatedWeapon, "knife") && get_user_weapon(iattacker) == CSW_KNIFE)
		{
			if(g_knife_sur[iattacker])
				set_msg_arg_string(4, "Sur knife")
		}
	}
	return PLUGIN_CONTINUE
}

stock print_col_chat(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 Color  
    	replace_all(msg, 190, "!y", "^1"); // Default Color 
    	replace_all(msg, 190, "!t", "^3"); // Team Color  
    	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, SayText, _, players[i]);  
                		write_byte(players[i]);  
                		write_string(msg);  
                		message_end();  
            		}  
        	}  
    	}  
}   

public fw_PlayerPreThink(id)
{
	if(!is_user_alive(id) || zp_get_user_zombie(id))
		return FMRES_IGNORED

	new temp[2], weapon = get_user_weapon(id, temp[0], temp[1])

	if (weapon == CSW_KNIFE && g_knife_combat[id])
	{
		g_hasSpeed[id] = true
		set_pev(id, pev_maxspeed, get_pcvar_float(cvar_knife_combat_spd))
	}

	if(weapon == CSW_KNIFE && g_knife_combat[id])        
		if ((pev(id, pev_button) & IN_JUMP) && !(pev(id, pev_oldbuttons) & IN_JUMP))
		{
			new flags = pev(id, pev_flags)
			new waterlvl = pev(id, pev_waterlevel)
			
			if (!(flags & FL_ONGROUND))
				return FMRES_IGNORED

			if (flags & FL_WATERJUMP)
				return FMRES_IGNORED

			if (waterlvl > 1)
				return FMRES_IGNORED
			
			new Float:fVelocity[3]
			pev(id, pev_velocity, fVelocity)
			
			fVelocity[2] += get_pcvar_num(cvar_knife_combat_jump)
			
			set_pev(id, pev_velocity, fVelocity)
			set_pev(id, pev_gaitsequence, 7)
		}
	if (weapon == CSW_KNIFE && g_knife_strong[id])
	{
		g_hasSpeed[id] = true
		set_pev(id, pev_maxspeed, get_pcvar_float(cvar_knife_strong_spd))

		if ((pev(id, pev_button) & IN_JUMP) && !(pev(id, pev_oldbuttons) & IN_JUMP))
		{
			new flags = pev(id, pev_flags)
			new waterlvl = pev(id, pev_waterlevel)
			
			if (!(flags & FL_ONGROUND))
				return FMRES_IGNORED

			if (flags & FL_WATERJUMP)
				return FMRES_IGNORED

			if (waterlvl > 1)
				return FMRES_IGNORED
			
			new Float:fVelocity[3]
			pev(id, pev_velocity, fVelocity)
			
			fVelocity[2] += get_pcvar_num(cvar_knife_strong_jump)
			
			set_pev(id, pev_velocity, fVelocity)
			set_pev(id, pev_gaitsequence, 7)
		}
	}
	if (weapon == CSW_KNIFE && g_knife_axe[id])
	{
		g_hasSpeed[id] = true
		set_pev(id, pev_maxspeed, get_pcvar_float(cvar_knife_axe_spd))

		if ((pev(id, pev_button) & IN_JUMP) && !(pev(id, pev_oldbuttons) & IN_JUMP))
		{
			new flags = pev(id, pev_flags)
			new waterlvl = pev(id, pev_waterlevel)
			
			if (!(flags & FL_ONGROUND))
				return FMRES_IGNORED

			if (flags & FL_WATERJUMP)
				return FMRES_IGNORED

			if (waterlvl > 1)
				return FMRES_IGNORED
			
			new Float:fVelocity[3]
			pev(id, pev_velocity, fVelocity)
			
			fVelocity[2] += get_pcvar_num(cvar_knife_axe_jump)
			
			set_pev(id, pev_velocity, fVelocity)
			set_pev(id, pev_gaitsequence, 7)
		}
	}
	if (weapon == CSW_KNIFE && g_knife_katana[id])
	{
		g_hasSpeed[id] = true
		set_pev(id, pev_maxspeed, get_pcvar_float(cvar_knife_katana_spd))

		if ((pev(id, pev_button) & IN_JUMP) && !(pev(id, pev_oldbuttons) & IN_JUMP))
		{
			new flags = pev(id, pev_flags)
			new waterlvl = pev(id, pev_waterlevel)
			
			if (!(flags & FL_ONGROUND))
				return FMRES_IGNORED

			if (flags & FL_WATERJUMP)
				return FMRES_IGNORED

			if (waterlvl > 1)
				return FMRES_IGNORED
			
			new Float:fVelocity[3]
			pev(id, pev_velocity, fVelocity)
			
			fVelocity[2] += get_pcvar_num(cvar_knife_katana_jump)
			
			set_pev(id, pev_velocity, fVelocity)
			set_pev(id, pev_gaitsequence, 7)
		}
	}
	if (weapon == CSW_KNIFE && g_knife_hammer[id])
	{
		g_hasSpeed[id] = true
		set_pev(id, pev_maxspeed, get_pcvar_float(cvar_knife_hammer_spd))

		if ((pev(id, pev_button) & IN_JUMP) && !(pev(id, pev_oldbuttons) & IN_JUMP))
		{
			new flags = pev(id, pev_flags)
			new waterlvl = pev(id, pev_waterlevel)
			
			if (!(flags & FL_ONGROUND))
				return FMRES_IGNORED

			if (flags & FL_WATERJUMP)
				return FMRES_IGNORED

			if (waterlvl > 1)
				return FMRES_IGNORED
			
			new Float:fVelocity[3]
			pev(id, pev_velocity, fVelocity)
			
			fVelocity[2] += get_pcvar_num(cvar_knife_hammer_jump)
			
			set_pev(id, pev_velocity, fVelocity)
			set_pev(id, pev_gaitsequence, 7)
		}
	}
	if (weapon == CSW_KNIFE && g_knife_thanatos[id])
	{
		g_hasSpeed[id] = true
		set_pev(id, pev_maxspeed, get_pcvar_float(cvar_knife_thanatos_spd))

		if ((pev(id, pev_button) & IN_JUMP) && !(pev(id, pev_oldbuttons) & IN_JUMP))
		{
			new flags = pev(id, pev_flags)
			new waterlvl = pev(id, pev_waterlevel)
			
			if (!(flags & FL_ONGROUND))
				return FMRES_IGNORED

			if (flags & FL_WATERJUMP)
				return FMRES_IGNORED

			if (waterlvl > 1)
				return FMRES_IGNORED
			
			new Float:fVelocity[3]
			pev(id, pev_velocity, fVelocity)
			
			fVelocity[2] += get_pcvar_num(cvar_knife_thanatos_jump)
			
			set_pev(id, pev_velocity, fVelocity)
			set_pev(id, pev_gaitsequence, 7)
		}
	}

        if (weapon == CSW_KNIFE && g_knife_boss[id])
	{
		g_hasSpeed[id] = true
		set_pev(id, pev_maxspeed, get_pcvar_float(cvar_knife_boss_spd))

		if ((pev(id, pev_button) & IN_JUMP) && !(pev(id, pev_oldbuttons) & IN_JUMP))
		{
			new flags = pev(id, pev_flags)
			new waterlvl = pev(id, pev_waterlevel)
			
			if (!(flags & FL_ONGROUND))
				return FMRES_IGNORED

			if (flags & FL_WATERJUMP)
				return FMRES_IGNORED

			if (waterlvl > 1)
				return FMRES_IGNORED
			
			new Float:fVelocity[3]
			pev(id, pev_velocity, fVelocity)
			
			fVelocity[2] += get_pcvar_num(cvar_knife_boss_jump)
			
			set_pev(id, pev_velocity, fVelocity)
			set_pev(id, pev_gaitsequence, 7)
		}
	}

        if (weapon == CSW_KNIFE && g_knife_sur[id])
	{
		g_hasSpeed[id] = true
		set_pev(id, pev_maxspeed, get_pcvar_float(cvar_knife_sur_spd))

		if ((pev(id, pev_button) & IN_JUMP) && !(pev(id, pev_oldbuttons) & IN_JUMP))
		{
			new flags = pev(id, pev_flags)
			new waterlvl = pev(id, pev_waterlevel)
			
			if (!(flags & FL_ONGROUND))
				return FMRES_IGNORED

			if (flags & FL_WATERJUMP)
				return FMRES_IGNORED

			if (waterlvl > 1)
				return FMRES_IGNORED
			
			new Float:fVelocity[3]
			pev(id, pev_velocity, fVelocity)
			
			fVelocity[2] += get_pcvar_num(cvar_knife_sur_jump)
			
			set_pev(id, pev_velocity, fVelocity)
			set_pev(id, pev_gaitsequence, 7)
		}
	}

	return FMRES_IGNORED
}  

public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type)
{
	if(!is_user_connected(attacker))
		return HAM_IGNORED
	
	if(zp_get_user_zombie(attacker))
		return HAM_IGNORED

	new weapon = get_user_weapon(attacker)

	if (weapon == CSW_KNIFE && g_knife_combat[attacker])
	{	
		SetHamParamFloat(4, damage * get_pcvar_float(cvar_knife_combat_dmg))
	}
	if (weapon == CSW_KNIFE && g_knife_strong[attacker])
	{	
		SetHamParamFloat(4, damage * get_pcvar_float(cvar_knife_strong_dmg))
	}
	if (weapon == CSW_KNIFE && g_knife_axe[attacker])
	{	
		SetHamParamFloat(4, damage * get_pcvar_float(cvar_knife_axe_dmg))
	}
	if (weapon == CSW_KNIFE && g_knife_katana[attacker])
	{	
		SetHamParamFloat(4, damage * get_pcvar_float(cvar_knife_katana_dmg))
	}
		
	if (weapon == CSW_KNIFE && g_knife_hammer[attacker])
	{	 
		SetHamParamFloat(4, damage * get_pcvar_float(cvar_knife_hammer_dmg))
	}
	
	if (weapon == CSW_KNIFE && g_knife_thanatos[attacker])
	{	 
		SetHamParamFloat(4, damage * get_pcvar_float(cvar_knife_thanatos_dmg))
	}

        if (weapon == CSW_KNIFE && g_knife_boss[attacker])
	{	 
		SetHamParamFloat(4, damage * get_pcvar_float(cvar_knife_boss_dmg))
	}

        if (weapon == CSW_KNIFE && g_knife_sur[attacker])
	{	 
		SetHamParamFloat(4, damage * get_pcvar_float(cvar_knife_sur_dmg))
                if( !task_exists( victim + TASK_FBURN ) )

                        {
                            g_burning_duration8[ victim ] += 10
                            set_task( 0.2, "CTask__BurningFlame8", victim + TASK_FBURN, _, _, "b" )
                        }
	}

        if (weapon == CSW_KNIFE && g_knife_combat[attacker])
	{
		if(!task_exists(victim + 100))
		{
			g_burning1[victim] += 5
			
			set_task(0.1, "Burning1", victim + 100, _, _, "b")
		}
	}

	if (weapon == CSW_KNIFE && g_knife_strong[attacker])
	{
		if(!task_exists(victim + 100))
		{
			g_burning2[victim] += 6
			
			set_task(0.1, "Burning2", victim + 100, _, _, "b")
		}
	}
        
        if (weapon == CSW_KNIFE && g_knife_axe[attacker])
	{
		if(!task_exists(victim + 100))
		{
			g_burning3[victim] += 4
			
			set_task(0.1, "Burning3", victim + 100, _, _, "b")
		}
	}

	if (weapon == CSW_KNIFE && g_knife_katana[attacker])
	{
		if(!task_exists(victim + 100))
		{
			g_burning4[victim] += 7
			
			set_task(0.1, "Burning4", victim + 100, _, _, "b")
		}
	}

        if (weapon == CSW_KNIFE && g_knife_hammer[attacker])
	{
		if(!task_exists(victim + 100))
		{
			g_burning5[victim] += 8
			
			set_task(0.1, "Burning5", victim + 100, _, _, "b")
		}
	}

	if (weapon == CSW_KNIFE && g_knife_thanatos[attacker])
	{
		if(!task_exists(victim + 100))
		{
			g_burning6[victim] += 9
			
			set_task(0.1, "Burning6", victim + 100, _, _, "b")
		}
	}

        if (weapon == CSW_KNIFE && g_knife_boss[attacker])
	{
		if(!task_exists(victim + 100))
		{
			g_burning7[victim] += 11
			
			set_task(0.1, "Burning7", victim + 100, _, _, "b")
		}
	}

	return HAM_IGNORED
}

public fw_Knife_SecondaryAttack_Post(knife) 
{     
    	static id 
    	id = get_pdata_cbase(knife, m_pPlayer, 4) 

    	if(zp_get_user_zombie(id))
		return HAM_IGNORED
    
    	if(is_user_connected(id) && g_knife_combat[id]) 
    	{ 
        	static Float:flRate 
        	flRate = get_pcvar_float(cvar_knife_combat_spd_attack2) 
         
        	set_pdata_float(knife, m_flNextPrimaryAttack, flRate, 4) 
        	set_pdata_float(knife, m_flNextSecondaryAttack, flRate, 4) 
        	set_pdata_float(knife, m_flTimeWeaponIdle, flRate, 4) 
    	} 
 
    	if(is_user_connected(id) && g_knife_strong[id]) 
    	{ 
        	static Float:flRate 
        	flRate = get_pcvar_float(cvar_knife_strong_spd_attack2) 
        	 
        	set_pdata_float(knife, m_flNextPrimaryAttack, flRate, 4) 
        	set_pdata_float(knife, m_flNextSecondaryAttack, flRate, 4) 
        	set_pdata_float(knife, m_flTimeWeaponIdle, flRate, 4) 
    	} 

    	if(is_user_connected(id) && g_knife_axe[id]) 
    	{ 
        	static Float:flRate 
        	flRate = get_pcvar_float(cvar_knife_axe_spd_attack2) 
        		 
        	set_pdata_float(knife, m_flNextPrimaryAttack, flRate, 4) 
        	set_pdata_float(knife, m_flNextSecondaryAttack, flRate, 4) 
        	set_pdata_float(knife, m_flTimeWeaponIdle, flRate, 4) 
    	} 

    	if(is_user_connected(id) && g_knife_katana[id]) 
    	{ 
        	static Float:flRate 
        	flRate = get_pcvar_float(cvar_knife_katana_spd_attack2) 
        		 
        	set_pdata_float(knife, m_flNextPrimaryAttack, flRate, 4) 
        	set_pdata_float(knife, m_flNextSecondaryAttack, flRate, 4) 
        	set_pdata_float(knife, m_flTimeWeaponIdle, flRate, 4) 
    	} 

    	if(is_user_connected(id) && g_knife_hammer[id]) 
    	{ 
        	static Float:flRate 
        	flRate = get_pcvar_float(cvar_hammer_spd_attack2) 
        	 
        	set_pdata_float(knife, m_flNextPrimaryAttack, flRate, 4) 
        	set_pdata_float(knife, m_flNextSecondaryAttack, flRate, 4) 
        	set_pdata_float(knife, m_flTimeWeaponIdle, flRate, 4) 
    	} 	
	
	if(is_user_connected(id) && g_knife_thanatos[id]) 
    	{ 
        	static Float:flRate 
        	flRate = get_pcvar_float(cvar_thanatos_spd_attack2) 
        	 
        	set_pdata_float(knife, m_flNextPrimaryAttack, flRate, 4) 
        	set_pdata_float(knife, m_flNextSecondaryAttack, flRate, 4) 
        	set_pdata_float(knife, m_flTimeWeaponIdle, flRate, 4) 
    	} 	

        if(is_user_connected(id) && g_knife_boss[id]) 
    	{ 
        	static Float:flRate 
        	flRate = get_pcvar_float(cvar_boss_spd_attack2) 
        	 
        	set_pdata_float(knife, m_flNextPrimaryAttack, flRate, 4) 
        	set_pdata_float(knife, m_flNextSecondaryAttack, flRate, 4) 
        	set_pdata_float(knife, m_flTimeWeaponIdle, flRate, 4) 
    	} 	
   
        if(is_user_connected(id) && g_knife_sur[id]) 
    	{ 
        	static Float:flRate 
        	flRate = get_pcvar_float(cvar_sur_spd_attack2) 
        	 
        	set_pdata_float(knife, m_flNextPrimaryAttack, flRate, 4) 
        	set_pdata_float(knife, m_flNextSecondaryAttack, flRate, 4) 
        	set_pdata_float(knife, m_flTimeWeaponIdle, flRate, 4) 
    	} 	

    	return HAM_IGNORED 
} 

public Burning1(taskid)
{
	static origin[3], flags
	get_user_origin(ID_FBURN1, origin)
	flags = pev(ID_FBURN1, pev_flags)
	if ((flags & FL_INWATER) || g_burning1[ID_FBURN1] < 1 || !is_user_alive(ID_FBURN1))
	{
		remove_task(taskid)
		return
	}
	message_begin(MSG_PVS, SVC_TEMPENTITY, origin)
	write_byte(TE_SPRITE)
	write_coord(origin[0]+random_num(-5, 5))
	write_coord(origin[1]+random_num(-5, 5))
	write_coord(origin[2]+random_num(-10, 10))
	write_short(g_sprite1)
	write_byte(2) 
	write_byte(200)
	message_end()
	
	g_burning1[ID_FBURN1]--
}

public Burning2(taskid)
{
	static origin[3], flags
	get_user_origin(ID_FBURN2, origin)
	flags = pev(ID_FBURN2, pev_flags)
	if ((flags & FL_INWATER) || g_burning2[ID_FBURN2] < 1 || !is_user_alive(ID_FBURN2))
	{
		remove_task(taskid)
		return
	}
	message_begin(MSG_PVS, SVC_TEMPENTITY, origin)
	write_byte(TE_SPRITE)
	write_coord(origin[0]+random_num(-5, 5))
	write_coord(origin[1]+random_num(-5, 5))
	write_coord(origin[2]+random_num(-10, 10))
	write_short(g_sprite2)
	write_byte(2) 
	write_byte(200)
	message_end()
	
	g_burning2[ID_FBURN2]--
}

public Burning3(taskid)
{
	static origin[3], flags
	get_user_origin(ID_FBURN3, origin)
	flags = pev(ID_FBURN3, pev_flags)
	if ((flags & FL_INWATER) || g_burning3[ID_FBURN3] < 1 || !is_user_alive(ID_FBURN3))
	{
		remove_task(taskid)
		return
	}
	message_begin(MSG_PVS, SVC_TEMPENTITY, origin)
	write_byte(TE_SPRITE)
	write_coord(origin[0]+random_num(-5, 5))
	write_coord(origin[1]+random_num(-5, 5))
	write_coord(origin[2]+random_num(-10, 10))
	write_short(g_sprite3)
	write_byte(2) 
	write_byte(200)
	message_end()
	
	g_burning3[ID_FBURN3]--
}

public Burning4(taskid)
{
	static origin[3], flags
	get_user_origin(ID_FBURN4, origin)
	flags = pev(ID_FBURN1, pev_flags)
	if ((flags & FL_INWATER) || g_burning4[ID_FBURN4] < 1 || !is_user_alive(ID_FBURN4))
	{
		remove_task(taskid)
		return
	}
	message_begin(MSG_PVS, SVC_TEMPENTITY, origin)
	write_byte(TE_SPRITE)
	write_coord(origin[0]+random_num(-5, 5))
	write_coord(origin[1]+random_num(-5, 5))
	write_coord(origin[2]+random_num(-10, 10))
	write_short(g_sprite4)
	write_byte(2) 
	write_byte(200)
	message_end()
	
	g_burning4[ID_FBURN1]--
}

public Burning5(taskid)
{
	static origin[3], flags
	get_user_origin(ID_FBURN5, origin)
	flags = pev(ID_FBURN5, pev_flags)
	if ((flags & FL_INWATER) || g_burning5[ID_FBURN5] < 1 || !is_user_alive(ID_FBURN5))
	{
		remove_task(taskid)
		return
	}
	message_begin(MSG_PVS, SVC_TEMPENTITY, origin)
	write_byte(TE_SPRITE)
	write_coord(origin[0]+random_num(-5, 5))
	write_coord(origin[1]+random_num(-5, 5))
	write_coord(origin[2]+random_num(-10, 10))
	write_short(g_sprite5)
	write_byte(2) 
	write_byte(200)
	message_end()
	
	g_burning5[ID_FBURN5]--

}

public Burning6(taskid)
{
	static origin[3], flags
	get_user_origin(ID_FBURN6, origin)
	flags = pev(ID_FBURN6, pev_flags)
	if ((flags & FL_INWATER) || g_burning6[ID_FBURN6] < 1 || !is_user_alive(ID_FBURN6))
	{
		remove_task(taskid)
		return
	}
	message_begin(MSG_PVS, SVC_TEMPENTITY, origin)
	write_byte(TE_SPRITE)
	write_coord(origin[0]+random_num(-5, 5))
	write_coord(origin[1]+random_num(-5, 5))
	write_coord(origin[2]+random_num(-10, 10))
	write_short(g_sprite6)
	write_byte(2) 
	write_byte(200)
	message_end()
	
	g_burning6[ID_FBURN6]--
}

public Burning7(taskid)
{
	static origin[3], flags
	get_user_origin(ID_FBURN7, origin)
	flags = pev(ID_FBURN7, pev_flags)
	if ((flags & FL_INWATER) || g_burning7[ID_FBURN7] < 1 || !is_user_alive(ID_FBURN7))
	{
		remove_task(taskid)
		return
	}
	message_begin(MSG_PVS, SVC_TEMPENTITY, origin)
	write_byte(TE_SPRITE)
	write_coord(origin[0]+random_num(-5, 5))
	write_coord(origin[1]+random_num(-5, 5))
	write_coord(origin[2]+random_num(-10, 10))
	write_short(g_sprite7)
	write_byte(2) 
	write_byte(200)
	message_end()
	
	g_burning7[ID_FBURN7]--
}


public CTask__BurningFlame8( taskid )
{
    // Get player origin and flags
    static origin[3], flags
    get_user_origin(ID_FBURN8, origin)
    flags = pev(ID_FBURN8, pev_flags)
    
    // Madness mode - in water - burning stopped
    if ((flags & FL_INWATER) || g_burning_duration8[ID_FBURN1] < 1 || g_fRoundEnd || !is_user_alive(ID_FBURN8))
    {
        // 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]) // z
        write_short(g_skull) // sprite
        write_byte(random_num(15, 20)) // scale
        write_byte(random_num(10, 20)) // framerate
        message_end()
        
        // Task not needed anymore
        remove_task(taskid)
        return
    }
    
    // Get player's health
    static health
    health = pev(ID_FBURN8, pev_health)
    
    // Take damage from the fire
    if (health - FIRE_DAMAGE1 > 0)
        fm_set_user_health(ID_FBURN1, health - FIRE_DAMAGE1)
    
    // 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(g_flameSpr8) // sprite
    write_byte(random_num(5, 10)) // scale
    write_byte(200) // brightness
    message_end()

    g_burning_duration8[ID_FBURN8]--
}

public event_Damage(id)
{
	new weapon , attacker = get_user_attacker(id , weapon);

	if(!is_user_alive(attacker))
		return PLUGIN_CONTINUE;

	if(weapon == CSW_KNIFE && g_knife_combat[attacker])
	{
		new Float:vec[3];
		new Float:oldvelo[3];
		get_user_velocity(id, oldvelo);
		create_velocity_vector(id , attacker , vec);
		vec[0] += oldvelo[0];
		vec[1] += oldvelo[1];
		set_user_velocity(id , vec);
	}

	if(weapon == CSW_KNIFE && g_knife_strong[attacker])
	{
		new Float:vec[3];
		new Float:oldvelo[3];
		get_user_velocity(id, oldvelo);
		create_velocity_vector(id , attacker , vec);
		vec[0] += oldvelo[0];
		vec[1] += oldvelo[1];
		set_user_velocity(id , vec);
	}

	if(weapon == CSW_KNIFE && g_knife_axe[attacker])
	{
		new Float:vec[3];
		new Float:oldvelo[3];
		get_user_velocity(id, oldvelo);
		create_velocity_vector(id , attacker , vec);
		vec[0] += oldvelo[0];
		vec[1] += oldvelo[1];
		set_user_velocity(id , vec);
	}

	if(weapon == CSW_KNIFE && g_knife_katana[attacker])
	{
		new Float:vec[3];
		new Float:oldvelo[3];
		get_user_velocity(id, oldvelo);
		create_velocity_vector(id , attacker , vec);
		vec[0] += oldvelo[0];
		vec[1] += oldvelo[1];
		set_user_velocity(id , vec);
	}

	if(weapon == CSW_KNIFE && g_knife_hammer[attacker])
	{
		new Float:vec[3];
		new Float:oldvelo[3];
		get_user_velocity(id, oldvelo);
		create_velocity_vector(id , attacker , vec);
		vec[0] += oldvelo[0];
		vec[1] += oldvelo[1];
		set_user_velocity(id , vec);
	}
	
	if(weapon == CSW_KNIFE && g_knife_thanatos[attacker])
	{
		new Float:vec[3];
		new Float:oldvelo[3];
		get_user_velocity(id, oldvelo);
		create_velocity_vector(id , attacker , vec);
		vec[0] += oldvelo[0];
		vec[1] += oldvelo[1];
		set_user_velocity(id , vec);
	}

        if(weapon == CSW_KNIFE && g_knife_boss[attacker])
	{
		new Float:vec[3];
		new Float:oldvelo[3];
		get_user_velocity(id, oldvelo);
		create_velocity_vector(id , attacker , vec);
		vec[0] += oldvelo[0];
		vec[1] += oldvelo[1];
		set_user_velocity(id , vec);
	}
      
        if(weapon == CSW_KNIFE && g_knife_sur[attacker])
	{
		new Float:vec[3];
		new Float:oldvelo[3];
		get_user_velocity(id, oldvelo);
		create_velocity_vector(id , attacker , vec);
		vec[0] += oldvelo[0];
		vec[1] += oldvelo[1];
		set_user_velocity(id , vec);
	}

	return PLUGIN_CONTINUE;
}

stock fm_set_user_health( index, health ) 
    health > 0 ? set_pev(index, pev_health, float(health)) : dllfunc(DLLFunc_ClientKill, index)

stock create_velocity_vector(victim,attacker,Float:velocity[3])
{
	if(!zp_get_user_zombie(victim) || !is_user_alive(attacker))
		return 0;

	new Float:vicorigin[3];
	new Float:attorigin[3];
	entity_get_vector(victim   , EV_VEC_origin , vicorigin);
	entity_get_vector(attacker , EV_VEC_origin , attorigin);

	new Float:origin2[3]
	origin2[0] = vicorigin[0] - attorigin[0];
	origin2[1] = vicorigin[1] - attorigin[1];

	new Float:largestnum = 0.0;

	if(floatabs(origin2[0])>largestnum) largestnum = floatabs(origin2[0]);
	if(floatabs(origin2[1])>largestnum) largestnum = floatabs(origin2[1]);

	origin2[0] /= largestnum;
	origin2[1] /= largestnum;

	if (g_knife_combat[attacker])
	{
		velocity[0] = ( origin2[0] * (get_pcvar_float(cvar_knife_combat_knock) * 3000) ) / get_entity_distance(victim , attacker);
		velocity[1] = ( origin2[1] * (get_pcvar_float(cvar_knife_combat_knock) * 3000) ) / get_entity_distance(victim , attacker);
	}

	if (g_knife_strong[attacker])
	{
		velocity[0] = ( origin2[0] * (get_pcvar_float(cvar_knife_strong_knock) * 3000) ) / get_entity_distance(victim , attacker);
		velocity[1] = ( origin2[1] * (get_pcvar_float(cvar_knife_strong_knock) * 3000) ) / get_entity_distance(victim , attacker);
	}

	if (g_knife_axe[attacker])
	{
		velocity[0] = ( origin2[0] * (get_pcvar_float(cvar_knife_axe_knock) * 3000) ) / get_entity_distance(victim , attacker);
		velocity[1] = ( origin2[1] * (get_pcvar_float(cvar_knife_axe_knock) * 3000) ) / get_entity_distance(victim , attacker);
	}

	if (g_knife_katana[attacker])
	{
		velocity[0] = ( origin2[0] * (get_pcvar_float(cvar_knife_katana_knock) * 3000) ) / get_entity_distance(victim , attacker);
		velocity[1] = ( origin2[1] * (get_pcvar_float(cvar_knife_katana_knock) * 3000) ) / get_entity_distance(victim , attacker);
	}

	if (g_knife_hammer[attacker])
	{
		velocity[0] = ( origin2[0] * (get_pcvar_float(cvar_knife_hammer_knock) * 3000) ) / get_entity_distance(victim , attacker);
		velocity[1] = ( origin2[1] * (get_pcvar_float(cvar_knife_hammer_knock) * 3000) ) / get_entity_distance(victim , attacker);
	}

	if (g_knife_thanatos[attacker])
	{
		velocity[0] = ( origin2[0] * (get_pcvar_float(cvar_knife_thanatos_knock) * 3000) ) / get_entity_distance(victim , attacker);
		velocity[1] = ( origin2[1] * (get_pcvar_float(cvar_knife_thanatos_knock) * 3000) ) / get_entity_distance(victim , attacker);
	}

        if (g_knife_boss[attacker])
	{
		velocity[0] = ( origin2[0] * (get_pcvar_float(cvar_knife_boss_knock) * 3000) ) / get_entity_distance(victim , attacker);
		velocity[1] = ( origin2[1] * (get_pcvar_float(cvar_knife_boss_knock) * 3000) ) / get_entity_distance(victim , attacker);
	}

        if (g_knife_sur[attacker])
	{
		velocity[0] = ( origin2[0] * (get_pcvar_float(cvar_knife_sur_knock) * 3000) ) / get_entity_distance(victim , attacker);
		velocity[1] = ( origin2[1] * (get_pcvar_float(cvar_knife_sur_knock) * 3000) ) / get_entity_distance(victim , attacker);
	}

	if(velocity[0] <= 20.0 || velocity[1] <= 20.0)
		velocity[2] = random_float(200.0 , 275.0);

	return 1;
}

stock fm_set_user_maxspeed(index, Float:speed = -1.0) 
{
        engfunc(EngFunc_SetClientMaxspeed, index, speed);
        set_pev(index, pev_maxspeed, speed);

        return 1;
}       


public client_putinserver(id)
{
	switch(random_num(0, 0))
	{
		case 0:
		{
			g_knife_combat[id] = true
			g_hasSpeed[id] = true
		}

	}
}
Последна промяна от OciXCrom TM на 06 май 2019, 01:06, променено общо 1 път.
Причина: Премахнах линка от mediafire, тъй като съдържа компилиран .amxx файл.

Потребителски аватар

OciXCrom TM
Администратор
Администратор
Мнения: 5383
Регистриран: 06 окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 87 пъти
Получена благодарност: 601 пъти
Години: 21
Контакти:

Заявка за редакция на - OciXCrom Knife Models

Мнение от OciXCrom TM » 05 май 2019, 20:44

@Halu - защо му е този в пъти по-зле написан и hardcoded плъгин при положение, че този в първото мнение има добавка за специални умения и възможност за добавяне неограничен брой такива?

Потребителски аватар

Halu xv1rg0
Потребител
Потребител
Мнения: 43
Регистриран: 06 апр 2019, 17:11
Се отблагодари: 4 пъти
Получена благодарност: 8 пъти

Заявка за редакция на - OciXCrom Knife Models

Мнение от Halu xv1rg0 » 05 май 2019, 22:26

Не мисля , че е нужно да ме нападаш заради това че съм дал друг плъгин от твоя , един вид изпълнявам му заявката ако момчето не може сам да се оправи с нагласянето/редактирането на плъгини и тем подобни работи. Пък и за зомби мод-а има доста да си играе с твоите ножове и скинове докато ги направи "перфектни" за въпросния мод.

Потребителски аватар

Автор на темата
TSChannel
Потребител
Потребител
Мнения: 105
Регистриран: 16 апр 2019, 21:19

Заявка за редакция на - OciXCrom Knife Models

Мнение от TSChannel » 05 май 2019, 23:30

МНЕНИЕТО Е СКРИТО ОТ СТРАНА НА МОДЕРАТОР! ЦЪКНИ ВЪРХУ ЛЕНТАТА ЗА ДА ГО ПРЕГЛЕДАШ.
Последна промяна от thoughtz 821E3 на 06 май 2019, 00:09, променено общо 1 път.
Причина: Безсмислен коментар = спам
-=Zombie Plague 4.3=-[Jetpack - UltimateAmmo|BestItems - Skins|FreeVIP]
Join Now - 93.123.18.40:27018
-=Zombie Plague 4.3=-

Потребителски аватар

OciXCrom TM
Администратор
Администратор
Мнения: 5383
Регистриран: 06 окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 87 пъти
Получена благодарност: 601 пъти
Години: 21
Контакти:

Заявка за редакция на - OciXCrom Knife Models

Мнение от OciXCrom TM » 06 май 2019, 01:05

Halu написа:
05 май 2019, 22:26
Не мисля , че е нужно да ме нападаш заради това че съм дал друг плъгин от твоя , един вид изпълнявам му заявката ако момчето не може сам да се оправи с нагласянето/редактирането на плъгини и тем подобни работи. Пък и за зомби мод-а има доста да си играе с твоите ножове и скинове докато ги направи "перфектни" за въпросния мод.
Това не е никакво нападение. Просто ти обяснявам, че кодът който си дал, е доста пъти по-зле от този за който става дума в темата. Като цяло и моето мнение е предложение да ползва съб-плъгина, пък той нека да си прецени кое е по-правилно.

По темата: когато мога ще добавя поддръжка за Zombie Plague в плъгина, тоест ножовете да са активни само за хората.

Потребителски аватар

Автор на темата
TSChannel
Потребител
Потребител
Мнения: 105
Регистриран: 16 апр 2019, 21:19

Заявка за редакция на - OciXCrom Knife Models

Мнение от TSChannel » 06 май 2019, 13:06

Lock! няма да казвам къв плъгин, че използвам :) :surrender:
-=Zombie Plague 4.3=-[Jetpack - UltimateAmmo|BestItems - Skins|FreeVIP]
Join Now - 93.123.18.40:27018
-=Zombie Plague 4.3=-

Заключена

Върни се в “Заявки за плъгини”

Кой е на линия

Потребители, разглеждащи този форум: Няма регистрирани потребители и 1 гост