[ZP] Extra Item: Jump Bomb

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
418
Реакции
-7
Предупреждения
8
Ошибка
-
ОС
Windows
Amx Mod X
1.9.0
Билд
Protocol version 48
Exe version 1.1.2.6 (cstrike)
Exe build: 16:05:41 Jun 15 2009 (4554)
ReGamedll
-
Версия Metamod
1.21p
Список метамодулей
Currently loaded plugins:
description stat pend file vers src load unlod
[ 1] AMX Mod X RUN - amxmodx_mm.dll v1.9.0-d ini Start ANY
[ 2] POD-Bot mm RUN - podbot_mm.dll v3.0B20b ini Chlvl ANY
[ 3] Print Center Fi RUN - printcenterfix_m v2.0.1 ini ANY ANY
[ 4] Ultimate Unprec RUN - ultimate_unpreca v0.3 Alp ini ANY ANY
[ 5] CStrike RUN - cstrike_amxx.dll v1.9.0.5 pl1 ANY ANY
[ 6] Fun RUN - fun_amxx.dll v1.9.0-d pl1 ANY ANY
[ 7] FakeMeta RUN - fakemeta_amxx.dl v1.9.0-d pl1 ANY ANY
[ 8] Engine RUN - engine_amxx.dll v1.9.0-d pl1 ANY ANY
[ 9] Ham Sandwich RUN - hamsandwich_amxx v1.9.0-d pl1 ANY ANY
9 plugins, 9 running
Список плагинов
Currently loaded plugins:
name version author file status
[ 1] Admin Base 1.9.0-dev+ AMXX Dev Team admin.amxx running
[ 2] Admin Commands 1.9.0-dev+ AMXX Dev Team admincmd.amxx running
[ 3] Admin Help 1.9.0-dev+ AMXX Dev Team adminhelp.amxx running
[ 4] Slots Reservation 1.9.0-dev+ AMXX Dev Team adminslots.amxx running
[ 5] Multi-Lingual System 1.9.0-dev+ AMXX Dev Team multilingual.am running
[ 6] Menus Front-End 1.9.0-dev+ AMXX Dev Team menufront.amxx running
[ 7] Commands Menu 1.9.0-dev+ AMXX Dev Team cmdmenu.amxx running
[ 8] Players Menu 1.9.0-dev+ AMXX Dev Team plmenu.amxx running
[ 9] Maps Menu 1.9.0-dev+ AMXX Dev Team mapsmenu.amxx running
[ 10] Plugin Menu 1.9.0-dev+ AMXX Dev Team pluginmenu.amxx running
[ 11] Admin Chat 1.9.0-dev+ AMXX Dev Team adminchat.amxx running
[ 12] Anti Flood 1.9.0-dev+ AMXX Dev Team antiflood.amxx running
[ 13] Scrolling Message 1.9.0-dev+ AMXX Dev Team scrollmsg.amxx running
[ 14] Info. Messages 1.9.0-dev+ AMXX Dev Team imessage.amxx running
[ 15] Admin Votes 1.9.0-dev+ AMXX Dev Team adminvote.amxx running
[ 16] NextMap 1.9.0-dev+ AMXX Dev Team nextmap.amxx running
[ 17] Nextmap Chooser 1.9.0-dev+ AMXX Dev Team mapchooser.amxx running
[ 18] TimeLeft 1.9.0-dev+ AMXX Dev Team timeleft.amxx running
[ 19] Pause Plugins 1.9.0-dev+ AMXX Dev Team pausecfg.amxx running
[ 20] Stats Configuration 1.9.0-dev+ AMXX Dev Team statscfg.amxx running
[ 21] POD-Bot Menu 1.3 g4s|figurE.09 amxx_podbotmenu running
[ 22] menu privilegij enu privil nu privilegij menu_privilegij running
[ 23] moi kobinet oi kobinet i kobinet my_kabinet.amxx running
[ 24] Camera Changer 1.3 Bl0ck Camera_Changer. running
[ 25] Admin Prefixes 3.0 m0skVi4a ;] AdminPrefixes.a running
[ 26] [AMXX] Admin Gift 02.01.2018 Number One AdminRight.amxx running
[ 27] NadeModes 11.2 Nomexous & OT nademodes.amxx running
[ 28] KH_HEALTH 1.0 Kulogram KH_Health.amxx running
[ 29] [ZP] Addon: Menu Selec 1.0 Universe & BuB9n creator_give_we running
[ 30] Precache Management 1.0.0 ConnorMcLeod precache_manage stopped
[ 31] Extra Precacher 1.0 Alka extra_precacher running
[ 32] [ZP] Core/Engine 5.0.8 ZP Dev Team zp50_core.amxx running
[ 33] [AMXX] External Settin 0.1 WiLS amx_settings_ap running
[ 34] [CS] Player Models API 1.2 WiLS cs_player_model running
[ 35] [CS] Teams API 1.2 WiLS cs_teams_api.am running
[ 36] [CS] MaxSpeed API 1.0 WiLS cs_maxspeed_api running
[ 37] [CS] Weapon Models API 1.1 WiLS cs_weap_models_ running
[ 38] [CS] Weapons Restrict 0.4 WiLS cs_weap_restric running
[ 39] [CS] Ham Hooks for Bot 1.0 WiLS cs_ham_bots_api running
[ 40] [ZP] Class: Zombie 5.0.8 ZP Dev Team zp50_class_zomb running
[ 41] [ZP] Class: Human 5.0.8 ZP Dev Team zp50_class_huma running
[ 42] [ZP] Class: Nemesis 5.0.8 ZP Dev Team zp50_class_neme running
[ 43] [ZP] Class: Survivor 5.0.8 ZP Dev Team zp50_class_surv running
[ 44] [ZP] Class: Zombie: Cl 5.0.8 ZP Dev Team zp50_class_zomb running
[ 45] [CSO:Hunter Zombie] 1.2 HoRRoR/tERoR edi zp50_class_chin running
[ 46] NST Zombie Class Heal 1.0 NST zp50_class_sham running
[ 47] [ZP] Wallclimb 1.0 WallClimb by Pyt zp50_class_skal running
[ 48] [ZP] Zombie Class: Dra 0.1 =), LARS-BLOODLI zp50_class_reve running
[ 49] [ZP] Zombie Class: Rev 1.0 =), LARS-BLOODLI zp50_class_reve running
[ 50] [ZP] Zombie Class: Poi 0.1 =), LARS-BLOODLI zp50_class_reve running
[ 51] [ZP] Class: Human: Cla 5.0.8 ZP Dev Team zp50_class_huma running
[ 52] [ZP] Human Armor 5.0.8 ZP Dev Team zp50_human_armo running
[ 53] [ZP] Game Modes Manage 5.0.8 ZP Dev Team zp50_gamemodes. running
[ 54] [ZP] Game Mode: Infect 5.0.8 ZP Dev Team zp50_gamemode_i paused
[ 55] [ZP] Game Mode: Multip 5.0.8 ZP Dev Team zp50_gamemode_m paused
[ 56] [ZP] Game Mode: Swarm 5.0.8 ZP Dev Team zp50_gamemode_s paused
[ 57] [ZP] Game Mode: Nemesi 5.0.8 ZP Dev Team zp50_gamemode_n paused
[ 58] [ZP] Game Mode: Surviv 5.0.8 ZP Dev Team zp50_gamemode_s paused
[ 59] [ZP] Game Mode: Plague 5.0.8 ZP Dev Team zp50_gamemode_p paused
[ 60] [ZP] Game Mode: Armage 5.0.8 ZP Dev Team zp50_gamemode_a paused
[ 61] [ZP] Items Manager 5.0.8 ZP Dev Team zp50_items.amxx running
[ 62] [ZP] Items Manager: Am 5.0.8 ZP Dev Team zp50_items_ammo running
[ 63] [ZP] Item: Weapons 5.0.8 ZP Dev Team zp50_item_weapo running
[ 64] [ZP] Item: Antidote 5.0.8 ZP Dev Team zp50_item_antid running
[ 65] [ZP] Item: Zombie Madn 5.0.8 ZP Dev Team zp50_item_zombi running
[ 66] [ZP] Item: Infection B 5.0.8 ZP Dev Team zp50_item_infec running
[ 67] [ZP] Extra Item: Jump 1.0 Opo4uMapy zp_jump_bomb.am running
[ 68] [ZP] Admin Commands 5.0.8 ZP Dev Team zp50_admin_comm running
[ 69] [ZP] Admin Menus 5.0.8 ZP Dev Team zp50_admin_menu running
[ 70] [ZP] Admin Models 5.0.8 ZP Dev Team zp50_admin_mode running
[ 71] [ZP] Custom Buy Menus 5.0.8 ZP Dev Team zp50_buy_menus. running
[ 72] [ZP] Buyzones 5.0.8 ZP Dev Team zp50_buy_zones. running
[ 73] [ZP] Rewards: Ammo Pac 5.0.8 ZP Dev Team zp50_rewards_am running
[ 74] [ZP] Rewards: Frags & 5.0.8 ZP Dev Team zp50_rewards_fr running
[ 75] [ZP] Deathmatch 5.0.8 ZP Dev Team zp50_deathmatch running
[ 76] [ZP] Random Spawning 5.0.8 ZP Dev Team zp50_random_spa running
[ 77] [ZP] Spawn Protection 5.0.8 ZP Dev Team zp50_spawn_prot running
[ 78] [ZP] Zombie Features 5.0.8 ZP Dev Team zp50_zombie_fea running
[ 79] [ZP] Zombie Sounds 5.0.8 ZP Dev Team zp50_zombie_sou running
[ 80] [ZP] Zombie Damage 5.0.8 ZP Dev Team zp50_zombie_dam running
[ 81] [ZP] Human Unlimited A 5.0.8 ZP Dev Team zp50_human_ammo running
[ 82] [ZP] Flashlight 5.0.8 ZP Dev Team zp50_flashlight running
[ 83] [ZP] Nightvision 5.0.8 ZP Dev Team zp50_nightvisio running
[ 84] [ZP] Leap/Longjump 5.0.8 ZP Dev Team zp50_leap.amxx running
[ 85] [ZP] Pain Shock Free 5.0.8 ZP Dev Team zp50_painshockf running
[ 86] [ZP] Knockback 5.0.8 ZP Dev Team zp50_knockback. running
[ 87] [ZP] Weapon Drop/Strip 5.0.8 ZP Dev Team zp50_weapon_dro running
[ 88] [ZP] Effects: Infect 5.0.8 ZP Dev Team zp50_effects_in running
[ 89] [ZP] Effects: Cure 5.0.8 ZP Dev Team zp50_effects_cu running
[ 90] [ZP] Effects: Lighting 5.0.8 ZP Dev Team zp50_effects_li running
[ 91] [ZP] Ambience Effects 5.0.8 ZP Dev Team zp50_ambience_e running
[ 92] New Jetpack 0.0.3 Bad_Bud,ZmOutSta NewJP_mu.amxx running
[ 93] [ZP] Extra Item: Plasm v0.1 Crazy zp_extra_plasma running
[ 94] [ZP] Extra: Cart Blue 1.0 KORD_12.7 zp_extra_cartbl running
[ 95] unknown unknown unknown zp_extra_dartpi running
[ 96] [ZMO] Weapon: Deagle C 1.0 Chrescoe1 , Plan zp_extra_hunter running
[ 97] [ZMO]Weapon: Cyclone 1.0 Base: Batcon; Re zp_extra_cyclon running
[ 98] [ZP] Extra: CSO Weapon 0.1 KORD_12.7 zp_extra_dual_g running
[ 99] unknown unknown unknown zp_extra_dinfin running
[100] Janus-11 1.0 m4m3ts zp_extra_janus1 running
[101] [CSO Like] Weapon: Bri 1.1 / 05.0 inf (nimroK) / B zp_extra_brickx running
[102] [ZP] Extra Item: Frost 1.4 Raheem zp_frost_m4a1.a running
[103] [ZP] Weapon: M4A1 Silv 1.0 xUnicorn (t3rkec zp_weapon_m4a1_ running
[104] Brick Peace V2 1.0 m4m3ts zp_extra_brickp running
[105] AK-47Long 1.0 misna zp_extra_aklong running
[106] [ZP] Weapon: AK47 Beas 1.0 | 2018 xUnicorn (t3rkec zp_weapon_ak47_ running
[107] [ZP] Weapon: BALROG3 1.0 PbI)I(Uu' / Batc zp_extra_barlog running
[108] [ZP] Extra: CSO Weapon 1.0 KORD_12.7 zp_extra_railgu running
[109] [CSO] Thunderbolt 3.0 Dias cso_extra_thund running
[110] [ZP] Weapon: Savery 1.0 Base: Batcon & x cso_weapon_save running
[111] [ZP] Extra: AWP Camo 1.0 Crock / =) (Popr zp_extra_awp_wo running
[112] [ZP] Extra: Lighting E 1.0 Crock / =) (Popr zp_lighting_elf running
[113] [ZP] Extra: CSO Weapon 1.0 KORD_12.7 zp_extra_awpz.a running
[114] [ZP] Extra: CSO Weapon 1.0 KORD_12.7 zp_extra_vulcan running
[115] [CSO Like] BrickPiace 1.0 AsepKhairulAnam zp_extra_brickp running
[116] [ZP] Extra: M249 Pheon 1.0 Crock / =) (Popr zp_extra_m249_p running
[117] [ZP] Extra: m134ex 1.0 LARS-DAY[BR]EAKE zp_extra_m134.a running
[118] [CSO] M4A1 Dark Knight 1.0 || CLO AsepKhairulAnam@ buff_buffm4.amx running
[119] Janus-11 1.0 m4m3ts normal_janus11. running
[120] [WPN] Ethereal 1.0 Chrescoe1 wpn_ethereal.am running
[121] [CounterStrikeOnline] 1.0 [YouTube]COBA native_starchas running
[122] [ZP] Main Menu 5.0.8 ZP Dev Team zp50_main_menu. running
[123] [ZP] Objective Remover 5.0.8 ZP Dev Team zp50_objective_ running
[124] [ZP] Gameplay Fixes 5.0.8 ZP Dev Team zp50_gameplay_f running
[125] [ZP] Team Scoring 5.0.8 ZP Dev Team zp50_team_scori running
[126] [ZP] Server Browser In 5.0.8 ZP Dev Team zp50_serverbrow running
[127] [ZP] HUD Information 5.0.8 ZP Dev Team zp50_hud_info.a running
[128] [ZP] Ammo Packs 5.0.8 ZP Dev Team zp50_ammopacks. running
[129] [ZP] Grenade: Fire 5.0.8 ZP Dev Team zp50_grenade_fi running
[130] [ZP] Grenade: Frost 5.0.8 ZP Dev Team zp50_grenade_fr running
[131] [ZP] Grenade: Flare 5.0.8 ZP Dev Team zp50_grenade_fl running
[132] [ZP] ZP 4.3 Subplugin 5.0.8 ZP Dev Team zp50_zp43_compa running
[133] [ZP] Can Auto Save Amm 0.1.0 ZombArena.Ru zp_save.amxx running
[134] [ZP] Addon: Knifes 1.1 Mr.TheFold, reda zp_addon_knifes running
[135] [ZP] Sub-Plugin: Parac 1.1 Random1, 93()|29 zbg_addons_para running
[136] New ZP Ammo-Menu 0.1 Sanya@ zp_ammomenu.amx running
[137] [ZP] ZP++ Ice Cube 1.0 DareDevil (Gyiov zp50_ice_cube.a running
[138] [ZP]Level System 6.0 Dambas zp_level_system running
[139] [ZP] Admin Lvl Menu 1.0 Dambas zp_level_admin_ running
[140] [ZP] Addon: Perfect La 4.2 [P]erfec[T] [S]c zp_lasermine_pe running
[141] No Survivor Recoil v1.0 Stone/Mog zp_no_survivor. running
[142] [ZP] DHUD Informer 0.0.0.1 Andrei zp_score.amxx running
[143] By_neo_countdown 1.0 NEO zp_countdown.am running
[144] AdvancedHook 1.0 _RedGamer_ zp_hook_advance running
[145] ZM VIP 1.7.2 aaarnas zm_vip.amxx running
[146] Vip Menu ip Menu p Menu zp_vip_menu.amx running
[147] Super Vip Menu uper Vip M per Vip Menu zp_supervip_men running
[148] Owner Menu wner Menu ner Menu zp_owner_menu.a running
[149] Creator Menu reator Men eator Menu zp_creator_menu running
[150] MultiJump Advanced 1.0 _RedGamer_ zp_multijump.am running
150 plugins, 142 running
Автор плагина
Opo4uMapy
Версия плагина
1.0
Исходный код
/*
- Создание плагинов на закз:

- Контакты:
- Vk: http://vk.com/Opo4uMapy
- ICQ: 585552410
*/

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

#define PLUGIN "[ZP] Extra Item: Jump Bomb"
#define VERSION "1.0"
#define AUTHOR "Opo4uMapy"

native cs_get_user_bpammo(index, weapon);
native cs_set_user_bpammo(index, weapon, amount);

#define JUMPBOMB_ID 55556

/////////////////////////////////////Cvars/////////////////////////////////////

#define ITEM_NAME "Jump Grenade" // Имя айтема
#define ITEM_COST 6 // Стоимость за 1 бомбу
#define MAX_GRENADE 5 // Лимит гранат
#define RADIUS 300.0 // Радиус взрыва
#define JUMP_DAMAGE 20 // Урон
#define JUMP_EXP 500.0 // Сила отдачи от гранаты

#define GRENADE_ICON //Иконка с лева. Что бы отключить поставьте //

#define BUY_GRENADE_MSG "[ZP] Вы купили гранату джамп"
#define MAX_GRENADE_MSG "[ZP] Вы купили маскимум гранат"

#define TRAIL //Трайл за гранатой. Что бы отключить закоментируем ( //#define TRAIL )

/////////////////////////////////////WeaponList/////////////////////////////////////

#define WEAPONLIST // WeaponList. Что бы отключить закоментируем ( //#define WEAPONLIST )

#define WEAPON_DEFAULT "weapon_smokegrenade" //Weapon под которую сделана граната
#define DEFAULT_CSW CSW_SMOKEGRENADE //CSW под которую сделана граната

#if defined WEAPONLIST
#define WEAPON_NEW "weapon_zombj1_sisa" //Название WeaponList'a новой гранаты

#define LVL_COUNT 5

new const WeaponList_Sprite[][] =
{
"sprites/weapon_zombj1_sisa.txt",
"sprites/640hud61.spr",
"sprites/640hud7x.spr"
}

enum
{
prim_ammoid = 13,
prim_ammomaxamount = 1,
sec_ammoid = -1,
sec_ammomaxamount = -1,
slotid = 3,
number_in_slot = 3,
weaponid = 9,
flags = 24
}
#endif

////////////////////////////////////////////////////////////////////////////////////

// Модели гранаты
new const BOMB_MODEL[][] =
{
"models/v_zombibomb.mdl",
"models/p_zombibomb.mdl",
"models/w_zombibomb.mdl"
}

//Звуки покупки
#define g_SoundGrenadeBuy "items/gunpickup2.wav"
#define g_SoundAmmoPurchase "items/9mmclip1.wav"

//Звук взрыва
#define g_SoundBombExplode "nst_zombie/zombi_bomb_exp.wav"

//Не изменять! Звуки прописаны в модели.
new const frogbomb_sound[][] =
{
"nst_zombie/zombi_bomb_pull_1.wav",
"nst_zombie/zombi_bomb_deploy.wav",
"nst_zombie/zombi_bomb_throw.wav"
}

new const frogbomb_sound_idle[][] =
{
"nst_zombie/zombi_bomb_idle_1.wav",
"nst_zombie/zombi_bomb_idle_2.wav",
"nst_zombie/zombi_bomb_idle_3.wav",
"nst_zombie/zombi_bomb_idle_4.wav"
}
new g_itemid

new MsgSayText

new g_JumpGrenadeCount[33], g_iExplo
#if defined TRAIL
new g_trailSpr
#endif
#if defined GRENADE_ICON
new grenade_icons[33][32]
#endif

public plugin_precache()
{
static i

for(i = 0; i < sizeof BOMB_MODEL; i++)
precache_model(BOMB_MODEL[i])

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

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

precache_sound(g_SoundGrenadeBuy)
precache_sound(g_SoundAmmoPurchase)
precache_sound(g_SoundBombExplode)

#if defined WEAPONLIST
register_clcmd(WEAPON_NEW, "hook")

for(i = 0; i < sizeof WeaponList_Sprite; i++)
precache_generic(WeaponList_Sprite[i])

#endif

g_iExplo = precache_model("sprites/zombiebomb_exp.spr")

#if defined TRAIL
g_trailSpr = precache_model("sprites/laserbeam.spr")
#endif
}

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)

//Ham
RegisterHam(Ham_Think, "grenade", "fw_ThinkGrenade")
RegisterHam(Ham_Killed, "player", "fw_HamKilled")
RegisterHam(Ham_Item_Deploy, WEAPON_DEFAULT, "DeployPost", 1)

//Forward
register_forward(FM_SetModel, "fw_SetModel")

//Event
register_event("DeathMsg", "DeathMsg", "a")

#if defined GRENADE_ICON
register_event("CurWeapon", "grenade_icon", "be", "1=1")
#endif

MsgSayText = get_user_msgid("SayText")

//Extra Item
g_itemid = zp_register_extra_item(ITEM_NAME, ITEM_COST, ZP_TEAM_ZOMBIE)
}

#if defined WEAPONLIST
public hook(id)
{
if(!is_user_connected(id))
return PLUGIN_CONTINUE

engclient_cmd(id, WEAPON_DEFAULT)

return PLUGIN_HANDLED
}
#endif

public zp_extra_item_selected(id, Item)
{
if(Item == g_itemid)
{
if(zp_level(id) >= LVL_COUNT)
{
if(g_JumpGrenadeCount[id] >= MAX_GRENADE)
{
client_print(id, print_chat, "%s", MAX_GRENADE_MSG)
return ZP_PLUGIN_HANDLED
}

new Ammo = cs_get_user_bpammo(id, DEFAULT_CSW)
if(g_JumpGrenadeCount[id] >= 1)
{
cs_set_user_bpammo(id, DEFAULT_CSW, Ammo + 1)
emit_sound(id, CHAN_ITEM, g_SoundAmmoPurchase, VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
g_JumpGrenadeCount[id]++
}
else
{
fm_give_item(id, WEAPON_DEFAULT)
client_print(id, print_chat, "%s", BUY_GRENADE_MSG)
emit_sound(id, CHAN_ITEM, g_SoundGrenadeBuy, VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
g_JumpGrenadeCount[id] = 1
}
}
else
{
zp_colored_print(id, "^x01[^x04ZP^x01] Вы не достигли ^x04%d ^x01уровня!", LVL_COUNT)
return ZP_PLUGIN_HANDLED
}

AmmoPickup(id)
#if defined WEAPONLIST
WeaponList(id, 1)
#endif
}

return PLUGIN_HANDLED
}

public zp_user_infected_post(id, infector, nemesis)
{
if(zp_get_user_nemesis(id) || zp_is_survivor_round() || zp_is_nemesis_round())
return

g_JumpGrenadeCount[id] = 0

fm_give_item(id, WEAPON_DEFAULT)
cs_set_user_bpammo(id, DEFAULT_CSW, 1)
emit_sound(id, CHAN_ITEM, g_SoundGrenadeBuy, VOL_NORM, ATTN_NORM, 0, PITCH_NORM)

AmmoPickup(id)

g_JumpGrenadeCount[id] = 1
#if defined WEAPONLIST
WeaponList(id, 1)
#endif
}

public zp_user_humanized_post(id, survivor)
{
g_JumpGrenadeCount[id] = 0
#if defined WEAPONLIST
WeaponList(id, 0)
#endif
}

public DeployPost(entity)
{
static id
id = get_pdata_cbase(entity, 41, 4)

if(!is_user_alive(id) || !zp_get_user_zombie(id) || zp_get_user_nemesis(id) || zp_get_user_survivor(id))
return PLUGIN_CONTINUE

set_pev(id, pev_viewmodel2, BOMB_MODEL[0])
set_pev(id, pev_weaponmodel2, BOMB_MODEL[1])

return PLUGIN_CONTINUE
}

public fw_SetModel(Entity, const Model[])
{
if (Entity < 0)
return FMRES_IGNORED

if (pev(Entity, pev_dmgtime) == 0.0)
return FMRES_IGNORED

new iOwner = pev(Entity, pev_owner)

if(!zp_get_user_zombie(iOwner))
return FMRES_IGNORED

if(g_JumpGrenadeCount[iOwner] >= 1 && equal(Model[7], "w_sm", 4))
{
g_JumpGrenadeCount[iOwner]--

set_pev(Entity, pev_flTimeStepSound, JUMPBOMB_ID)
set_pev(Entity, pev_body, 23)

fm_set_rendering(Entity, kRenderFxGlowShell, 0, 255, 0, kRenderNormal, 16)

#if defined TRAIL
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_BEAMFOLLOW)
write_short(Entity) // entity
write_short(g_trailSpr) // sprite
write_byte(2) // life
write_byte(5) // width
write_byte(0) // r
write_byte(200) // g
write_byte(0) // b
write_byte(200) // brightness
message_end()
#endif

engfunc(EngFunc_SetModel, Entity, BOMB_MODEL[2])

return FMRES_SUPERCEDE
}
return FMRES_IGNORED
}

public fw_ThinkGrenade(Entity)
{
if(!pev_valid(Entity))
return HAM_IGNORED

static Float:dmg_time
pev(Entity, pev_dmgtime, dmg_time)

if(dmg_time > get_gametime())
return HAM_IGNORED

if(pev(Entity, pev_flTimeStepSound) == JUMPBOMB_ID)
{
JumpBombExplode(Entity)
return HAM_SUPERCEDE
}
return HAM_IGNORED
}

public JumpBombExplode(Entity)
{
if(Entity < 0)
return

static Float:Origin[3]
pev(Entity, pev_origin, Origin)

engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, Origin, 0)
write_byte(TE_SPRITE)
engfunc(EngFunc_WriteCoord, Origin[0])
engfunc(EngFunc_WriteCoord, Origin[1])
engfunc(EngFunc_WriteCoord, Origin[2] + 45.0)
write_short(g_iExplo)
write_byte(35)
write_byte(186)
message_end()

emit_sound(Entity, CHAN_WEAPON, g_SoundBombExplode, VOL_NORM, ATTN_NORM, 0, PITCH_NORM)

for(new victim = 1; victim <= get_maxplayers(); victim++)
{
if (!is_user_alive(victim))
continue

new Float:VictimOrigin[3]
pev(victim, pev_origin, VictimOrigin)

new Float:Distance = get_distance_f(Origin, VictimOrigin)

if(Distance <= RADIUS)
{
static Float:NewSpeed

NewSpeed = JUMP_EXP * (1.0 - (Distance / RADIUS))

static Float:Velocity[3]
get_speed_vector(Origin, VictimOrigin, NewSpeed, Velocity)

set_pev(victim, pev_velocity, Velocity)

message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("ScreenShake"), _, victim)
write_short(1<<12 * 10)
write_short(1<<12 * 10)
write_short(1<<12 * 10)
message_end()

if(zp_get_user_zombie(victim))
set_user_takedamage(victim, JUMP_DAMAGE)

}
}
engfunc(EngFunc_RemoveEntity, Entity)
}
#if defined GRENADE_ICON
public grenade_icon(id)
{
remove_grenade_icon(id)

if(is_user_bot(id))
return

static igrenade, grenade_sprite[16], grenade_color[3]
igrenade = get_user_weapon(id)

switch(igrenade)
{
case DEFAULT_CSW:
{
if(!is_user_alive(id) || zp_get_user_zombie(id))
{
grenade_sprite = "dmg_gas"
grenade_color = {255, 165, 0}
}
else
{
grenade_sprite = ""
grenade_color = {0, 0, 0}
}
}
default: return
}
grenade_icons[id] = grenade_sprite

message_begin(MSG_ONE, get_user_msgid("StatusIcon"),{0, 0, 0}, id)
write_byte(1)
write_string(grenade_icons[id])
write_byte(grenade_color[0])
write_byte(grenade_color[1])
write_byte(grenade_color[2])
message_end()

return
}
#endif
public zp_round_ended()
{
for(new id = 1; id <= get_maxplayers(); id++)
{
if(!is_user_alive(id) || !zp_get_user_zombie(id))
continue

ham_strip_weapon(id, WEAPON_DEFAULT)
g_JumpGrenadeCount[id] = 0
}
}

public DeathMsg()
{
new attacker = read_data(1)
new victim = read_data(2)

if(!is_user_connected(attacker))
return HAM_IGNORED

if(victim == attacker || !victim)
return HAM_IGNORED

if(!zp_get_user_zombie(victim))
return HAM_IGNORED

#if defined GRENADE_ICON
remove_grenade_icon(victim)
#endif

#if defined WEAPONLIST
WeaponList(victim, 0)
#endif

g_JumpGrenadeCount[victim] = 0

return HAM_HANDLED
}

public client_connect(id) g_JumpGrenadeCount[id] = 0;

public fw_HamKilled(victim, attacker)
{
if (zp_get_user_zombie(victim))
{
return PLUGIN_HANDLED
}

return PLUGIN_HANDLED
}

#if defined WEAPONLIST
WeaponList(index, mode = 0)
{
if (!is_user_connected(index))
return

message_begin(MSG_ONE, get_user_msgid("WeaponList"), {0, 0, 0}, index)
write_string(mode ? WEAPON_NEW : WEAPON_DEFAULT)
write_byte(prim_ammoid)
write_byte(prim_ammomaxamount)
write_byte(sec_ammoid)
write_byte(sec_ammomaxamount)
write_byte(slotid)
write_byte(number_in_slot)
write_byte(weaponid)
write_byte(flags)
message_end()
}
#endif

#if defined GRENADE_ICON
static remove_grenade_icon(index)
{
message_begin(MSG_ONE, get_user_msgid("StatusIcon"), {0, 0, 0}, index)
write_byte(0)
write_string(grenade_icons[index])
message_end()
}
#endif

stock set_user_takedamage(index, damage)
{
if(!is_user_alive(index))
return

new vec[3]
FVecIVec(get_target_origin_f(index), vec)

message_begin(MSG_ONE, get_user_msgid("Damage"), _, index)
write_byte(0)
write_byte(damage)
write_long(DMG_CRUSH)
write_coord(vec[0])
write_coord(vec[1])
write_coord(vec[2])
message_end()

if(pev(index, pev_health) - 20.0 <= 0)
ExecuteHamB(Ham_Killed, index, index, 1)
else ExecuteHamB(Ham_TakeDamage, index, 0, index, float(damage), DMG_BLAST)
}

stock AmmoPickup(index)
{
message_begin(MSG_ONE, get_user_msgid("AmmoPickup"), _, index)
write_byte(13)
write_byte(1)
message_end()
}

stock Float:get_target_origin_f(index)
{
new Float:orig[3]
pev(index, pev_origin, orig)

if(index > get_maxplayers())
{
new Float:mins[3], Float:maxs[3]
pev(index, pev_mins, mins)
pev(index, pev_maxs, maxs)

if(!mins[2]) orig[2] += maxs[2] / 2
}
return orig
}

stock get_speed_vector(const Float:origin1[3],const Float:origin2[3],Float:speed, Float:new_velocity[3])
{
new_velocity[0] = origin2[0] - origin1[0]
new_velocity[1] = origin2[1] - origin1[1]
new_velocity[2] = origin2[2] - origin1[2]
new Float:num = floatsqroot(speed*speed / (new_velocity[0]*new_velocity[0] + new_velocity[1]*new_velocity[1] + new_velocity[2]*new_velocity[2]))
new_velocity[0] *= num
new_velocity[1] *= num
new_velocity[2] *= num

return 1
}

stock fm_set_rendering(entity, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16)
{
new Float:RenderColor[3]
RenderColor[0] = float(r)
RenderColor[1] = float(g)
RenderColor[2] = float(b)

set_pev(entity, pev_renderfx, fx)
set_pev(entity, pev_rendercolor, RenderColor)
set_pev(entity, pev_rendermode, render)
set_pev(entity, pev_renderamt, float(amount))

return 1
}

stock fm_give_item(index, const item[])
{
if (!equal(item, "weapon_", 7) && !equal(item, "ammo_", 5))
return 0

new ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, item))
if (!pev_valid(ent))
return 0

new Float:origin[3]
pev(index, pev_origin, origin)
set_pev(ent, pev_origin, origin)
set_pev(ent, pev_spawnflags, pev(ent, pev_spawnflags) | SF_NORESPAWN)
dllfunc(DLLFunc_Spawn, ent)

new save = pev(ent, pev_solid)
dllfunc(DLLFunc_Touch, ent, index)
if (pev(ent, pev_solid) != save)
return ent

engfunc(EngFunc_RemoveEntity, ent)

return -1
}

stock ham_strip_weapon(index, weapon[])
{
if(!equal(weapon, "weapon_", 7))
return 0

new wId = get_weaponid(weapon)
if(!wId) return 0

new wEnt
while((wEnt = engfunc(EngFunc_FindEntityByString, wEnt, "classname", weapon)) && pev(wEnt,pev_owner) != index) {}

if(!wEnt)
return 0

if(get_user_weapon(index) == wId)
ExecuteHamB(Ham_Weapon_RetireWeapon,wEnt)

if(!ExecuteHamB(Ham_RemovePlayerItem, index, wEnt))
return 0

ExecuteHamB(Ham_Item_Kill, wEnt)

set_pev(index, pev_weapons, pev(index, pev_weapons) & ~(1<<wId))

return 1
}

zp_colored_print(target, const message[], any:...)
{
static buffer[512], i, argscount
argscount = numargs()

if (!target)
{
static iPlayers[32], iNum, j, player
get_players(iPlayers, iNum, "ch")
for (j = 0; j < iNum; j++)
{
player = iPlayers[j]
static changed[5], changedcount
changedcount = 0

for (i = 2; i < argscount; i++)
{
if (getarg(i) == LANG_PLAYER)
{
setarg(i, 0, player)
changed[changedcount] = i
changedcount++
}
}

vformat(buffer, charsmax(buffer), message, 3)
message_begin(MSG_ONE_UNRELIABLE, MsgSayText, _, player)
write_byte(player)
write_string(buffer)
message_end()

for (i = 0; i < changedcount; i++) setarg(changed[i], 0, LANG_PLAYER);
}
}
else
{
vformat(buffer, charsmax(buffer), message, 3)
message_begin(MSG_ONE, MsgSayText, _, target)
write_byte(target)
write_string(buffer)
message_end()
}
}
Дело в том, что убивая зомби, из не го дропается смоук граната.. как исправить, весь код перешуршал.. хелп)
 
Сообщения
552
Реакции
49
Предупреждения
2
Помог
4 раз(а)
RedGamer, надо что бы граната не дропалась?
 
Сообщения
1,041
Реакции
206
Предупреждения
1
Помог
6 раз(а)
У опачимапи спроси)
 
Сообщения
365
Реакции
9
Помог
5 раз(а)
Обратите внимание, если вы хотите заключить сделку с этим пользователем, он заблокирован
BiZaJe, вообще то правильно "орачимару" читать его ник, сразу видно что "наруто" не смотрел)
 
Сообщения
1,041
Реакции
206
Предупреждения
1
Помог
6 раз(а)
RedFoxxx, это древняя шутка ещё наверное 2012-2014
 
Сообщения
775
Реакции
293
Помог
11 раз(а)
BiZaJe, ну вообще, его опычем звали )))
 
Сообщения
1,041
Реакции
206
Предупреждения
1
Помог
6 раз(а)
maFFyoZZyk, ну или так)
А вообще отловить момент дропа
 
Сообщения
1,041
Реакции
206
Предупреждения
1
Помог
6 раз(а)
RedGamer, Ham_Item_Drop, Ham_CS_Item_CanDrop
 
Сообщения
1,041
Реакции
206
Предупреждения
1
Помог
6 раз(а)
RedGamer, Либо же SetModel в fakemeta
 
Сообщения
75
Реакции
82
Помог
6 раз(а)
Код:
// Drop a grenade after player death
// 0 - disabled
// 1 - drop first available grenade
// 2 - drop all grenades
//
// Default value: "0"
mp_nadedrops 0
 
Сообщения
892
Реакции
149
Помог
25 раз(а)
Flymic24, у него нету регейма вродь, я ему писал, но он не хочет менять основу сервера.
 
Сообщения
418
Реакции
-7
Предупреждения
8
Проблема решена самостоятельным путём, использовал отлов смерти игрока (зомби). Забрал оружие т.е гранату во время смерти через strip weapons)
 
Статус
В этой теме нельзя размещать новые ответы.

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу