saw model change - only 1 respawn pls edit plugins

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
Kvothe
Извън линия
Foreigner
Foreigner
Мнения: 33
Регистриран на: 12 Ное 2018, 22:36
Се отблагодари: 3 пъти

saw model change - only 1 respawn pls edit plugins

Мнение от Kvothe » 13 Ное 2018, 11:44

My friend suggested the this site. Please help me. I using version ZP 5.0.8 ( official allienmod site)
1- anyone take chainsaw auto changed models '' davidblack '' ( sma 1 )
+ nextround no hp delete chainsaw player ( zp all player reset hp = 100 )

2- Anyone buy '' extra_item_nemesis '' make a sound that everyone can hear. ( some like round start nemesis ''nemesis1.wav'') ( sma 2 ) solved sma 4 :)

3- İ added my server '' zp_respawn menu '' but plugin unlimited respawn. i need only 1 respawn ( sma 3 )


sma 1 zm_extra_chainsaw

Код за потвърждение: Избери целия код

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

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

// Item Cost
const chainsaw_ap_cost = 75 // Ammo packs Cost

// Звук при покупке брони + константы
new const g_sound_buyarmor[] = { "items/tr_kevlar.wav" }
new g_armor_amount, g_armor_limit, g_hp_amount

// Custom Chainsaw Models
new const chainsaw_viewmodel[] = "models/chainsaw/v_chainsaw.mdl"	// View Weapon Model (v_)
new const chainsaw_playermodel[] = "models/chainsaw/p_chainsaw.mdl"	// Player Weapon Model (p_)
new const chainsaw_worldmodel[] = "models/chainsaw/w_chainsaw.mdl"	// World Weapon Model (w_)

// Custom Chainsaw Sounds
new const chainsaw_sounds[][] =
{
	"chainsaw/chainsaw_deploy.wav",		// Deploy Sound (knife_deploy1.wav)
	"chainsaw/chainsaw_hit1.wav",		// Hit 1 (knife_hit1.wav)
	"chainsaw/chainsaw_hit2.wav",		// Hit 2 (knife_hit2.wav)
	"chainsaw/chainsaw_hit1.wav",		// Hit 3 (knife_hit3.wav)
	"chainsaw/chainsaw_hit2.wav",		// Hit 4 (knife_hit4.wav)
	"chainsaw/chainsaw_hitwall.wav",	// Hit Wall (knife_hitwall1.wav)
	"chainsaw/chainsaw_miss.wav",		// Slash 1 (knife_slash1.wav)
	"chainsaw/chainsaw_miss.wav",		// Slash 2 (knife_slash2.wav)
	"chainsaw/chainsaw_stab.wav"		// Stab (knife_stab1.wav)
}

// Dropped Chainsaw Size
new Float:chainsaw_mins[3] = { -2.0, -2.0, -2.0 }
new Float:chainsaw_maxs[3] = { 2.0, 2.0, 2.0 }


/*================================================================================
 Customization ends here! Yes, that's it. Editing anything beyond
 here is not officially supported. Proceed at your own risk...
=================================================================================*/

// Variables
new g_iItemID, g_msgCurWeapon, g_msgSayText

// Arrays
new g_iHasChainsaw[33], g_iCurrentWeapon[33]

// Cvar Pointers
new cvar_enable, cvar_dmgmult, cvar_oneround, cvar_sounds, cvar_dmggore, cvar_dropflags,
cvar_pattack_rate, cvar_sattack_rate, cvar_pattack_recoil, cvar_sattack_recoil, cvar_body_xplode

// Flags
const DROPFLAG_NORMAL = 		(1<<0) // "a", with "drop" clcmd (pressing G by default)
const DROPFLAG_INDEATH =	(1<<1) // "b", death victim
const DROPFLAG_INFECTED =	(1<<2) // "c", user infected
const DROPFLAG_SURVHUMAN =	(1<<3) // "d", user become survivor

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

// Old Knife Sounds (DON'T CHANGE)
new const oldknife_sounds[][] =
{
	"weapons/knife_deploy1.wav",	// Deploy Sound
	"weapons/knife_hit1.wav",	// Hit 1
	"weapons/knife_hit2.wav",	// Hit 2
	"weapons/knife_hit3.wav",	// Hit 3
	"weapons/knife_hit4.wav",	// Hit 4
	"weapons/knife_hitwall1.wav",	// Hit Wall
	"weapons/knife_slash1.wav",	// Slash 1
	"weapons/knife_slash2.wav",	// Slash 2
	"weapons/knife_stab.wav"	// Stab
}

// Plug info.
#define PLUG_VERSION "0.9 KE"
#define PLUG_AUTH "meTaLiCroSS/Shidla"

/*================================================================================
 [Init and Precache]
=================================================================================*/

public plugin_init()
{
	// Plugin Register
	register_plugin("[ZP] Extra Item: Chainsaw", PLUG_VERSION, PLUG_AUTH)
	
	// Events	
	register_event("HLTV", "event_RoundStart", "a", "1=0", "2=0")
	register_event("CurWeapon", "event_CurWeapon", "b", "1=1")
	
	// Cvars
	cvar_enable = register_cvar("zp_chainsaw_enable", "1")
	cvar_sounds = register_cvar("zp_chainsaw_custom_sounds", "1")
	cvar_dmgmult = register_cvar("zp_chainsaw_damage_mult", "5.6")
	cvar_dmggore = register_cvar("zp_chainsaw_gore_in_damage", "1")
	cvar_oneround = register_cvar("zp_chainsaw_oneround", "0")
	cvar_dropflags = register_cvar("zp_chainsaw_drop_flags", "bcd")
	cvar_body_xplode = register_cvar("zp_chainsaw_victim_explode", "1")
	cvar_pattack_rate = register_cvar("zp_chainsaw_attack1_rate", "0.4")
	cvar_sattack_rate = register_cvar("zp_chainsaw_attack2_rate", "1.2")
	cvar_pattack_recoil = register_cvar("zp_chainsaw_attack1_recoil", "-5.6")
	cvar_sattack_recoil = register_cvar("zp_chainsaw_attack2_recoil", "-8.0")
	
	// Мои квары
	g_armor_amount = register_cvar("zp_armor_amount", "999")	// Сколько брони при покупке пилы
	g_armor_limit = register_cvar("zp_armor_limit", "999")				// Сколько максимум брони может быть
	g_hp_amount = register_cvar("zp_hp_amount", "2500")				// Сколько здоровья
		
	
	new szCvar[30]
	formatex(szCvar, charsmax(szCvar), "v%s by %s", PLUG_VERSION, PLUG_AUTH)
	register_cvar("zp_extra_chainsaw", szCvar, FCVAR_SERVER|FCVAR_SPONLY)
	
	// Fakemeta Forwards
	register_forward(FM_EmitSound, "fw_EmitSound")
	
	// Engine Forwards
	register_touch("cs_chainsaw", "player", "fw_Chainsaw_Touch")
	
	// Ham Forwards
	RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn_Post", 1)
	RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
	RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
	RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_knife", "fw_Knife_PrimaryAttack_Post", 1)
	RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_knife", "fw_Knife_SecondaryAttack_Post", 1)
	
	// Variables
	g_iItemID = zp_register_extra_item("\r[Testere]", chainsaw_ap_cost, ZP_TEAM_HUMAN)
	
	// Message ID's vars
	g_msgSayText = get_user_msgid("SayText")
	g_msgCurWeapon = get_user_msgid("CurWeapon")
	
	// Client Commands
	register_clcmd("drop", "clcmd_drop")
}

public plugin_precache()
{
	// Models
	precache_model(chainsaw_viewmodel)
	precache_model(chainsaw_playermodel)
	precache_model(chainsaw_worldmodel)
	
	// Sounds
	for(new i = 0; i < sizeof chainsaw_sounds; i++)
		precache_sound(chainsaw_sounds[i])
		
	precache_sound("items/gunpickup2.wav")
	precache_sound(g_sound_buyarmor)
}

/*================================================================================
 [Main Events]
=================================================================================*/

public event_RoundStart()
{
	// Remove chainsaws (entities)
	remove_entity_name("cs_chainsaw")
}

public event_CurWeapon(id)
{
	// Not alive...
	if(!is_user_alive(id))
		return PLUGIN_CONTINUE
		
	// Updating weapon array
	g_iCurrentWeapon[id] = read_data(2)
	
	// Check
	if(zp_get_user_zombie(id) || zp_get_user_survivor(id))
		return PLUGIN_CONTINUE
		
	// Has chainsaw and weapon is Knife
	if(!g_iHasChainsaw[id] || g_iCurrentWeapon[id] != CSW_KNIFE) 
		return PLUGIN_CONTINUE
		
	entity_set_string(id, EV_SZ_viewmodel, chainsaw_viewmodel)
	entity_set_string(id, EV_SZ_weaponmodel, chainsaw_playermodel)
		
	return PLUGIN_CONTINUE
}

/*================================================================================
 [Main Functions]
=================================================================================*/

public clcmd_drop(id)
{
	// Has Chainsaw		Weapon is Knife
	if(g_iHasChainsaw[id] && g_iCurrentWeapon[id] == CSW_KNIFE)
	{
		if(check_drop_flag(DROPFLAG_NORMAL))
		{
			drop_chainsaw(id)
			return PLUGIN_HANDLED
		}
	}
	
	return PLUGIN_CONTINUE
}

public drop_chainsaw(id) 
{
	// Get Aim and Origin
	static Float:flAim[3], Float:flOrigin[3]
	VelocityByAim(id, 64, flAim)
	entity_get_vector(id, EV_VEC_origin, flOrigin)
	
	// Changing Origin coords
	flOrigin[0] += flAim[0]
	flOrigin[1] += flAim[1]
	
	// Creating the Entity
	new iEnt = create_entity("info_target")
	
	// Classname
	entity_set_string(iEnt, EV_SZ_classname, "cs_chainsaw")
	
	// Origin
	entity_set_origin(iEnt, flOrigin)
	
	// Models
	entity_set_model(iEnt, chainsaw_worldmodel)
	
	// Size
	set_size(iEnt, chainsaw_mins, chainsaw_maxs)
	entity_set_vector(iEnt, EV_VEC_mins, chainsaw_mins)
	entity_set_vector(iEnt, EV_VEC_maxs, chainsaw_maxs)
	
	// Solid Type
	entity_set_int(iEnt, EV_INT_solid, SOLID_TRIGGER)
	
	// Movetype
	entity_set_int(iEnt, EV_INT_movetype, MOVETYPE_TOSS)
	
	// Var's
	g_iHasChainsaw[id] = false
	
	// Model bugfix
	reset_user_knife(id)
}

public reset_user_knife(id)
{
	// Execute weapon Deploy
	if(user_has_weapon(id, CSW_KNIFE))
		ExecuteHamB(Ham_Item_Deploy, find_ent_by_owner(-1, "weapon_knife", id))
		
	// Updating Model
	engclient_cmd(id, "weapon_knife")
	emessage_begin(MSG_ONE, g_msgCurWeapon, _, id)
	ewrite_byte(1) // active
	ewrite_byte(CSW_KNIFE) // weapon
	ewrite_byte(-1) // clip
	emessage_end()
}

/*================================================================================
 [ZombiePlague Forwards]
=================================================================================*/

public zp_extra_item_selected(id, itemid)
{
	if (itemid == g_iItemID)
	{
		// Check cvar
		if(get_pcvar_num(cvar_enable))
		{
			// Already has a Chainsaw
			if (g_iHasChainsaw[id])
			{
				zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + chainsaw_ap_cost)
				client_printcolor(id, "/g[ZP]/yZaten aldin /gTestere")
			}
			else 
			{
				// Boolean
				g_iHasChainsaw[id] = true
				
				// Emiting Sound
				emit_sound(id, CHAN_WEAPON, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)

				//Добавляем броник + HP + звук брони
				{
					set_pev(id, pev_armorvalue, float(min(pev(id, pev_armorvalue)+get_pcvar_num(g_armor_amount), get_pcvar_num(g_armor_limit))))		// встроенными средствами
					//fm_set_user_armor(id, get_pcvar_num(g_armor_amount))			// броня через fakemeta_util
					fm_set_user_health(id, get_pcvar_num(g_hp_amount))					// HP через fakemeta_util
					engfunc(EngFunc_EmitSound, id, CHAN_BODY, g_sound_buyarmor, 1.0, ATTN_NORM, 0, PITCH_NORM)
				}
				// Client Print
				client_printcolor(id, "/g[ZP]Testere /yAldin /g2500 /ySagligin /g999 /yArmorun var!!! ")
				
				// Change weapon to Knife
				reset_user_knife(id)
			}
		}
		// Isn't enabled...
		else
		{
			zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + chainsaw_ap_cost)
			client_printcolor(id, "/g[ZP]/y Chainsaw item has been disabled. /gContact Admin")
		}
	}
}

public zp_user_infected_pre(id, infector)
{
	// Drop in infection
	if (g_iHasChainsaw[id])
	{
		if(check_drop_flag(DROPFLAG_INFECTED))
			drop_chainsaw(id)
		else
		{
			g_iHasChainsaw[id] = false
			reset_user_knife(id)
		}
	}
}

public zp_user_humanized_post(id)
{
	// Is survivor
	if(zp_get_user_survivor(id) && g_iHasChainsaw[id])
	{
		if(check_drop_flag(DROPFLAG_SURVHUMAN))
			drop_chainsaw(id)
		else
		{
			g_iHasChainsaw[id] = false
			reset_user_knife(id)
		}
	}
}

/*================================================================================
 [Main Forwards]
=================================================================================*/

public client_putinserver(id)
{
	g_iHasChainsaw[id] = false
}

public client_disconnect(id)
{
	g_iHasChainsaw[id] = false
}
	
public fw_PlayerSpawn_Post(id)
{
	// Check Oneround Cvar and Strip all the Chainsaws
	if(get_pcvar_num(cvar_oneround) || !get_pcvar_num(cvar_enable))
	{
		// Has Chainsaw
		if(g_iHasChainsaw[id])
		{
			// Var's
			g_iHasChainsaw[id] = false

			// Update Knife
			reset_user_knife(id)
		}
	}
}

public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_bits)
{	
	// Check
	if(victim == attacker || !attacker)
		return HAM_IGNORED
		
	// Attacker is not a Player
	if(!is_user_connected(attacker))
		return HAM_IGNORED
		
	// Has chainsaw and Weapon is knife
	if(g_iHasChainsaw[attacker] && g_iCurrentWeapon[attacker] == CSW_KNIFE)
	{
		// Gore
		if(get_pcvar_num(cvar_dmggore))
			a_lot_of_blood(victim)
			
		// Damage mult.
		SetHamParamFloat(4, damage * get_pcvar_float(cvar_dmgmult))	

	}

	return HAM_IGNORED
}

public fw_PlayerKilled(victim, attacker, shouldgib)
{
	// Check
	if(victim == attacker || !attacker)
		return HAM_IGNORED
		
	// Attacker is not a Player
	if(!is_user_connected(attacker))
		return HAM_IGNORED
		
	// Attacker Has a Chainsaw
	if(g_iHasChainsaw[attacker] && g_iCurrentWeapon[attacker] == CSW_KNIFE && !zp_get_user_nemesis(victim) && get_pcvar_num(cvar_body_xplode))
		SetHamParamInteger(3, 2) // Body Explodes
	
	// Victim Has a Chainsaw
	if(g_iHasChainsaw[victim])
	{
		if(check_drop_flag(DROPFLAG_INDEATH))
			drop_chainsaw(victim)
		else
		{
			g_iHasChainsaw[victim] = false
			reset_user_knife(victim)
		}
	}
	
	return HAM_IGNORED
}

public fw_Chainsaw_Touch(saw, player)
{
	// Entities are not valid
	if(!is_valid_ent(saw) || !is_valid_ent(player))
		return PLUGIN_CONTINUE
		
	// Is a valid player?
	if(!is_user_connected(player))
		return PLUGIN_CONTINUE
		
	// Alive, Zombie or Survivor
	if(!is_user_alive(player) || zp_get_user_zombie(player) || zp_get_user_survivor(player) || g_iHasChainsaw[player])
		return PLUGIN_CONTINUE
		
	// Var's
	g_iHasChainsaw[player] = true
	
	// Emiting Sound
	emit_sound(player, CHAN_WEAPON, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
	
	// Knife Deploy
	reset_user_knife(player)
	
	// Remove dropped chainsaw
	remove_entity(saw)
		
	return PLUGIN_CONTINUE
}

public fw_EmitSound(id, channel, const sound[])
{
	// Non-player entity
	if(!is_user_connected(id))
		return FMRES_IGNORED
		
	// Not Alive / Zombie / Doesn't have a Chainsaw
	if(!is_user_alive(id) || zp_get_user_zombie(id) || zp_get_user_survivor(id) || !g_iHasChainsaw[id] || !get_pcvar_num(cvar_sounds))
		return FMRES_IGNORED
		
	// Check sound
	for(new i = 0; i < sizeof chainsaw_sounds; i++)
	{
		if(equal(sound, oldknife_sounds[i]))
		{
			// Emit New sound and Stop old Sound
			emit_sound(id, channel, chainsaw_sounds[i], 1.0, ATTN_NORM, 0, PITCH_NORM)
			return FMRES_SUPERCEDE
		}
	}
			
	return FMRES_IGNORED
}

public fw_Knife_PrimaryAttack_Post(knife)
{	
	// Get knife owner
	static id
	id = get_pdata_cbase(knife, m_pPlayer, 4)
	
	// has a Chainsaw
	if(is_user_connected(id) && g_iHasChainsaw[id])
	{
		// Get new fire rate
		static Float:flRate
		flRate = get_pcvar_float(cvar_pattack_rate)
		
		// Set new rates
		set_pdata_float(knife, m_flNextPrimaryAttack, flRate, 4)
		set_pdata_float(knife, m_flNextSecondaryAttack, flRate, 4)
		set_pdata_float(knife, m_flTimeWeaponIdle, flRate, 4)
		
		// Get new recoil
		static Float:flPunchAngle[3]
		flPunchAngle[0] = get_pcvar_float(cvar_pattack_recoil)
		
		// Punch their angles
		entity_set_vector(id, EV_VEC_punchangle, flPunchAngle)
		
	}
	
	return HAM_IGNORED
}

public fw_Knife_SecondaryAttack_Post(knife)
{	
	// Get knife owner
	static id
	id = get_pdata_cbase(knife, m_pPlayer, 4)
	
	// has a Chainsaw
	if(is_user_connected(id) && g_iHasChainsaw[id])
	{
		// Get new fire rate
		static Float:flRate
		flRate = get_pcvar_float(cvar_sattack_rate)
		
		// Set new rates
		set_pdata_float(knife, m_flNextPrimaryAttack, flRate, 4)
		set_pdata_float(knife, m_flNextSecondaryAttack, flRate, 4)
		set_pdata_float(knife, m_flTimeWeaponIdle, flRate, 4)
		
		// Get new recoil
		static Float:flPunchAngle[3]
		flPunchAngle[0] = get_pcvar_float(cvar_sattack_recoil)
		
		// Punch their angles
		entity_set_vector(id, EV_VEC_punchangle, flPunchAngle)
	}
	
	return HAM_IGNORED
}

/*================================================================================
 [Internal Functions]
=================================================================================*/

check_drop_flag(flag)
{
	new szFlags[10]
	get_pcvar_string(cvar_dropflags, szFlags, charsmax(szFlags))
	
	if(read_flags(szFlags) & flag)
		return true
		
	return false
}

a_lot_of_blood(id) // ROFL, thanks to jtp10181 for his AMX Ultimate Gore plugin.
{
	// Get user origin
	static iOrigin[3]
	get_user_origin(id, iOrigin)
	
	// Blood spray
	message_begin(MSG_PVS, SVC_TEMPENTITY, iOrigin)
	write_byte(TE_BLOODSTREAM)
	write_coord(iOrigin[0])
	write_coord(iOrigin[1])
	write_coord(iOrigin[2]+10)
	write_coord(random_num(-360, 360)) // x
	write_coord(random_num(-360, 360)) // y
	write_coord(-10) // z
	write_byte(70) // color
	write_byte(random_num(50, 100)) // speed
	message_end()
	
	// Write Small splash decal
	for (new j = 0; j < 4; j++) 
	{
		message_begin(MSG_PVS, SVC_TEMPENTITY, iOrigin)
		write_byte(TE_WORLDDECAL)
		write_coord(iOrigin[0]+random_num(-100, 100))
		write_coord(iOrigin[1]+random_num(-100, 100))
		write_coord(iOrigin[2]-36)
		write_byte(random_num(190, 197)) // index
		message_end()
	}
}

/*================================================================================
 [Stocks]
=================================================================================*/

stock client_printcolor(const id, const input[], any:...)
{
	new iCount = 1, iPlayers[32]
	
	static szMsg[191]
	vformat(szMsg, charsmax(szMsg), input, 3)
	
	replace_all(szMsg, 190, "/g", "^4") // green txt
	replace_all(szMsg, 190, "/y", "^1") // orange txt
	replace_all(szMsg, 190, "/ctr", "^3") // team txt
	replace_all(szMsg, 190, "/w", "^0") // team txt
	
	if(id) iPlayers[0] = id
	else get_players(iPlayers, iCount, "ch")
		
	for (new i = 0; i < iCount; i++)
	{
		if (is_user_connected(iPlayers[i]))
		{
			message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, iPlayers[i])
			write_byte(iPlayers[i])
			write_string(szMsg)
			message_end()
		}
	}
}
sma 2
zp_extra_nemesis

Код за потвърждение: Избери целия код

#include <amxmodx>
#include <zombieplague>
#include <dhudmessage>

#define PLUGIN "[ZP] Extra Item: Nemesis"
#define VERSION "0.2"
#define AUTHOR "fezh/Shidla/QuZ"

new g_nemesis
new g_msgSayText
new g_maxplayers

new pcvar_enabled, pcvar_cost, pcvar_hudtime

public plugin_init()
{
	register_plugin( PLUGIN, VERSION, AUTHOR )
	
	pcvar_enabled = register_cvar( "zp_nemesis_buy", "1" )
	pcvar_cost = register_cvar( "zp_nemesis_cost", "100" )
	pcvar_hudtime = register_cvar( "zp_nemesis_hudtime", "2.0" )
	
	g_nemesis = zp_register_extra_item( "Купить Босса", get_pcvar_num( pcvar_cost ) , ZP_TEAM_ANY )

	g_maxplayers = get_maxplayers()
	g_msgSayText = get_user_msgid( "SayText" )

	register_cvar( "zp_extra_nemesis", VERSION, FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY )
}

public zp_extra_item_selected( id, item )
{
	if( !get_pcvar_num( pcvar_enabled ) )
		return PLUGIN_HANDLED
	
	if( item == g_nemesis )
	{
	// Раскаментируйте строчки ниже, чтоб можно было покупать Немезиду только ДО начала раунда
//		if( zp_has_round_started() )
//		{
//			colored_print( id, "^x04[ZP]^x01 Нужно покупать Биг-Боса до начала раунда!" )
//			return ZP_PLUGIN_HANDLED
//		}

		zp_make_user_nemesis( id )

		colored_print( id, "^x04[ZP]^x01 Вы купили Биг-Боса!" )

		set_task( get_pcvar_float( pcvar_hudtime ), "nemesis_message", id )
	}
	return PLUGIN_HANDLED
}

public nemesis_message( id )
{
	new szName[ 32 ]
	get_user_name( id, szName, 31 )
	set_dhudmessage( 0, 255, 0, 0.05, 0.45, 1, 0.0, 5.0, 1.0, 1.0, -1 )
	show_dhudmessage( 0, "%s купил Биг-Боса!", szName )
}

stock colored_print( target, const message[],  any:... )
{
	static buffer[ 512 ]

	if( !target )
	{
		static player
		for( player = 1; player <= g_maxplayers; player++ )
		{
			if ( !is_user_connected( player ) )
				continue;
			
			vformat( buffer, charsmax( buffer ), message, 3 )
			
			message_begin( MSG_ONE_UNRELIABLE, g_msgSayText, _, player )
			write_byte( player )
			write_string( buffer )
			message_end()
		}
	}

	else
	{
		vformat( buffer, charsmax( buffer ), message, 3 )
		
		message_begin( MSG_ONE, g_msgSayText, _, target )
		write_byte( target )
		write_string( buffer )
		message_end()
	}
}
sma 3 zp_extra_res

Код за потвърждение: Избери целия код

#include < amxmodx >
#include < zombieplague > 
#include < amxmisc > 
#include < zp_buymenu > 
#include < fakemeta > 

new const PLUGIN_VERSION[ ]   =   "0.0.1";

const COST_SPAWN  =  4000;

new const SPAWN_SOUND[ ] = "zp/respawn.wav"

const KEYSMENU = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_6|MENU_KEY_7|MENU_KEY_8|MENU_KEY_9|MENU_KEY_0;

public plugin_init( ) 
{
	register_plugin( "[ ZP ] Buy Respawn NEW" , PLUGIN_VERSION , "Shurik07" );
	
	register_menu( "menu_res" , KEYSMENU , "respawn_menu" ); 
	
	register_clcmd( "say /res" , "open_menu" );
}

public plugin_precache( ) 
{
	precache_sound ( SPAWN_SOUND );
}	

public open_menu( pPlayer ) 
{
	if( !is_user_alive( pPlayer ) )
	{
		open_respawn_menu( pPlayer ) 
	}
	else
	{
		UTIL_ColorChat( pPlayer , "!g[ ZP ] !yYou are alive" ) 
	}
	
	return PLUGIN_HANDLED
}

public open_respawn_menu( pPlayer ) 
{
	static menu[ 1024 char ] , len 
	
	len = 0 
	
	new iMoney = zp_cs_get_user_money( pPlayer ) - COST_SPAWN 
	
	len += formatex( menu[ len ] , charsmax( menu ) - len , "Menu Respawn^n^nYour Money \r(\y%d$\r)^n\wCost respawn \r(\y%d$\r)^n\wMoney will be after respawn \r(\y%d$\r)^n" , zp_cs_get_user_money( pPlayer ) , COST_SPAWN , iMoney  ) 
	
	if( zp_cs_get_user_money( pPlayer ) < COST_SPAWN ) 
	{
		len += formatex( menu[ len ], charsmax( menu ) - len, "^n\d1. \dRespawn a Zombie(\rDon't have money\d)^n" ); 
		
		len += formatex( menu[ len ], charsmax( menu ) - len, "\d2. \dRespawn a Human(\rDon't have money\d)^n" ); 
	}
	else if( zp_is_nemesis_round( ) || zp_is_survivor_round( ) ) 
	{
		len += formatex( menu[ len ], charsmax( menu ) - len, "^n\d1. \dRespawn a Zombie(\rNot Round\d)^n" ); 
		
		len += formatex( menu[ len ], charsmax( menu ) - len, "\d2. \dRespawn a Human(\rNot Round\d)^n" ); 
	}
	else 
	{
		len += formatex( menu[ len ], charsmax( menu ) - len, "^n\r1. \wRespawn a Zombie^n" ); 
		
		len += formatex( menu[ len ], charsmax( menu ) - len, "\r2. \wRespawn a Human^n" ); 
	}
	
	len += formatex( menu[ len ], charsmax( menu ) - len, "^n\r0. \wExit" )
	
	set_pdata_int(pPlayer , 205, 0, 5)
	
	show_menu(pPlayer, KEYSMENU, menu, -1, "menu_res")
}

public respawn_menu( pPlayer , key ) 
{
	switch( key ) 
	{
		case 0: 
		{
			if( zp_cs_get_user_money( pPlayer ) < COST_SPAWN ) 
			{				
				UTIL_ColorChat( pPlayer , "!g[ ZP ] !yThere is no money, it is necessary !g%d$" , COST_SPAWN )
				
				open_respawn_menu( pPlayer ) 
				
				return PLUGIN_HANDLED
			}
			else if(  zp_is_nemesis_round( ) || zp_is_survivor_round( ) )
			{				
				UTIL_ColorChat( pPlayer , "!g[ ZP ] !yThis round is prohibited respawn" ) 
				
				open_respawn_menu( pPlayer ) 
			} 
			else
			{
				zp_cs_set_user_money( pPlayer, zp_cs_get_user_money( pPlayer ) - COST_SPAWN );
				
				zp_respawn_user( pPlayer , ZP_TEAM_ZOMBIE );
				
				new szName[ 32 ]
				get_user_name( pPlayer, szName, charsmax( szName ) );
				set_hudmessage( 255, 255, 0, 0.05, 0.45, 1, 0.0, 1.0, 1.0, 1.0, -1 );
				show_hudmessage( 0, "%s used Respawn", szName );
			}	
		}
		case 1:
		{
			if( zp_cs_get_user_money( pPlayer ) < COST_SPAWN ) 
			{				
				UTIL_ColorChat( pPlayer , "!g[ ZP ] !yThere is no money, it is necessary !g%d$" , COST_SPAWN )
				
				open_respawn_menu( pPlayer ) 
				
				return PLUGIN_HANDLED
			}
			else if(  zp_is_nemesis_round( ) || zp_is_survivor_round( ) )
			{				
				UTIL_ColorChat( pPlayer , "!g[ ZP ] !yThis round is prohibited respawn" ) 
				
				open_respawn_menu( pPlayer ) 
			}
			else
			{
				zp_cs_set_user_money( pPlayer, zp_cs_get_user_money( pPlayer ) - COST_SPAWN );
				
				zp_respawn_user( pPlayer , ZP_TEAM_HUMAN );
				
				new szName[ 32 ]
				get_user_name( pPlayer, szName, charsmax( szName ) );
				set_hudmessage( 255, 255, 0, 0.05, 0.45, 1, 0.0, 1.0, 1.0, 1.0, -1 );
				show_hudmessage( 0, "%s used Respawn", szName );

				client_cmd(0, "spk %s", SPAWN_SOUND ) 
			}	
		}
	}
	return PLUGIN_HANDLED
}
			
UTIL_ColorChat(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, "!team", "^3") // Team Color
	replace_all(msg, 190, "!team2", "^0") // Team2 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, get_user_msgid("SayText"), _, players[i])
				write_byte(players[i]);
				write_string(msg);
				message_end();
			}
		}
	}
}			
sma 4 solved ad sound nemesis buy

Код за потвърждение: Избери целия код

#include <amxmodx>
#include <zombieplague>
#include <dhudmessage>

#define PLUGIN "[ZP] Extra Item: Nemesis"
#define VERSION "0.2"
#define AUTHOR "fezh/Shidla/QuZ"

new g_nemesis
new g_msgSayText
new g_maxplayers

new pcvar_enabled, pcvar_cost, pcvar_hudtime

new const sound_nemesis[] = { "zombie_plague/nemesis1.wav" }

public plugin_init()
{
	register_plugin( PLUGIN, VERSION, AUTHOR )
	
	pcvar_enabled = register_cvar( "zp_nemesis_buy", "1" )
	pcvar_cost = register_cvar( "zp_nemesis_cost", "100" )
	pcvar_hudtime = register_cvar( "zp_nemesis_hudtime", "0.2" )
	
	g_nemesis = zp_register_extra_item( "Nemesis", get_pcvar_num( pcvar_cost ) , ZP_TEAM_ZOMBIE )

	g_maxplayers = get_maxplayers()
	g_msgSayText = get_user_msgid( "SayText" )

	register_cvar( "zp_extra_nemesis", VERSION, FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY )
}
public plugin_precache()
{
      precache_sound(sound_nemesis)
}
public zp_extra_item_selected( id, item )
{
	if( !get_pcvar_num( pcvar_enabled ) )
		return PLUGIN_HANDLED
	
	if( item == g_nemesis )
	{

		zp_make_user_nemesis( id )

		colored_print( id, "^x03 [ZP] ^x04[CSO Turkiye]^x03 Nemesis aldin!" )

		set_task( get_pcvar_float( pcvar_hudtime ), "nemesis_message", id )
	}
	return PLUGIN_HANDLED
}

public nemesis_message( id )
{
	new szName[ 32 ]
	get_user_name( id, szName, 31 )
	client_cmd(id, "spk %s", sound_nemesis)
	set_dhudmessage( 255, 0, 0, 0.05, 0.45, 1, 0.0, 5.0, 1.0, 1.0, -1 )
	show_dhudmessage( 0, "%s Nemesis satin aldi!", szName )
}

stock colored_print( target, const message[],  any:... )
{
	static buffer[ 512 ]

	if( !target )
	{
		static player
		for( player = 1; player <= g_maxplayers; player++ )
		{
			if ( !is_user_connected( player ) )
				continue;
			
			vformat( buffer, charsmax( buffer ), message, 1 )
			
			message_begin( MSG_ONE_UNRELIABLE, g_msgSayText, _, player )
			write_byte( player )
			write_string( buffer )
			message_end()
		}
	}

	else
	{
		vformat( buffer, charsmax( buffer ), message, 1 )
		
		message_begin( MSG_ONE, g_msgSayText, _, target )
		write_byte( target )
		write_string( buffer )
		message_end()
	}
}
Последно промяна от Kvothe на 18 Ное 2018, 01:09, променено общо 6 пъти.

Аватар
1fRaNkkK
Извън линия
Потребител
Потребител
Мнения: 776
Регистриран на: 09 Окт 2016, 15:21
Се отблагодари: 8 пъти
Получена благодарност: 55 пъти

I need editing my plugins

Мнение от 1fRaNkkK » 13 Ное 2018, 18:01

That is not a good title, please fix it.
Imagine if everyone wrote a title like 'I need someone to edit a plugin', 'I need plugin' and etc this forum would've been filled with unnecessary and repeatedly topics.

Аватар
Kvothe
Извън линия
Foreigner
Foreigner
Мнения: 33
Регистриран на: 12 Ное 2018, 22:36
Се отблагодари: 3 пъти

saw model change - only 1 respawn pls edit plugins

Мнение от Kvothe » 13 Ное 2018, 19:32

Ok sorry. You're right i change title

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 7206
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 117 пъти
Получена благодарност: 1295 пъти
Обратна връзка:

saw model change - only 1 respawn pls edit plugins

Мнение от OciXCrom » 14 Ное 2018, 14:22

1. I don't understand what you mean.

3.

Код за потвърждение: Избери целия код

#include < amxmodx >
#include < zombieplague > 
#include < amxmisc > 
#include < zp_buymenu > 
#include < fakemeta > 

new const PLUGIN_VERSION[ ]   =   "0.0.1";

const COST_SPAWN  =  4000;

new const SPAWN_SOUND[ ] = "zp/respawn.wav"

const KEYSMENU = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_6|MENU_KEY_7|MENU_KEY_8|MENU_KEY_9|MENU_KEY_0;

new bool:g_bRespawned[ 33 ];

public plugin_init( ) 
{
    register_plugin( "[ ZP ] Buy Respawn NEW" , PLUGIN_VERSION , "Shurik07" );

    register_logevent( "OnRoundStart", 2, "0=World triggered", "1=Round_Start" )
    
    register_menu( "menu_res" , KEYSMENU , "respawn_menu" ); 
    
    register_clcmd( "say /res" , "open_menu" );
}

public plugin_precache( ) 
{
    precache_sound ( SPAWN_SOUND );
}

public OnRoundStart( )
{
    arrayset( g_bRespawned, false, sizeof( g_bRespawned ) )
}

public open_menu( pPlayer ) 
{
    if ( g_bRespawned[ id ] )
    {
        UTIL_ColorChat( pPlayer, "!g[ ZP ] !yYou have already used this option this round." )
    }
    else if( !is_user_alive( pPlayer ) )
    {
        open_respawn_menu( pPlayer ) 
    }
    else
    {
        UTIL_ColorChat( pPlayer , "!g[ ZP ] !yYou are alive" ) 
    }
    
    return PLUGIN_HANDLED
}

public open_respawn_menu( pPlayer ) 
{
    static menu[ 1024 char ] , len 
    
    len = 0 
    
    new iMoney = zp_cs_get_user_money( pPlayer ) - COST_SPAWN 
    
    len += formatex( menu[ len ] , charsmax( menu ) - len , "Menu Respawn^n^nYour Money \r(\y%d$\r)^n\wCost respawn \r(\y%d$\r)^n\wMoney will be after respawn \r(\y%d$\r)^n" , zp_cs_get_user_money( pPlayer ) , COST_SPAWN , iMoney  ) 
    
    if( zp_cs_get_user_money( pPlayer ) < COST_SPAWN ) 
    {
        len += formatex( menu[ len ], charsmax( menu ) - len, "^n\d1. \dRespawn a Zombie(\rDon't have money\d)^n" ); 
        
        len += formatex( menu[ len ], charsmax( menu ) - len, "\d2. \dRespawn a Human(\rDon't have money\d)^n" ); 
    }
    else if( zp_is_nemesis_round( ) || zp_is_survivor_round( ) ) 
    {
        len += formatex( menu[ len ], charsmax( menu ) - len, "^n\d1. \dRespawn a Zombie(\rNot Round\d)^n" ); 
        
        len += formatex( menu[ len ], charsmax( menu ) - len, "\d2. \dRespawn a Human(\rNot Round\d)^n" ); 
    }
    else 
    {
        len += formatex( menu[ len ], charsmax( menu ) - len, "^n\r1. \wRespawn a Zombie^n" ); 
        
        len += formatex( menu[ len ], charsmax( menu ) - len, "\r2. \wRespawn a Human^n" ); 
    }
    
    len += formatex( menu[ len ], charsmax( menu ) - len, "^n\r0. \wExit" )
    
    set_pdata_int(pPlayer , 205, 0, 5)
    
    show_menu(pPlayer, KEYSMENU, menu, -1, "menu_res")
}

public respawn_menu( pPlayer , key ) 
{
    switch( key ) 
    {
        case 0: 
        {
            if( zp_cs_get_user_money( pPlayer ) < COST_SPAWN ) 
            {               
                UTIL_ColorChat( pPlayer , "!g[ ZP ] !yThere is no money, it is necessary !g%d$" , COST_SPAWN )
                
                open_respawn_menu( pPlayer ) 
                
                return PLUGIN_HANDLED
            }
            else if(  zp_is_nemesis_round( ) || zp_is_survivor_round( ) )
            {               
                UTIL_ColorChat( pPlayer , "!g[ ZP ] !yThis round is prohibited respawn" ) 
                
                open_respawn_menu( pPlayer ) 
            } 
            else
            {
                zp_cs_set_user_money( pPlayer, zp_cs_get_user_money( pPlayer ) - COST_SPAWN );
                
                zp_respawn_user( pPlayer , ZP_TEAM_ZOMBIE );
                
                new szName[ 32 ]
                get_user_name( pPlayer, szName, charsmax( szName ) );
                set_hudmessage( 255, 255, 0, 0.05, 0.45, 1, 0.0, 1.0, 1.0, 1.0, -1 );
                show_hudmessage( 0, "%s used Respawn", szName );
            }   
        }
        case 1:
        {
            if( zp_cs_get_user_money( pPlayer ) < COST_SPAWN ) 
            {               
                UTIL_ColorChat( pPlayer , "!g[ ZP ] !yThere is no money, it is necessary !g%d$" , COST_SPAWN )
                
                open_respawn_menu( pPlayer ) 
                
                return PLUGIN_HANDLED
            }
            else if(  zp_is_nemesis_round( ) || zp_is_survivor_round( ) )
            {               
                UTIL_ColorChat( pPlayer , "!g[ ZP ] !yThis round is prohibited respawn" ) 
                
                open_respawn_menu( pPlayer ) 
            }
            else
            {
                zp_cs_set_user_money( pPlayer, zp_cs_get_user_money( pPlayer ) - COST_SPAWN );
                
                zp_respawn_user( pPlayer , ZP_TEAM_HUMAN );
                
                new szName[ 32 ]
                get_user_name( pPlayer, szName, charsmax( szName ) );
                set_hudmessage( 255, 255, 0, 0.05, 0.45, 1, 0.0, 1.0, 1.0, 1.0, -1 );
                show_hudmessage( 0, "%s used Respawn", szName );

                client_cmd(0, "spk %s", SPAWN_SOUND ) 
            }   
        }
    }
    return PLUGIN_HANDLED
}
            
UTIL_ColorChat(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, "!team", "^3") // Team Color
    replace_all(msg, 190, "!team2", "^0") // Team2 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, get_user_msgid("SayText"), _, players[i])
                write_byte(players[i]);
                write_string(msg);
                message_end();
            }
        }
    }
}           

Аватар
Kvothe
Извън линия
Foreigner
Foreigner
Мнения: 33
Регистриран на: 12 Ное 2018, 22:36
Се отблагодари: 3 пъти

saw model change - only 1 respawn pls edit plugins

Мнение от Kvothe » 14 Ное 2018, 16:19

uncompleted Line<40> : error 017 : undefined sembol ''id''
İ try change [ id ] ---> [ pPlayer ] = working but again unlimited respawn
İ try change [ id ] ---> [ 0 ] = working but again unlimited respawn
İ try change [ id ] ---> [ 1 ] = working but again unlimited respawn

and
1- Anyone buy extra item chainsaw. Auto change human model ( normal player model sas.mdl , normal player buy chainsaw change model '' davildblack.mdl'' )
and. Zp 5.0.8 main system ==> new round all player starting 100hp. İ want chainsaw player no hp reset.

Аватар
Kvothe
Извън линия
Foreigner
Foreigner
Мнения: 33
Регистриран на: 12 Ное 2018, 22:36
Се отблагодари: 3 пъти

saw model change - only 1 respawn pls edit plugins

Мнение от Kvothe » 16 Ное 2018, 20:13

МНЕНИЕТО Е СКРИТО ОТ СТРАНА НА МОДЕРАТОР! ЦЪКНИ ВЪРХУ ЛЕНТАТА ЗА ДА ГО ПРЕГЛЕДАШ.
Последно промяна от 1fRaNkkK на 16 Ное 2018, 21:27, променено общо 2 пъти.
Причина: Use the bump button (or edit), if you don't see it you can't use it and bumping your topic with new posts is against the rules! Please read the rules and be careful next time.

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 7206
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 117 пъти
Получена благодарност: 1295 пъти
Обратна връзка:

saw model change - only 1 respawn pls edit plugins

Мнение от OciXCrom » 17 Ное 2018, 21:30

Attach your zp_buymenu.inc file.

Аватар
Kvothe
Извън линия
Foreigner
Foreigner
Мнения: 33
Регистриран на: 12 Ное 2018, 22:36
Се отблагодари: 3 пъти

saw model change - only 1 respawn pls edit plugins

Мнение от Kvothe » 18 Ное 2018, 01:02

only 1 left
1- Chainsaw models & hp
models : Anyone bought chainsaw auto change models '' sas.mdl ''
hp : Chainsaw is 2500 hp& 999 armor but new round all player reset hp 100 ( zp 5.0.8 hp system )
I don't want to delete chainsaw player hp


3 - solved

zp_extra_res ( only 1 buy )

Код за потвърждение: Избери целия код

#include < amxmodx >
#include < zombieplague > 
#include < amxmisc > 
#include < zp_buymenu > 
#include < fakemeta > 

new const PLUGIN_VERSION[ ]   =   "0.0.1";

const COST_SPAWN  =  4000;

new const SPAWN_SOUND[ ] = "zp/respawn.wav"

const KEYSMENU = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_6|MENU_KEY_7|MENU_KEY_8|MENU_KEY_9|MENU_KEY_0;

new used[33];
public plugin_init( ) 
{
	register_plugin( "[ ZP ] Buy Respawn NEW" , PLUGIN_VERSION , "Shurik07" );
	register_menu( "menu_res" , KEYSMENU , "respawn_menu" ); 
	register_clcmd( "res" , "open_menu" );
	register_event("HLTV", "round_start", "a", "1=0", "2=0")
}

public round_start()
{
	for( new id; id<=32; id++)
	used[id] = false
}

public plugin_precache( ) 
{
	precache_sound ( SPAWN_SOUND );
}	

public open_menu( pPlayer ) 
{
	if( !is_user_alive( pPlayer ) )
	{
		open_respawn_menu( pPlayer ) 
	}
	else
	{
		UTIL_ColorChat( pPlayer , "!g[ ZP ] !yYou are alive" ) 
	}
	return PLUGIN_HANDLED
}

public open_respawn_menu( pPlayer ) 
{
	static menu[ 1024 char ] , len 
	len = 0 
	new iMoney = zp_cs_get_user_money( pPlayer ) - COST_SPAWN 
	len += formatex( menu[ len ] , charsmax( menu ) - len , "Menu Respawn^n^nYour Money \r(\y%d$\r)^n\wCost respawn \r(\y%d$\r)^n\wMoney will be after respawn \r(\y%d$\r)^n" , zp_cs_get_user_money( pPlayer ) , COST_SPAWN , iMoney  ) 
	if( zp_cs_get_user_money( pPlayer ) < COST_SPAWN ) 
	{
		len += formatex( menu[ len ], charsmax( menu ) - len, "^n\d1. \dRespawn a Zombie(\rDon't have money\d)^n" ); 
		
		len += formatex( menu[ len ], charsmax( menu ) - len, "\d2. \dRespawn a Human(\rDon't have money\d)^n" ); 
	}
	else if( zp_is_nemesis_round( ) || zp_is_survivor_round( ) ) 
	{
		len += formatex( menu[ len ], charsmax( menu ) - len, "^n\d1. \dRespawn a Zombie(\rNot Round\d)^n" ); 
		
		len += formatex( menu[ len ], charsmax( menu ) - len, "\d2. \dRespawn a Human(\rNot Round\d)^n" ); 
	}
	else 
	{
		len += formatex( menu[ len ], charsmax( menu ) - len, "^n\r1. \wRespawn a Zombie^n" ); 
		
		len += formatex( menu[ len ], charsmax( menu ) - len, "\r2. \wRespawn a Human^n" ); 
	}
	
	len += formatex( menu[ len ], charsmax( menu ) - len, "^n\r0. \wExit" )
	
	set_pdata_int(pPlayer , 205, 0, 5)
	
	show_menu(pPlayer, KEYSMENU, menu, -1, "menu_res")
}

public respawn_menu( pPlayer , key ) 
{
	switch( key ) 
	{
		case 0: 
		{
			if( zp_cs_get_user_money( pPlayer ) < COST_SPAWN ) 
			{				
				UTIL_ColorChat( pPlayer , "!g[ ZP ] !yThere is no money, it is necessary !g%d$" , COST_SPAWN )
				open_respawn_menu( pPlayer ) 
				
				return PLUGIN_HANDLED
			}
			else if(  zp_is_nemesis_round( ) || zp_is_survivor_round( ) )
			{				
				UTIL_ColorChat( pPlayer , "!g[ ZP ] !yThis round is prohibited respawn" ) 
				open_respawn_menu( pPlayer ) 
			} 
			else if(used[pPlayer])
			{				
				UTIL_ColorChat( pPlayer , "!g[ ZP ] !yYou bought this once.")
				
				open_respawn_menu( pPlayer ) 
				return PLUGIN_HANDLED;
			}
			else
			{
				zp_cs_set_user_money( pPlayer, zp_cs_get_user_money( pPlayer ) - COST_SPAWN );
				
				zp_respawn_user( pPlayer , ZP_TEAM_ZOMBIE );
				
				new szName[ 32 ]
				get_user_name( pPlayer, szName, charsmax( szName ) );
				set_hudmessage( 255, 255, 0, 0.05, 0.45, 1, 0.0, 1.0, 1.0, 1.0, -1 );
				show_hudmessage( 0, "%s used Respawn", szName );
				used[pPlayer] = true
			}	
		}
		case 1:
		{
			if( zp_cs_get_user_money( pPlayer ) < COST_SPAWN ) 
			{				
				UTIL_ColorChat( pPlayer , "!g[ ZP ] !yThere is no money, it is necessary !g%d$" , COST_SPAWN )
				
				open_respawn_menu( pPlayer ) 
				
				return PLUGIN_HANDLED
			}
			else if(  zp_is_nemesis_round( ) || zp_is_survivor_round( ) )
			{				
				UTIL_ColorChat( pPlayer , "!g[ ZP ] !yThis round is prohibited respawn" ) 
				
				open_respawn_menu( pPlayer ) 
			}
			else if(used[pPlayer])
			{				
				UTIL_ColorChat( pPlayer , "!g[ ZP ] !yYou bought this once.")
				open_respawn_menu( pPlayer ) 
				return PLUGIN_HANDLED;
			}
			else
			{
				zp_cs_set_user_money( pPlayer, zp_cs_get_user_money( pPlayer ) - COST_SPAWN );
				
				zp_respawn_user( pPlayer , ZP_TEAM_HUMAN );
				
				new szName[ 32 ]
				get_user_name( pPlayer, szName, charsmax( szName ) );
				set_hudmessage( 255, 255, 0, 0.05, 0.45, 1, 0.0, 1.0, 1.0, 1.0, -1 );
				show_hudmessage( 0, "%s used Respawn", szName );
				
				client_cmd(0, "spk %s", SPAWN_SOUND ) 
				used[pPlayer] = true
			}	
		}
	}
	return PLUGIN_HANDLED
}

UTIL_ColorChat(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, "!team", "^3") // Team Color
replace_all(msg, 190, "!team2", "^0") // Team2 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, get_user_msgid("SayText"), _, players[i])
		write_byte(players[i]);
		write_string(msg);
		message_end();
	}
}
}
}			

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 7206
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 117 пъти
Получена благодарност: 1295 пъти
Обратна връзка:

saw model change - only 1 respawn pls edit plugins

Мнение от OciXCrom » 18 Ное 2018, 14:51

Why did you post the same plugin after I edited it for you? I don't understand what you want to do.

Аватар
Kvothe
Извън линия
Foreigner
Foreigner
Мнения: 33
Регистриран на: 12 Ное 2018, 22:36
Се отблагодари: 3 пъти

saw model change - only 1 respawn pls edit plugins

Мнение от Kvothe » 18 Ное 2018, 23:52

Yours was wrong. i corrected someone else.
Your sma is error 17 : undifined symbol '' id '' compile failed.
anyway thanks your help.

Публикувай отговор
  • Подобни теми
    Отговори
    Преглеждания
     Последно мнение

Обратно към “Заявки за плъгини”

Кой е на линия

Потребители разглеждащи този форум: Bing [Bot], Google [Bot] и 8 госта