- Article
- 2018-12-22
Начнём с того, что мы скачаем любой плагин оружия для Zombie Plague 4.3 (и выше).
У меня будет на примере оружие Petrol Boomer от Dias'a. Скачать плагин можно от сюда: https://tb-team.com/counter-strike/zombie-plague/extra_items/971-zp-extra-item-petrol-boomer.html.
Для того, чтобы сделать натив, нам нужна функция выдачи оружия, а так как оружие для Zombie Plague 4.3, значит оно автоматически будет добавляться в Extra-Items. Это нам упростит задачу.
1. Ищем функцию zp_extra_item_selected
public zp_extra_item_selected(id, itemid)
{
if(itemid == g_pet) Get_PB(id)
}
2. Видим что после проверки на itemid идёт функция выдачи оружия: Get_PB(id)
3. Создаём натив
public plugin_natives()
{
register_native("zp_give_user_petrolboomer", "Get_PB", 1);
}
Где zp_give_user_petrolboomer - это наш натив будет в сторонних плагинах
Где Get_PB - это название функции выдачи оружия
Однако, бывает так, что оружия выдаются не через отдельную функцию, а сразу же в zp_extra_item_selected написан весь код выдачи оружия. Наглядный вариант мы видим здесь: https://tb-team.com/counter-strike/zombie-plague/extra_items/538-zp-extra-item-m4a1-frost.html
1. Ищем также zp_extra_item_selected
public zp_extra_item_selected(player, itemid)
{
if (itemid == g_iItemID)
{
g_bHasFrostM4A1[player] = true
ham_strip_weapon(player, "weapon_m4a1")
give_item(player, "weapon_m4a1")
cs_set_user_bpammo(player, CSW_M4A1, 90)
new sName[32]
get_user_name(player, sName, 31)
set_hudmessage(random(255), random(255), random(255), -1.0, 0.17, 1, 0.0, 5.0, 1.0, 1.0, -1)
show_hudmessage(0, "%s Купил Frost M4A1!", sName)
ColorPrint(player, "^1[^4Zombie-Amxx.Ru^1] ^3Вы купили Frost M4A1^1!")
}
}
2. Всё что идёт после if (itemid == g_iItemID) можно копировать, а именно этот код
g_bHasFrostM4A1[player] = true
ham_strip_weapon(player, "weapon_m4a1")
give_item(player, "weapon_m4a1")
cs_set_user_bpammo(player, CSW_M4A1, 90)
new sName[32]
get_user_name(player, sName, 31)
set_hudmessage(random(255), random(255), random(255), -1.0, 0.17, 1, 0.0, 5.0, 1.0, 1.0, -1)
show_hudmessage(0, "%s Купил Frost M4A1!", sName)
ColorPrint(player, "^1[^4Zombie-Amxx.Ru^1] ^3Вы купили Frost M4A1^1!")
3. Создаём функцию для выдачи данного оружия. У меня же это будет
public give_frost_m4(player)
Прошу заметить, что я указал player для индекса игрока, так как в выдаче оружия было указано player, а не id / iPlayer и тому подобное.
4. Вписываем в функцию то, что мы скопировали
public give_frost_m4(player)
{
g_bHasFrostM4A1[player] = true
ham_strip_weapon(player, "weapon_m4a1")
give_item(player, "weapon_m4a1")
cs_set_user_bpammo(player, CSW_M4A1, 90)
new sName[32]
get_user_name(player, sName, 31)
set_hudmessage(random(255), random(255), random(255), -1.0, 0.17, 1, 0.0, 5.0, 1.0, 1.0, -1)
show_hudmessage(0, "%s Купил Frost M4A1!", sName)
ColorPrint(player, "^1[^4Zombie-Amxx.Ru^1] ^3Вы купили Frost M4A1^1!")
}
5. Ну и теперь создаём сам натив
public plugin_natives()
{
register_native("zp_give_user_frostm4", "give_frost_m4", 1);
}
Ну и теперь нам осталось добавить данные нативы например в VIP меню.
1.Открываем VIP меню и в начале плагина, вписываем данный код
native zp_give_user_petrolboomer(iPlayer);
native zp_give_user_frostm4(iPlayer);
2. Ну и идём туда, где вы будете выдавать само оружие и прописываете один из нужных вам нативов. Обязательно с указанием правильного индекса игрока.
Donate you can do to the author xUnicorn, a gift in the form of a donation to his electronic piggy bank ;)
%25
Discount on all purchases
builds until September 16, 2024
Especially for you - Гость

Buy an assembly

[CS 1.6] Model Zombie - Purple Galaxy Revenant
cool skin ,i luv it

Готовый сервер «CSDM Legendary + Пушки Лазеры» для CS 1.6
у вас есть дискорд?

Готовый сервер «CSDM Legendary + Пушки Лазеры» для CS 1.6
здравейте, искам да купя тези красиви плагини, но пълна версия, но на английски език, моля, свържете се със собственика

Готовый сервер «CSDM Legendary + Пушки Лазеры» для CS 1.6
@tb_bader здравейте, искам да купя тези красиви плагини, но пълна версия, но на английски език, моля, свържете се с собственика

(Обновление) Counter-Strike Nexon: Zombies от (20 июня 2018)
Its not downloadable , Its Just a Post about Counter Strike Nexon Zombie Update
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 is a Metamod add-on that allows you to create new modifications for Half-Life in the Pawn language
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 is a Metamod plugin that allows voice chat between non-steam and steam clients.
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 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 - 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 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"".
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".