[ZP] Как сделать взятие зомби по уровню в CS 1.6?
[ZP] Как сделать взятие зомби по уровню в CS 1.6?

Приветствую пользователей портала tb-team.com, здесь я не давно видел от @Dambas не совсем удобную статью, где он рассказывает про проверки для зомби.Короче говоря, в данной статье я вам расскажу самый просто способ, как сделать выдачу зомби класса по уровню, или как сделать выбор зомби классов по левалу.

1. В самое начала исходника вставляем натив:
native ils_get_user_level(id)

2. Теперь нам нужно найти ID нашего зомби классы, для этого находи функцию:
public plugin_precache()

и обычно первая переменная это ID нашего класса (например)

Как сделать зомби по уровню CS 1.6

В моем случаи g_zclass_smoker, у вас он будет другой, запоминаем его и едем дальше!

3.Создаем функцию и вставляем ее ниже public plugin_precache:
public zp_user_infected_pre(id)
{
if(!(ils_get_user_level(id) > 29))
{
if(zp_get_user_next_class(id) == g_zclass_smoker)
{
zp_set_user_zombie_class(id, 0)
}
}
}

1.1 Где красным, это ID вашего зомби класса, Вам нужно данную переменную заменить на свой ID который мы получили в пункте номер 2.
1.2 Где зеленым, Отчет по уровню идет с 0, делаем выводы, если хотите что бы класс выдавался с 30 уровня, указываете в функции 29.
1.3 Где оранжевым, это натив в нашей лвл системе, если вы использовать свою LVL систему, то меняйте на свои нативы!

4.Готово

(Bonus) Так-же если вы хотите отправлять сообщение клиенту в чат, то можете использовать данный код:
public zp_user_infected_pre(id) 
{ 
if(!(zp_level(id) > 14)) 
{ 
if(zp_get_user_next_class(id) == g_zclass_smoker) 
{ 
zp_set_user_zombie_class(id, 0) 
ChatColor(id, "!y[!teamZP!y] !yДанный зомби класс доступен - !gс 15 уровня!")
} 
} 
}

Сток:
stock ChatColor(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
	
	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();
			}
		}
	}
}

Автор статьи:
IonGames2711/tb_bader
Данная LVL системка

You do not have access to download files from our server

Hello, our administration publishes only cannon content, put like under the post below and write the best comment, we are preparing material just for you, Darling Гость.

Comments 2
Информация
Посетители, находящиеся в группе Guests, не могут оставлять комментарии к данной публикации.
Foundation for your build
ReHLDS 3.4.0.654

ReHLDS (Reverse-engineered) - this is a new step forward that gives a second wind to our servers. ReHLDS works 2 times faster than HLDS.

AmxModx 1.8.3

AMXModX is a Metamod add-on that allows you to create new modifications for Half-Life in the Pawn language

Reunion 0.1.92

Reunion is a continuation of Dproto for ReHLDS. This is a metamod plugin that allows you to log into the 47/48 Non-Steam server.

Revoice 0.1.0.32

Revoice is a Metamod plugin that allows voice chat between non-steam and steam clients.

Metamod-r 1.3.0.127

The new Metamod-r contains a huge number of performance optimizations and much cleaner code. The kernel was written using a JIT compiler.

Ultimate Unprecacher 1.1

Ultimate Unprecacher is a plugin for MetaMod, it works on the principle of disabling unnecessary resources on your server, thereby you can free up space for resources for your plugins, using this module you can get rid of error 512!

ReAuthCheck 0.1.6

ReAuthCheck - this is a Metamod plugin that checks your players for validity, with this module for REHLDS you can protect your server from bots that constantly spam ads or simply clog up a slot on the server!

NetBufExtender (NBEX) 1.0

NetBufExtender or NBEX - This is a metamod plugin that expands the пїЅInternet bufferпїЅ: server and client buffers (not 100% guaranteed). Expands up to 64 kb. This means that players are less likely to be kicked with the error "Reliable channel overflowed"".

UserInfoNetOptimizer (UINO) 1.0

UINO пїЅ metamod plugin that allows you to remove unnecessary fields from userinfo(setinfo) when the engine passes it to other players on the server. This measure reduces the amount of data transferred and slightly reduces the chance of being kicked with "Reliable channel overflowed".

Information

Welcome to TB-TEAM.COM!

Welcome To Our New Website For CS1.6 Resources!.
Register
Create your own account!

Register Now!
Login
Already registered? Come on, log in quickly!

Login to the site