- Ошибка
-
При нажатии на правую кнопку мыши идет увеличение прицела.
- ОС
- Linux
- Amx Mod X
-
AMX Mod X 1.10.0.5245 (http://www.amxmodx.org)
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Jan 24 2019 12:14:55
Built from: https://github.com/alliedmodders/amxmodx/commit/ba083de
Build ID: 5245:ba083de
Core mode: JIT+ASM32
- Билд
-
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.4.0.668-dev
Build date: 09:47:42 Sep 29 2018 (1631)
Build from: https://github.com/dreamstalker/rehlds/commit/89be216
- ReGamedll
-
ReGameDLL version: 5.7.0.322-dev
Build date: 11:41:14 Jan 13 2019
- Версия Metamod
-
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 17:47:54 Aug 24 2018
- Список метамодулей
-
[ 1] Reunion RUN - reunion_mm_i386.so v0.1.75 ini Start Never
[ 2] AMX Mod X RUN - amxmodx_mm_i386.so v1.10.0.5245 ini Start ANY
[ 3] Revoice RUN - revoice_mm_i386.so v0.1.0.32 ini Start Never
[ 4] POD-Bot mm RUN - podbot_mm_i386.so vV3B22 ini Chlvl ANY
[ 5] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 6] Rechecker RUN - rechecker_mm_i386.so v2.5 ini Chlvl ANY
[ 7] WHBlocker RUN - whblocker_mm_i386.so v1.5.696 ini Chlvl ANY
[ 8] MySQL RUN - mysql_amxx_i386.so v1.10.0.5245 pl2 ANY ANY
[ 9] SQLite RUN - sqlite_amxx_i386.so v1.10.0.5245 pl2 ANY ANY
[10] Fun RUN - fun_amxx_i386.so v1.10.0.5245 pl2 ANY ANY
[11] Engine RUN - engine_amxx_i386.so v1.10.0.5245 pl2 ANY ANY
[12] FakeMeta RUN - fakemeta_amxx_i386.so v1.10.0.5245 pl2 ANY ANY
[13] GeoIP RUN - geoip_amxx_i386.so v1.10.0.5245 pl2 ANY ANY
[14] CStrike RUN - cstrike_amxx_i386.so v1.10.0.5245 pl2 ANY ANY
[15] CSX RUN - csx_amxx_i386.so v1.10.0.5245 pl2 ANY ANY
[16] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.10.0.5245 pl2 ANY ANY
[17] ReAPI RUN - reapi_amxx_i386.so v5.8.0.163-dev pl2 ANY Never
17 plugins, 17 running
- Список плагинов
-
[ 1] AMXBans: Core MA 1.6.5 Larte Team amxbans_core.am running
[ 2] AMXBans: Main MA 1.6.5 Larte Team amxbans_main.am running
[ 3] Admin Commands 1.10.0.524 AMXX Dev Team admincmd.amxx running
[ 4] Private Message 0.6 Denzer pm.amxx running
[ 5] Permanent message 1.0 He3aBuCuM permanent_messa running
[ 6] AMXMODMENU NEW 1.0 Nisko amxmodmenu_new. running
[ 7] Commands Menu 1.10.0.524 AMXX Dev Team cmdmenu.amxx running
[ 8] Players Menu 1.10.0.524 AMXX Dev Team plmenu.amxx running
[ 9] Maps Menu 1.10.0.524 AMXX Dev Team mapsmenu.amxx running
[ 10] Plugin Menu 1.10.0.524 AMXX Dev Team pluginmenu.amxx running
[ 11] Admin Chat 1.10.0.524 AMXX Dev Team adminchat.amxx running
[ 12] Anti Flood 1.10.0.524 AMXX Dev Team antiflood.amxx running
[ 13] Admin Votes 1.10.0.524 AMXX Dev Team adminvote.amxx running
[ 14] Advert Messages 1.22 neygomon adverts.amxx running
[ 15] AntiAd 0.1 Mati antiad.amxx running
[ 16] Anti Reklama 1.1 MarcaD anti_reklama.am running
[ 17] AES: StatsX 0.5.9 [REA serfreeman1337/s aes_statsx_cstr running
[ 18] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx debug
[ 19] AES: Informer 0.5 Vega serfreeman1337 aes_informer.am running
[ 20] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
[ 21] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 22] AES: Bonus System 0.5.9 Vega serfreeman1337/s aes_bonus_syste running
[ 23] AES: Bonus CSTRIKE 0.5.8 Vega serfreeman1337/s aes_bonus_cstri running
[ 24] AES: Status Info 0.1 serfreeman1337 aes_status_info running
[ 25] AES Bonus: Flags 0.1 Sonyx aes_bonus_flags running
[ 26] Pause Plugins 1.10.0.524 AMXX Dev Team pausecfg.amxx running
[ 27] Stats Configuration 1.10.0.524 AMXX Dev Team statscfg.amxx running
[ 28] unknown unknown unknown b_o_mk4.amxx running
[ 29] unknown unknown unknown b_o_deagle.amxx running
[ 30] Grenade Trail 1.0 Jim gren.amxx running
[ 31] HS Sound 2.5 Sutar head.amxx running
[ 32] 'Fire in the hole' blo 1.0 xPaw hidefireintheho running
[ 33] Real Damage [ReApi] 1.0 Leo_[BH] real_damage_rea running
[ 34] WelcomeMusic 1.0 My_StyLe^ wcm_music.amxx running
[ 35] [ReAPI] No Team Flash 0.0.2 Vaqtincha no_team_flash.a running
[ 36] Kills Counter 0.3 serfreeman1337 kills_counter.a running
[ 37] Deathtype Effects 1.0 anakin_cstrike deathtype_effec running
[ 38] Auto recording demo 2.0 IzI | Bonaqua (R amx_autodemorec running
[ 39] MultiJump 1.1 twistedeuphoria multijump.amxx running
[ 40] Parachute Lite [ReAPI] 11.0 Leo_[BH] parachute_lite. running
[ 41] Unlimited ChooseTeam ( 1.0 ConnorMcLeod & p live_to_spec.am running
[ 42] ReCSDM Team Balance 1.0.3 the_hunter recsdm_team_bal running
[ 43] Lite Admin ESP 1.0 neygomon admin_esp.amxx running
[ 44] resetscore(ReAPI) 1.0 Phantom resetscore.amxx running
- Автор плагина
- fantom
- Версия плагина
- 1
- Исходный код
-
#include <amxmodx>
#include <hamsandwich>
#include <reapi>
new const M4_V_MODEL[] = "models/B_O/v_m4a1.mdl";
new const M4_P_MODEL[] = "models/B_O/p_m4a1.mdl";
#define WEAPON_DAMAGE 1.5 // Множитель урона. Закоментировать если не нужно
#define WEAPON_UID 1
public plugin_init() {
register_clcmd("blm4", "cmdGoldenM4");
RegisterHam(Ham_Item_Deploy, "weapon_m4a1", "HookItemDeploy", 1);
RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_m4a1", "HookSecondaryAttack", 0);
}
public plugin_precache() {
precache_model(M4_V_MODEL);
precache_model(M4_P_MODEL);
precache_sound("weapons/zoom.wav");
}
public cmdGoldenM4(id) {
if (is_user_alive(id)) {
new weapon = rg_give_custom_item(id, "weapon_m4a1", GT_DROP_AND_REPLACE, WEAPON_UID);
if (!is_nullent(weapon)) {
rg_set_user_bpammo(id, WEAPON_M4A1, 90)
set_member(weapon, m_Weapon_bHasSecondaryAttack, true);
client_print_color(id, print_team_red, "^1[^4Элитный Магазин^1] Вы купили ^3Мясорубка");
}
#if defined WEAPON_DAMAGE
set_member(weapon, m_Weapon_flBaseDamage, Float:get_member(weapon, m_Weapon_flBaseDamage) * WEAPON_DAMAGE);
#endif
}
return PLUGIN_HANDLED_MAIN;
}
public HookItemDeploy(const weapon) {
if (get_entvar(weapon, var_impulse) == WEAPON_UID) {
new id = get_member(weapon, m_pPlayer);
set_entvar(id, var_viewmodel, M4_V_MODEL);
set_entvar(id, var_weaponmodel, M4_P_MODEL);
}
}
public HookSecondaryAttack(const weapon) {
if (get_entvar(weapon, var_impulse) != WEAPON_UID) {
return HAM_IGNORED;
}
set_member(weapon, m_Weapon_flNextSecondaryAttack, 0.3);
new id = get_member(weapon, m_pPlayer);
if (get_member(id, m_iFOV) == 90) {
set_member(id, m_iFOV, 55);
emit_sound(id, CHAN_ITEM, "weapons/zoom.wav", 0.20, 2.40, 0, 100);
} else {
set_member(id, m_iFOV, 90);
}
return HAM_SUPERCEDE;
}
Здравствуйте. Вообщем даже совестно обращаться но что то не могу догнать. При нажатии на правую кнопку мыши прицел увеличиваеться у всех оружий. там ака, дигл и мк. Правда не проверил на авп как это выглядит. Хотелось бы профиксить функцию. Ну и если что если есть недочеты поправьте меня.
Код:
#include <amxmodx>
#include <hamsandwich>
#include <reapi>
new const DG_V_MODEL[] = "models/B_O/v_deagle.mdl";
new const DG_P_MODEL[] = "models/B_O/p_deagle.mdl";
#define WEAPON_DAMAGE 1.5 // Множитель урона. Закоментировать если не нужно
#define WEAPON_UID 1
public plugin_init() {
register_clcmd("bldg", "cmdGoldenDg");
RegisterHam(Ham_Item_Deploy, "weapon_deagle", "HookItemDeploy", 1);
RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_deagle", "HookSecondaryAttack", 0);
}
public plugin_precache() {
precache_model(DG_V_MODEL);
precache_model(DG_P_MODEL);
precache_sound("weapons/zoom.wav");
}
public cmdGoldenDg(id) {
if (is_user_alive(id)) {
new weapon = rg_give_custom_item(id, "weapon_deagle", GT_DROP_AND_REPLACE, WEAPON_UID);
if (!is_nullent(weapon)) {
rg_set_user_bpammo(id, WEAPON_DEAGLE, 90)
set_member(weapon, m_Weapon_bHasSecondaryAttack, true);
client_print_color(id, print_team_red, "^1[^4Элитный Магазин^1] Вы купили ^3Кровавая пуля");
}
#if defined WEAPON_DAMAGE
set_member(weapon, m_Weapon_flBaseDamage, Float:get_member(weapon, m_Weapon_flBaseDamage) * WEAPON_DAMAGE);
#endif
}
return PLUGIN_HANDLED_MAIN;
}
public HookItemDeploy(const weapon) {
if (get_entvar(weapon, var_impulse) == WEAPON_UID) {
new id = get_member(weapon, m_pPlayer);
set_entvar(id, var_viewmodel, DG_V_MODEL);
set_entvar(id, var_weaponmodel, DG_P_MODEL);
}
}
public HookSecondaryAttack(const weapon) {
if (get_entvar(weapon, var_impulse) != WEAPON_UID) {
return HAM_IGNORED;
}
set_member(weapon, m_Weapon_flNextSecondaryAttack, 0.3);
new id = get_member(weapon, m_pPlayer);
if (get_member(id, m_iFOV) == 90) {
set_member(id, m_iFOV, 55);
emit_sound(id, CHAN_ITEM, "weapons/zoom.wav", 0.20, 2.40, 0, 100);
} else {
set_member(id, m_iFOV, 90);
}
return HAM_SUPERCEDE;
}
В этой теме было размещено решение! Перейти к решению.