Обратите внимание, если вы хотите заключить сделку с этим пользователем, он заблокирован
- Ошибка
-
-
- ОС
- Windows
- Amx Mod X
-
1.9.0
- Билд
-
Protocol version 48
Exe version 1.1.2.6/2.0.0.0 (cstrike)
Exe build: 16:05:41 Jun 15 2009
- ReGamedll
-
-
- Версия Metamod
-
Metamod v1.20 2013-02-16 (5:13)
by Will Day <[email protected]>
http://www.metamod.org/
compiled: Feb 16 2013, 17:12:42 +0100 (optimized)
- Список метамодулей
-
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] ZM VIP 1.9.1 BETA aaarnas zm_vip.amxx running
[ 33] [ZP] Core/Engine 5.0.8 ZP Dev Team zp50_core.amxx running
[ 34] [AMXX] External Settin 0.1 WiLS amx_settings_ap running
[ 35] [CS] Player Models API 1.2 WiLS cs_player_model running
[ 36] [CS] Teams API 1.2 WiLS cs_teams_api.am running
[ 37] [CS] MaxSpeed API 1.0 WiLS cs_maxspeed_api running
[ 38] [CS] Weapon Models API 1.1 WiLS cs_weap_models_ running
[ 39] [CS] Weapons Restrict 0.4 WiLS cs_weap_restric running
[ 40] [CS] Ham Hooks for Bot 1.0 WiLS cs_ham_bots_api running
[ 41] [ZP] Class: Zombie 5.0.8 ZP Dev Team zp50_class_zomb running
[ 42] [ZP] Class: Human 5.0.8 ZP Dev Team zp50_class_huma running
[ 43] [ZP] Class: Nemesis 5.0.8 ZP Dev Team zp50_class_neme running
[ 44] [ZP] Class: Survivor 5.0.8 ZP Dev Team zp50_class_surv running
[ 45] [ZP] Class: Zombie: Cl 5.0.8 ZP Dev Team zp50_class_zomb running
[ 46] [CSO:Hunter Zombie] 1.2 HoRRoR/tERoR edi zp50_class_chin running
[ 47] NST Zombie Class Heal 1.0 NST zp50_class_sham running
[ 48] [ZP] Wallclimb 1.0 WallClimb by Pyt zp50_class_skal running
[ 49] [ZP] Zombie Class: Dra 0.1 =), LARS-BLOODLI zp50_class_reve running
[ 50] [ZP] Zombie Class: Rev 1.0 =), LARS-BLOODLI zp50_class_reve running
[ 51] [ZP] Zombie Class: Poi 0.1 =), LARS-BLOODLI zp50_class_reve running
[ 52] [ZP] Class: Human: Cla 5.0.8 ZP Dev Team zp50_class_huma running
[ 53] [ZP] Human Armor 5.0.8 ZP Dev Team zp50_human_armo running
[ 54] [ZP] Game Modes Manage 5.0.8 ZP Dev Team zp50_gamemodes. running
[ 55] [ZP] Game Mode: Infect 5.0.8 ZP Dev Team zp50_gamemode_i running
[ 56] [ZP] Game Mode: Multip 5.0.8 ZP Dev Team zp50_gamemode_m paused
[ 57] [ZP] Game Mode: Swarm 5.0.8 ZP Dev Team zp50_gamemode_s paused
[ 58] [ZP] Game Mode: Nemesi 5.0.8 ZP Dev Team zp50_gamemode_n paused
[ 59] [ZP] Game Mode: Surviv 5.0.8 ZP Dev Team zp50_gamemode_s paused
[ 60] [ZP] Game Mode: Plague 5.0.8 ZP Dev Team zp50_gamemode_p paused
[ 61] [ZP] Game Mode: Armage 5.0.8 ZP Dev Team zp50_gamemode_a paused
[ 62] [ZP] Items Manager 5.0.8 ZP Dev Team zp50_items.amxx running
[ 63] [ZP] Items Manager: Am 5.0.8 ZP Dev Team zp50_items_ammo running
[ 64] [ZP] Item: Weapons 5.0.8 ZP Dev Team zp50_item_weapo running
[ 65] [ZP] Item: Nightvision 5.0.8 ZP Dev Team zp50_item_night running
[ 66] [ZP] Item: Antidote 5.0.8 ZP Dev Team zp50_item_antid running
[ 67] [ZP] Item: Zombie Madn 5.0.8 ZP Dev Team zp50_item_zombi running
[ 68] [ZP] Item: Infection B 5.0.8 ZP Dev Team zp50_item_infec running
[ 69] [ZP] Admin Commands 5.0.8 ZP Dev Team zp50_admin_comm running
[ 70] [ZP] Admin Menus 5.0.8 ZP Dev Team zp50_admin_menu running
[ 71] [ZP] Admin Models 5.0.8 ZP Dev Team zp50_admin_mode running
[ 72] [ZP] Custom Buy Menus 5.0.8 ZP Dev Team zp50_buy_menus. running
[ 73] [ZP] Buyzones 5.0.8 ZP Dev Team zp50_buy_zones. running
[ 74] [ZP] Rewards: Ammo Pac 5.0.8 ZP Dev Team zp50_rewards_am running
[ 75] [ZP] Rewards: Frags & 5.0.8 ZP Dev Team zp50_rewards_fr running
[ 76] [ZP] Deathmatch 5.0.8 ZP Dev Team zp50_deathmatch running
[ 77] [ZP] Random Spawning 5.0.8 ZP Dev Team zp50_random_spa running
[ 78] [ZP] Spawn Protection 5.0.8 ZP Dev Team zp50_spawn_prot running
[ 79] [ZP] Zombie Features 5.0.8 ZP Dev Team zp50_zombie_fea running
[ 80] [ZP] Zombie Sounds 5.0.8 ZP Dev Team zp50_zombie_sou running
[ 81] [ZP] Zombie Damage 5.0.8 ZP Dev Team zp50_zombie_dam running
[ 82] [ZP] Human Unlimited A 5.0.8 ZP Dev Team zp50_human_ammo running
[ 83] [ZP] Flashlight 5.0.8 ZP Dev Team zp50_flashlight running
[ 84] [ZP] Nightvision 5.0.8 ZP Dev Team zp50_nightvisio running
[ 85] [ZP] Leap/Longjump 5.0.8 ZP Dev Team zp50_leap.amxx running
[ 86] [ZP] Pain Shock Free 5.0.8 ZP Dev Team zp50_painshockf running
[ 87] [ZP] Knockback 5.0.8 ZP Dev Team zp50_knockback. running
[ 88] [ZP] Weapon Drop/Strip 5.0.8 ZP Dev Team zp50_weapon_dro running
[ 89] [ZP] Effects: Infect 5.0.8 ZP Dev Team zp50_effects_in running
[ 90] [ZP] Effects: Cure 5.0.8 ZP Dev Team zp50_effects_cu running
[ 91] [ZP] Effects: Lighting 5.0.8 ZP Dev Team zp50_effects_li running
[ 92] [ZP] Ambience Effects 5.0.8 ZP Dev Team zp50_ambience_e running
[ 93] [CSO] M4A1 Dark Knight 1.0 || CLO AsepKhairulAnam@ buff_buffm4.amx running
[ 94] Janus-11 1.0 m4m3ts normal_janus11. running
[ 95] [CSO] Thunderbolt 3.0 Dias cso_extra_thund running
[ 96] New Jetpack 0.0.3 Bad_Bud,ZmOutSta NewJP_mu.amxx running
[ 97] [CSO] PlasmaGun 1.0 Dias Leon cso_extra_Plasm running
[ 98] [ZP] Extra Item: Frost 1.4 Raheem zp_frost_m4a1.a running
[ 99] [ZP] Addon: Perfect La 4.2 [P]erfec[T] [S]c zp_lasermine_pe running
[100] AK-47Long 1.0 misna zp_extra_aklong running
[101] [ZP] Extra: Cart Blue 1.0 KORD_12.7 zp_extra_cso_ca running
[102] [ZP]ExtraDualInfinity 1.0 Arwel zp_extra_dual_i running
[103] [ZP] Extra: CSO Weapon 0.1 KORD_12.7 zp_extra_dual_g running
[104] [ZP] Weapon: Savery 1.0 Base: Batcon & x cso_weapon_save running
[105] [ZP] Extra: AWP Camo 1.0 Crock / =) (Popr zp_extra_awp_wo running
[106] Janus-11 1.0 m4m3ts zp_extra_janus1 running
[107] [ZP] Extra: Lighting E 1.0 Crock / =) (Popr zp_lighting_elf running
[108] [ZP] Weapon: M4A1 Silv 1.0 xUnicorn (t3rkec zp_weapon_m4a1_ running
[109] [ZP] Extra: CSO Weapon 1.0 KORD_12.7 zp_extra_awpz.a running
[110] [ZP] Weapon: AK47 Beas 1.0 | 2018 xUnicorn (t3rkec zp_weapon_ak47_ running
[111] [ZMO] Weapon: Lego Sho 1.0 Base: Batcon; Re zp_extra_legosh running
[112] [ZMO] Weapon: Deagle C 1.0 Chrescoe1 , Plan zp_extra_hunter running
[113] [ZMO]Weapon: Cyclone 1.0 Base: Batcon; Re zp_extra_cyclon running
[114] [CSO Like] BrickPiace 1.0 AsepKhairulAnam zp_extra_brickp running
[115] [ZP] Extra: M249 Pheon 1.0 Crock / =) (Popr zp_extra_m249_p running
[116] [ZP] Extra: CSO Weapon 1.0 KORD_12.7 zp_extra_vulcan running
[117] unknown unknown unknown zp_extra_dartpi running
[118] [ZP] Extra: CSO Weapon 1.0 KORD_12.7 zp_extra_railgu running
[119] [ZP] Weapon: BALROG3 1.0 PbI)I(Uu' / Batc zp_extra_barlog running
[120] [ZP] Extra: m134ex 1.0 LARS-DAY[BR]EAKE zp_extra_m134.a running
[121] [ZP] Main Menu 5.0.8 ZP Dev Team zp50_main_menu. running
[122] [ZP] Objective Remover 5.0.8 ZP Dev Team zp50_objective_ running
[123] [ZP] Gameplay Fixes 5.0.8 ZP Dev Team zp50_gameplay_f running
[124] [ZP] Team Scoring 5.0.8 ZP Dev Team zp50_team_scori running
[125] [ZP] Server Browser In 5.0.8 ZP Dev Team zp50_serverbrow running
[126] [ZP] HUD Information 5.0.8 ZP Dev Team zp50_hud_info.a running
[127] [ZP] Ammo Packs 5.0.8 ZP Dev Team zp50_ammopacks. running
[128] [ZP] Grenade: Fire 5.0.8 ZP Dev Team zp50_grenade_fi running
[129] [ZP] Grenade: Frost 5.0.8 ZP Dev Team zp50_grenade_fr running
[130] [ZP] Grenade: Flare 5.0.8 ZP Dev Team zp50_grenade_fl running
[131] [ZP] ZP 4.3 Subplugin 5.0.8 ZP Dev Team zp50_zp43_compa running
[132] [ZP] Can Auto Save Amm 0.1.0 ZombArena.Ru zp_save.amxx running
[133] [ZP] Addon: Knifes NEW Mr.TheFold, reda zp_addon_knifes running
[134] [ZP] Sub-Plugin: Parac 1.1 Random1, 93()|29 zbg_addons_para running
[135] New ZP Ammo-Menu 0.1 Sanya@ zp_ammomenu.amx running
[136] [ZP] ZP++ Ice Cube 1.0 DareDevil (Gyiov zp50_ice_cube.a running
[137] [ZP]Level System 6.0 Dambas zp_level_system running
[138] [ZP] Admin Lvl Menu 1.0 Dambas zp_level_admin_ running
[139] No Survivor Recoil v1.0 Stone/Mog zp_no_survivor. running
[140] unknown unknown unknown zp_vip_menu.amx bad load
[141] unknown unknown unknown zp_supervip_men bad load
- Автор плагина
- Arwel
- Версия плагина
- 1.0
- Исходный код
-
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
#include <fakemeta_util>
#include <zombieplague>
#define PLUGIN "[ZP]ExtraDualInfinity"
#define VERSION "1.0"
#define AUTHOR "Arwel"
#define CONFIG_CFG_FILE "weapons/dual_infinity.cfg"
#define OFFSET_LINUX_WEAPONS 4
#define OFFSET_LINUX 5
#define m_flNextAttack 83
#define m_flNextPrimaryAttack 46
#define m_flTimeWeaponIdle 48
#define m_fInReload 54
#define pev_weaponkey pev_impulse
#define weaponkey_value 18318
#define CSW_INFINITY CSW_ELITE
new const g_weapon_entity[]="weapon_elite"
new const g_weapon_event1[]="events/elite_right.sc"
new const g_weapon_event2[]="events/elite_left.sc"
new const g_weapon_weaponbox_model[]="models/w_elite.mdl"
new const weapon_list_txt[]="weapon_dual_infinity2"
new const weapon_list_sprites[][]=
{
"sprites/zp/640hud42.spr",
"sprites/zp/640hud43.spr",
"sprites/zp/640hud7.spr"
}
new const ViewModel[]="models/zp/v_infinityex2.mdl"
new const PlayerModel[]="models/zp/p_infinity.mdl"
new const WorldModel[]="models/zp/w_infinity.mdl"
new const Sounds[][]=
{
"weapons/infi-1.wav",
"weapons/infi_clipin.wav",
"weapons/infi_clipon.wav",
"weapons/infi_clipout.wav",
"weapons/infi_draw.wav"
}
new Blood[2]
new g_orig_event_dinfinity
new g_HasInfinity[33], g_player_weapon_ammo[33], Float:cl_pushangle[33][3], g_shoot_anim[33], g_hitgroup[33]
new g_mode[33], g_anim_mode[33]
new g_itemid
new pcvar_item_name, pcvar_clipammo, pcvar_bpammo, pcvar_cost, pcvar_time_fire_normal, pcvar_time_fire_fast
new pcvar_normal_damage_head, pcvar_normal_damage_chest, pcvar_normal_damage_stomach, pcvar_normal_damage_arms, pcvar_normal_damage_legs
new pcvar_fast_damage_head, pcvar_fast_damage_chest, pcvar_fast_damage_stomach, pcvar_fast_damage_arms, pcvar_fast_damage_legs
new Float:cvar_time_fire_normal, Float:cvar_time_fire_fast
const SECONDARY_WEAPONS_BIT_SUM = (1<<CSW_P228)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_DEAGLE)
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd(weapon_list_txt, "Redirect")
pcvar_item_name=register_cvar("dinfinity_item_name", "Dual Infinity")
pcvar_cost=register_cvar("dinfinity_cost", "15")
pcvar_bpammo=register_cvar("dinfinity_bpammo", "100")
pcvar_clipammo=register_cvar("dinfinity_clipammo", "40")
pcvar_time_fire_normal=register_cvar("dinfinity_fire_normal_period", "0.15")
pcvar_time_fire_fast=register_cvar("dinfinity_fire_fast_period", "0.02")
pcvar_normal_damage_head=register_cvar("dinfinity_normal_damage_head", "130")
pcvar_normal_damage_chest=register_cvar("dinfinity_normal_damage_chest", "34")
pcvar_normal_damage_stomach=register_cvar("dinfinity_normal_damage_stomach", "34")
pcvar_normal_damage_arms=register_cvar("dinfinity_normal_damage_arms", "34")
pcvar_normal_damage_legs=register_cvar("dinfinity_normal_damage_legs", "34")
pcvar_fast_damage_head=register_cvar("dinfinity_fast_damage_head", "115")
pcvar_fast_damage_chest=register_cvar("dinfinity_fast_damage_chest", "30")
pcvar_fast_damage_stomach=register_cvar("dinfinity_fast_damage_stomach", "30")
pcvar_fast_damage_arms=register_cvar("dinfinity_fast_damage_arms", "30")
pcvar_fast_damage_legs=register_cvar("dinfinity_fast_damage_legs", "30")
ReadSettings()
RegisterHam(Ham_Item_AddToPlayer, g_weapon_entity, "fwAddToPlayer", 1)
RegisterHam(Ham_Item_Deploy, g_weapon_entity, "fwDeployPost", 1)
RegisterHam(Ham_Weapon_PrimaryAttack, g_weapon_entity, "fwPrimaryAttack")
RegisterHam(Ham_Weapon_Reload, g_weapon_entity, "fwReloadPre")
RegisterHam(Ham_Item_PostFrame, g_weapon_entity, "fwItemPostFrame")
RegisterHam(Ham_TakeDamage, "player", "fwDamagePre")
RegisterHam(Ham_RemovePlayerItem, "player", "fwRemoveItem")
RegisterHam(Ham_TraceAttack, "player", "fwTraceAttackPost", 1)
RegisterHam(Ham_TraceAttack, "worldspawn", "fwTraceAttackPost", 1)
RegisterHam(Ham_TraceAttack, "func_breakable", "fwTraceAttackPost", 1)
RegisterHam(Ham_TraceAttack, "func_wall", "fwTraceAttackPost", 1)
RegisterHam(Ham_TraceAttack, "func_door", "fwTraceAttackPost", 1)
RegisterHam(Ham_TraceAttack, "func_door_rotating", "fwTraceAttackPost", 1)
RegisterHam(Ham_TraceAttack, "func_plat", "fwTraceAttackPost", 1)
RegisterHam(Ham_TraceAttack, "func_rotating", "fwTraceAttackPost", 1)
register_forward(FM_PlaybackEvent, "fwPlaybackEvent")
register_forward(FM_UpdateClientData, "fwUpdateClientDataPost", 1)
register_forward(FM_CmdStart, "fwCmdStart")
register_forward(FM_SetModel, "fwSetModel")
new item_name[64]
get_pcvar_string(pcvar_item_name, item_name, charsmax(item_name))
g_itemid=zp_register_extra_item(item_name, get_pcvar_num(pcvar_cost), ZP_TEAM_HUMAN)
}
public plugin_precache()
{
precache_model(ViewModel)
precache_model(PlayerModel)
precache_model(WorldModel)
for(new i; i<=charsmax(Sounds); i++)
{
precache_sound(Sounds[i])
}
Blood[0] = precache_model("sprites/bloodspray.spr")
Blood[1] = precache_model("sprites/blood.spr")
new tmp[128]
formatex(tmp, charsmax(tmp), "sprites/%s.txt", weapon_list_txt)
precache_generic(tmp)
for(new i; i<=charsmax(weapon_list_sprites); i++)
{
precache_generic(weapon_list_sprites[i])
}
register_forward(FM_PrecacheEvent, "fwPrecachePost", 1)
}
public ReadSettings()
{
new confdir[64], path[128]
get_configsdir(confdir, charsmax(confdir))
formatex(path, charsmax(path), "%s/%s", confdir, CONFIG_CFG_FILE)
server_cmd("exec %s", path)
server_exec()
cvar_time_fire_normal=get_pcvar_float(pcvar_time_fire_normal)
cvar_time_fire_fast=get_pcvar_float(pcvar_time_fire_fast)
}
public Redirect(id)
{
client_cmd(id, g_weapon_entity)
}
public zp_extra_item_selected(id, itemid)
{
if(itemid!=g_itemid)
return
give_infinity(id)
}
public client_disconnect(id)
{
g_HasInfinity[id]=false
}
public zp_user_infected_post(id)
{
g_HasInfinity[id]=false
}
public give_infinity(id)
{
drop_weapons(id, 2)
g_HasInfinity[id]=true
new ent=fm_give_item(id, g_weapon_entity)
cs_set_user_bpammo(id, CSW_INFINITY, get_pcvar_num(pcvar_bpammo))
cs_set_weapon_ammo(ent, get_pcvar_num(pcvar_clipammo))
InfinitySprite(id)
}
public fwPrecachePost(type, const name[])
{
if (equal(g_weapon_event1, name) || equal(g_weapon_event2, name) )
{
g_orig_event_dinfinity=get_orig_retval()
return FMRES_HANDLED
}
return FMRES_IGNORED
}
public fwPlaybackEvent(flags, invoker, eventid, Float:delay, Float:origin[3], Float:angles[3], Float:fparam1, Float:fparam2, iParam1, iParam2, bParam1, bParam2)
{
if ((eventid != g_orig_event_dinfinity))
return FMRES_IGNORED
if (!is_valid_player(invoker))
return FMRES_IGNORED
fm_playback_event(flags|FEV_HOSTONLY, invoker, eventid, delay, origin, angles, fparam1, fparam2, iParam1, iParam2, bParam1, bParam2)
return FMRES_SUPERCEDE
}
public fwUpdateClientDataPost(id, SendWeapons, CD_Handle)
{
if (!is_valid_player(id))
return FMRES_IGNORED
if(get_user_weapon(id)!=CSW_INFINITY)
return FMRES_IGNORED
set_cd(CD_Handle, CD_flNextAttack, get_gametime() + 0.001)
return FMRES_HANDLED
}
public fwCmdStart(id, uc_handle, seed)
{
if(!is_valid_player(id))
return
if(get_user_weapon(id) != CSW_INFINITY)
return
static buttons; buttons=get_uc(uc_handle, UC_Buttons)
if(!(buttons&IN_ATTACK2))
{
g_mode[id]=0
return
}
static ent; ent=get_pdata_cbase(id, 373)
if((buttons&IN_ATTACK)) /*Fix*/
{
set_pdata_float(ent, m_flNextPrimaryAttack, cvar_time_fire_normal, OFFSET_LINUX_WEAPONS)
g_mode[id]=0
return
}
if(get_pdata_int(ent, m_fInReload, OFFSET_LINUX_WEAPONS)||get_pdata_float(ent, m_flNextPrimaryAttack, OFFSET_LINUX_WEAPONS)>-0.1)
return
g_mode[id]=1
if(cs_get_weapon_ammo(ent)!=0)
ExecuteHamB(Ham_Weapon_PrimaryAttack, ent)
}
public fwSetModel(ent, model[])
{
if(!pev_valid(ent))
return FMRES_IGNORED;
if(!equal(model, g_weapon_weaponbox_model))
return FMRES_IGNORED;
static classname[33]
pev(ent, pev_classname, classname, charsmax(classname))
if(!equal(classname, "weaponbox"))
return FMRES_IGNORED
static owner; owner=pev(ent, pev_owner)
static weap;weap=fm_find_ent_by_owner(-1, g_weapon_entity, ent)
if(g_HasInfinity[owner]&&pev_valid(weap))
{
set_pev(weap, pev_weaponkey, weaponkey_value)
g_HasInfinity[owner]=false
fm_entity_set_model(ent, WorldModel)
return FMRES_SUPERCEDE
}
return FMRES_IGNORED
}
public fwAddToPlayer(ent, id)
{
if(pev_valid(ent))
{
if(pev(ent, pev_weaponkey)==weaponkey_value)
{
g_HasInfinity[id] = true
set_pev(ent, pev_weaponkey, 0)
InfinitySprite(id)
return HAM_HANDLED
}
}
return HAM_IGNORED
}
public fwDeployPost(ent)
{
new id=fm_get_weapon_owner(ent)
if (!is_valid_player(id))
return
set_pev(id, pev_viewmodel2, ViewModel)
set_pev(id, pev_weaponmodel2, PlayerModel)
playanim(id, 15)
set_pdata_float(ent, m_flNextPrimaryAttack, 0.8, OFFSET_LINUX_WEAPONS)
g_anim_mode[id]=!g_anim_mode[id]
}
public fwPrimaryAttack(ent)
{
new id=fm_get_weapon_owner(ent)
if (!is_valid_player(id))
return
pev(id,pev_punchangle,cl_pushangle[id])
g_player_weapon_ammo[id]=cs_get_weapon_ammo(ent)
}
public fwTraceAttackPost(ent, attacker, Float:damage, Float:dir[3], ptr, damage_type)
{
if(!is_valid_player(attacker))
return
if(get_user_weapon(attacker)!=CSW_INFINITY)
return
static Float:fEnd[3]
get_tr2(ptr, TR_vecEndPos, fEnd)
make_bullet_decals(attacker, fEnd)
g_hitgroup[attacker]=get_tr2(ptr, TR_iHitgroup)
}
public fwReloadPre(ent)
{
new id=fm_get_weapon_owner(ent)
if(!is_valid_player(id))
return HAM_IGNORED
static bpammo; bpammo=cs_get_user_bpammo(id, CSW_INFINITY)
static clip; clip=cs_get_weapon_ammo(ent)
if(bpammo>0&&clip<get_pcvar_num(pcvar_clipammo))
{
set_pdata_int(ent, 55, 0, OFFSET_LINUX_WEAPONS)
set_pdata_float(id, m_flNextAttack, 4.4, OFFSET_LINUX)
set_pdata_float(ent, m_flTimeWeaponIdle, 4.4, OFFSET_LINUX_WEAPONS)
set_pdata_float(ent, m_flNextPrimaryAttack, 4.4, OFFSET_LINUX_WEAPONS)
set_pdata_float(ent, 47, 4.4, OFFSET_LINUX_WEAPONS)
set_pdata_int(ent, m_fInReload, 1, OFFSET_LINUX_WEAPONS)
playanim(id, 14)
}
return HAM_SUPERCEDE
}
public fwItemPostFrame(ent)
{
new id=fm_get_weapon_owner(ent)
if(!is_valid_player(id))
return
static bpammo; bpammo=cs_get_user_bpammo(id, CSW_INFINITY)
static clip; clip=cs_get_weapon_ammo(ent)
if(clip<g_player_weapon_ammo[id])
{
g_player_weapon_ammo[id]=clip
new Float:push[3]
pev(id,pev_punchangle,push)
xs_vec_sub(push,cl_pushangle[id],push)
xs_vec_mul_scalar(push,0.8,push)
xs_vec_add(push,cl_pushangle[id],push)
if(g_mode[id]==0)
{
if(g_shoot_anim[id]==0)
{
playanim(id, 2)
}
else
{
playanim(id, 12)
}
set_pdata_float(ent, m_flNextPrimaryAttack, cvar_time_fire_normal, OFFSET_LINUX_WEAPONS)
}
else
{
if(g_shoot_anim[id]==0)
{
playanim(id, (g_anim_mode[id])?18:16)
push[0]+=1.0
push[1]-=1.5
}
else
{
playanim(id, (g_anim_mode[id])?19:17)
push[0]+=1.0
push[1]+=1.5
}
set_pdata_float(ent, m_flNextPrimaryAttack,cvar_time_fire_fast, OFFSET_LINUX_WEAPONS)
}
g_shoot_anim[id]=!g_shoot_anim[id]
set_pev(id,pev_punchangle,push)
emit_sound(id, CHAN_WEAPON, Sounds[0], VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
}
if(get_pdata_int(ent, m_fInReload, OFFSET_LINUX_WEAPONS)&&get_pdata_float(id, m_flNextAttack, 5) <= 0.0 )
{
set_pdata_int(ent, m_fInReload, 0, OFFSET_LINUX_WEAPONS)
for(new i = clip; i<get_pcvar_num(pcvar_clipammo); i++)
{
if(bpammo==0)
break
bpammo--
clip++
}
cs_set_weapon_ammo(ent, clip)
cs_set_user_bpammo(id, CSW_INFINITY, bpammo)
}
}
public fwDamagePre(id, weapon, attacker, Float:damage)
{
if(!is_valid_player(attacker))
return
if(get_user_weapon(attacker)!=CSW_INFINITY)
return
new Float:Damage
switch(g_hitgroup[attacker])
{
case HIT_HEAD: Damage=get_pcvar_float((g_mode[attacker])?pcvar_fast_damage_head:pcvar_normal_damage_head)
case HIT_CHEST: Damage=get_pcvar_float((g_mode[attacker])?pcvar_fast_damage_chest:pcvar_normal_damage_chest)
case HIT_STOMACH: Damage=get_pcvar_float((g_mode[attacker])?pcvar_fast_damage_stomach:pcvar_normal_damage_stomach)
case HIT_LEFTARM: Damage=get_pcvar_float((g_mode[attacker])?pcvar_fast_damage_arms:pcvar_normal_damage_arms)
case HIT_RIGHTARM: Damage=get_pcvar_float((g_mode[attacker])?pcvar_fast_damage_arms:pcvar_normal_damage_arms)
case HIT_LEFTLEG: Damage=get_pcvar_float((g_mode[attacker])?pcvar_fast_damage_legs:pcvar_normal_damage_legs)
case HIT_RIGHTLEG: Damage=get_pcvar_float((g_mode[attacker])?pcvar_fast_damage_legs:pcvar_normal_damage_legs)
}
SetHamParamFloat(4, Damage)
}
public fwRemoveItem(id, ent)
{
if(!is_valid_player(id))
return
new classname[62]
pev(ent, pev_classname, classname, 61)
if(!equal(classname, g_weapon_entity))
return
DefaultSprite(id)
}
public make_bullet_decals(id, Float:Origin[3])
{
new target, body
get_user_aiming(id, target, body, 999999)
if(is_user_alive(target))
{
if(zp_get_user_zombie(id))
{
new Float:fStart[3], Float:fEnd[3], Float:fRes[3], Float:fVel[3]
pev(id, pev_origin, fStart)
velocity_by_aim(id, 64, fVel)
fStart[0] = Origin[0]
fStart[1] = Origin[1]
fStart[2] = Origin[2]
fEnd[0] = fStart[0]+fVel[0]
fEnd[1] = fStart[1]+fVel[1]
fEnd[2] = fStart[2]+fVel[2]
new res
engfunc(EngFunc_TraceLine, fStart, fEnd, 0, target, res)
get_tr2(res, TR_vecEndPos, fRes)
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_BLOODSPRITE)
write_coord(floatround(fStart[0]))
write_coord(floatround(fStart[1]))
write_coord(floatround(fStart[2]))
write_short(Blood[0])
write_short(Blood[1])
write_byte(70)
write_byte(random_num(1,2))
message_end()
}
}
else
{
new decal = 41
if(target)
{
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_DECAL)
write_coord(floatround(Origin[0]))
write_coord(floatround(Origin[1]))
write_coord(floatround(Origin[2]))
write_byte(decal)
write_short(target)
message_end()
}
else
{
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_WORLDDECAL)
write_coord(floatround(Origin[0]))
write_coord(floatround(Origin[1]))
write_coord(floatround(Origin[2]))
write_byte(decal)
message_end()
}
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_GUNSHOTDECAL)
write_coord(floatround(Origin[0]))
write_coord(floatround(Origin[1]))
write_coord(floatround(Origin[2]))
write_short(id)
write_byte(decal)
message_end()
}
}
public InfinitySprite(id)
{
message_begin( MSG_ONE, get_user_msgid("WeaponList"), .player=id )
write_string(weapon_list_txt)
write_byte(10)
write_byte(120)
write_byte(-1)
write_byte(-1)
write_byte(1)
write_byte(1)
write_byte(CSW_INFINITY)
write_byte(0)
message_end()
}
public DefaultSprite(id)
{
message_begin( MSG_ONE, get_user_msgid("WeaponList"), .player=id )
write_string(g_weapon_entity)
write_byte(10)
write_byte(120)
write_byte(-1)
write_byte(-1)
write_byte(1)
write_byte(1)
write_byte(CSW_INFINITY)
write_byte(0)
message_end()
}
public is_valid_player(id)
{
if(!is_user_alive(id))
return false
if(!g_HasInfinity[id])
return false
return true
}
stock drop_weapons(id, dropwhat)
{
static weapons[32], num, i, weaponid
num = 0
get_user_weapons(id, weapons, num)
for (i = 0; i < num; i++)
{
weaponid = weapons[i]
if (dropwhat == 2 && ((1<<weaponid) & SECONDARY_WEAPONS_BIT_SUM))
{
static wname[32]
get_weaponname(weaponid, wname, sizeof wname - 1)
engclient_cmd(id, "drop", wname)
}
}
}
stock playanim(player,anim)
{
set_pev(player, pev_weaponanim, anim)
message_begin(MSG_ONE, SVC_WEAPONANIM, {0, 0, 0}, player)
write_byte(anim)
write_byte(pev(player, pev_body))
message_end()
}
stock fm_get_weapon_owner(weapon)
{
return get_pdata_cbase(weapon, 41, 4)
}
Помогите, при дропе оружия, не берётся дигл на "2"