на linux у оружия бесконечные патроны

Сообщения
552
Реакции
49
Предупреждения
2
Помог
4 раз(а)
Ошибка
на linux у оружия бесконечные патроны хотя на windows они не бесконечные
ОС
Linux
Amx Mod X
19:11:26 AMX Mod X 1.9.0.5249 (http://www.amxmodx.org)
Authors:
<TAB>David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
<TAB>Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
<TAB>Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
<TAB>Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Jun 19 2019 13:31:53
Built from: https://github.com/alliedmodders/amxmodx/commit/6cecb34
Build ID: 5249:6cecb34
Core mode: JIT+ASM32
Билд
19:11:42 Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.8.0.709-dev+m
Build date: 08:40:10 Feb 22 2021 (2508)
Build from: https://github.com/dreamstalker/rehlds/commit/dc75d82
ReGamedll
19:11:55 ReGameDLL version: 5.20.0.505-dev
Build date: 11:06:14 Apr 17 2021
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/e86284b
Версия Metamod
19:12:06 Metamod v1.21p37  2013/05/30 (5:13)
by Will Day
http://www.metamod.org/
Patch: Metamod-P (mm-p) v37
by Jussi Kivilinna
http://metamod-p.sourceforge.net/
compiled: May 30 2013, 11:41:16 EET (optimized)
Список метамодулей
19:12:22 Currently loaded plugins:
description stat pend file vers src load unlod
[ 1] SafeNameAndChat RUN - SafeNameAndChat. v1.1 ini ANY ANY
[ 2] Reunion RUN - reunion_mm_i386. v0.1.0.9 ini Start Never
[ 3] ReAuthCheck RUN - reauthcheck_mm_i v0.1.6 ini Start Never
[ 4] VoiceTranscoder RUN - VoiceTranscoder. v2017RC4 ini ANY ANY
[ 5] AMX Mod X RUN - amxmodx_mm_i386. v1.9.0.5 ini Start ANY
[ 6] Rechecker RUN - rechecker_mm_i38 v2.5 ini Chlvl ANY
[ 7] WHBlocker RUN - whblocker_mm_i38 v1.5.696 ini Chlvl ANY
[ 8] ReSemiclip RUN - resemiclip_mm_i3 v2.3.9 ini Chlvl ANY
[ 9] Ultimate Unprec RUN - unprecacher_i386 vBeta 2. ini Chlvl Chlvl
[10] CStrike RUN - cstrike_amxx_i38 v1.9.0.5 pl5 ANY ANY
[11] CSX RUN - csx_amxx_i386.so v1.9.0.5 pl5 ANY ANY
[12] Fun RUN - fun_amxx_i386.so v1.9.0.5 pl5 ANY ANY
[13] FakeMeta RUN - fakemeta_amxx_i3 v1.9.0.5 pl5 ANY ANY
[14] Ham Sandwich RUN - hamsandwich_amxx v1.9.0.5 pl5 ANY ANY
[15] GeoIP RUN - geoip_amxx_i386. v1.9.0.5 pl5 ANY ANY
[16] MySQL RUN - mysql_amxx_i386. v1.9.0.5 pl5 ANY ANY
[17] SQLite RUN - sqlite_amxx_i386 v1.9.0.5 pl5 ANY ANY
[18] Engine RUN - engine_amxx_i386 v1.9.0.5 pl5 ANY ANY
[19] ReAPI RUN - reapi_amxx_i386. v5.19.0. pl5 ANY Never
[20] ReAimDetector RUN - reaimdetector_am v0.2.2 pl5 ANY Never
[21] Orpheu RUN - orpheu_amxx_i386 v2.6.3 pl5 ANY ANY
21 plugins, 21 running
Список плагинов
Currently loaded plugins:
name version author file status
[ 1] Map Manager 2.5.60 Mistrick mapmanager.amxx running
[ 2] mute 1.0 Aziz xman2030_mute.a running
[ 3] Admin Base 1.9.0.5249 AMXX Dev Team admin.amxx running
[ 4] Admin Commands 1.9.0.5249 AMXX Dev Team admincmd.amxx running
[ 5] Admin Help 1.9.0.5249 AMXX Dev Team adminhelp.amxx running
[ 6] Slots Reservation 1.9.0.5249 AMXX Dev Team adminslots.amxx running
[ 7] Multi-Lingual System 1.9.0.5249 AMXX Dev Team multilingual.am running
[ 8] Commands Menu 1.9.0.5249 AMXX Dev Team cmdmenu.amxx running
[ 9] Players Menu 1.9.0.5249 AMXX Dev Team plmenu.amxx running
[ 10] Teleport Menu 1.9.0.5249 AMXX Dev Team telemenu.amxx running
[ 11] Maps Menu 1.9.0.5249 AMXX Dev Team mapsmenu.amxx running
[ 12] Plugin Menu 1.9.0.5249 AMXX Dev Team pluginmenu.amxx running
[ 13] Admin Chat 1.9.0.5249 AMXX Dev Team adminchat.amxx running
[ 14] Anti Flood 1.9.0.5249 AMXX Dev Team antiflood.amxx running
[ 15] Admin Votes 1.9.0.5249 AMXX Dev Team adminvote.amxx running
[ 16] Pause Plugins 1.9.0.5249 AMXX Dev Team pausecfg.amxx running
[ 17] Stats Configuration 1.9.0.5249 AMXX Dev Team statscfg.amxx running
[ 18] StatsX 1.9.0.5249 AMXX Dev Team statsx.amxx running
[ 19] Ultimate Gore 1.6 JTP10181 amx_gore_ultima running
[ 20] TimeLeft 1.9.0.5249 AMXX Dev Team timeleft.amxx running
[ 21] Advanced Weapon Tracer 1.3.0 ConnorMcLeod advanced_weapon running
[ 22] NextMap 1.9.0.5249 AMXX Dev Team nextmap.amxx stopped
[ 23] POD-Bot Menu 1.3 g4s|figurE.09 amxx_podbotmenu running
[ 24] Game Namer 1.1 NeuroToxin gamenamechanger running
[ 25] Precache Management 1.0.0 ConnorMcLeod precache_manage stopped
[ 26] Advert Messages 1.2 neygomon adverts.amxx running
[ 27] Fix Remove Entity When zm zm zp_entityfix.am paused
[ 28] ScreenMaker 1.1 neygomon screen_maker.am running
[ 29] fb_forwards 0.1.8 Mazdan & Neugomo fb_forwards.amx running
[ 30] FreshBans 1.4.0b kanagava fresh_bans_1.4. running
[ 31] Menus Front-End 1.5 neugomon menufront_end.a running
[ 32] AMXX Gag 1.4.9 xPaw & Exolent amx_gag.amxx running
[ 33] motd 1.1 L@NPOC@N motd.amxx running
[ 34] unknown unknown unknown warnings.amxx bad load
[ 35] Anti Reklama 1.1 MarcaD anti_reklama.am running
[ 36] unknown unknown unknown health_nade.amx bad load
[ 37] SpecList 1.2a FatalisDK speclist_rus.am running
[ 38] DemoRecoder 1.2 neygomon demorecoder.amx running
[ 39] AFK Manager 1.2 Xramer afk_manager.amx paused
[ 40] Chat Logger 2.1a Jim chat_logger.amx running
[ 41] Zombie Escape 1337 xman2030 xman2030_ze_mod debug
[ 42] [ZP]Level System 6.0 Dambas xman2030_level. running
[ 43] Camera View 0.0.1 ConnorMcLeod talrasha_camera debug
[ 44] [ZE] ZClass: Hunter 1.0 KOBRA / t3rkecor xman2030_speed. running
[ 45] [ZP] Class : Frank 1.0 tumoxa xman2030_pc.amx running
[ 46] [CSO Like] ZClass: Yak 0.2 | 30.0 inf xman2030_sasha. running
[ 47] [ZP Class] Flying Zomb 0.1 ONYX xman2030_flying running
[ 48] ZP Class Energy Ball(T 2.1 Jim/tERoR edit/O xman2030_tesla. running
[ 49] [CSO] Class String Fin 2.0 BLACK_ROSE zp_class_finger running
[ 50] Undertaker 1.0 DSHGFHDS zp_undertaker.a debug
[ 51] NST Zombie Class Heal 1.0 NST NST_ZbClass_Hea running
[ 52] unknown unknown unknown azp_zclass_sire running
[ 53] [CSO:Heavy Zombie] 1.1 REDEMAX cso_heavy.amxx running
[ 54] CSO Lusty Rose 1.0.1 ALBTeam zp_class_LustyR running
[ 55] [CSO:Hunter Zombie] 1.2 HoRRoR/tERoR edi zp_china.amxx running
[ 56] [ZP] Zombie Class: Des 2.0 Re.Act!ve zp_zclass_despe running
[ 57] DJB Zombie Class Banch 2.0.9 Csoldjb&wbyokomo witch_test_7.am running
[ 58] [ZP] Zclass : Zombie R 1.0 The_Thing zp_zclass_regen running
[ 59] [ZPNM] Nemesis Scream 1.1 D i 5 7 i n c T, zpnm_extra_neme running
[ 60] ZM VIP 1.7.2 aaarnas xman2030_vip.am running
[ 61] [FS] Chat 1.1 Inf xman2030_chat.a running
[ 62] Heli Button Info 1.0 Shanks' xman2030_showes running
[ 63] [ZP] EASY SAVE AMMO 1.2 CS-FADE.RU xman2030_ammo_a running
[ 64] [ZP] Addon: Win Models 0.1 CS-FADE.RU xman2030_ze_amo debug
[ 65] [ZP Addon] Knives 0.1 ONYX xman2030_knifes running
[ 66] [ZP] Admin Lvl Menu 1.0 Dambas xman2030_level_ running
[ 67] ZE HUD Final CS-FADE.RU xman2030_ze_hud running
[ 68] NadeModes 11.2 Nomexous & OT xman2030_nademo running
[ 69] [ZP] ZP++ Ice Cube 1.0 DareDevil (Gyiov xman2030_ice_cu running
[ 70] Weapon Model + Sound R 1.2 GHW_Chronic GHW_Weapon_Repl running
[ 71] xman2030_damager CS-FADE.RU CS-FADE.RU xman2030_damage running
[ 72] ZP: Zombie Health 1.0 Yakess yakess_health.a debug
[ 73] Countdown 1.7.3 T a l R a s h a gameplay_countd running
[ 74] [ZP] Addon: Round Lead 1.1 xUnicorn zp_addon_round_ running
[ 75] Automatic Unstuck 1.5 NL)Ramon(NL Auto_Unstuck.am paused
[ 76] ammo donate/dhud 1.5 user/zobie-dead zp_ammo_donate. running
[ 77] Team Locker 1.5 Bmann_420 teamlocker.amxx running
[ 78] xman2030_cons CS-FADE.RU CS-FADE.RU xman2030_cons.a running
[ 79] xman2030_aura CS-FADE.RU CS-FADE.RU xman2030_aura.a running
[ 80] xman2030_blood CS-FADE.RU CS-FADE.RU xman2030_blood. running
[ 81] ZP Reloading! Shout 0.0.1 xPaw,wbyokomo reloading_weapo running
[ 82] [ZP] Addon: Weather 0.1 | 30.0 inf / xman2030 xman2030_weathe running
[ 83] unknown unknown unknown xman2030_leader running
[ 84] [ZP] Shoot Light 0.1 | 11.0 inf xman2030_shot_l running
[ 85] [ZP] Round ended effec 1.0 *GEORGE* xman2030_ended_ running
[ 86] [ZP] Round Draw Blast 1.0 MeRcyLeZZ xman2030_round_ running
[ 87] [ ZP ] Nemesis skill Shurik07 0.1 1zp_nemskill.am running
[ 88] ZP Round Results 1.0 MonsteR zp_round_result running
[ 89] [ZPNM] Human Idle Soun 1.0.2 D i 5 7 i n c T zpnm_gp_human_i running
[ 90] [ZPNM] Multi HUD Info 1.1.9 schmurgel1983, D zpnm_gp_multi_h running
[ 91] [CS] Ham Hooks for Bot 1.0 WiLS cs_ham_bots_api running
[ 92] [ZPNM] Descriptive 'Fi 0.1.1 VEN, Hezerf(Neme zpnm_gp_dfith.a running
[ 93] [ZPNM] Flashlight Fix 1.0.8 ConnorMcLeod, sc zpnm_gp_flashli running
[ 94] [ZP] CZ Bot Helper 1.0 @bdul! zp_cz_bot_helpe running
[ 95] [ZP] CZ Bot Nade Helpe 1.0 @bdul! zp_cz_bot_nade_ running
[ 96] Team Join Management 0.3 Exolent xman2030_autojo running
[ 97] Menu_Priv 1.0 CS-FADE.RU xman2030_menu_p running
[ 98] [ZP] VIP menu 1.2 CS-FADE.RU xman2030_vip_me running
[ 99] [ZP] VIP menu 1.2 CS-FADE.RU xman2030_deluxe running
[100] [ZP] VIP menu 1.2 CS-FADE.RU xman2030_creato debug
[101] ammo paki 4.0 Bagamut xman2030_ammo_m running
[102] unknown unknown unknown xman2030_lk.amx running
[103] [ZP] Extra Item: Jump 1.0 Opo4uMapy xman2030_ze_jum debug
[104] [ZP] Extra Item Speed 1.2 MeRcyLeZZ zp_extra_speed_ running
[105] unknown unknown unknown xman2030_buy_hp running
[106] Janus 1 1.0 m4m3ts xman2030_janus1 running
[107] [CSO LIKE] Extra: Gull 1.0 Lakerovich xman2030_bloodr running
[108] [Zombie Plague] Weapon 0.7 PlaneShfit1231 / zp_extra_rpg7.a running
[109] [ZP] Extra: CSO Weapon 1.0 KORD_12.7 xman2030_m3.amx running
[110] [ZP] Weapon: M32 1.0 PbI)I(Uu' / Batc xman2030_m32.am running
[111] [ZP] Extra: CSO ClayMo 1.0 TemplateAuthor:K xman2030_Claymo running
[112] [ZP] Air Strike 1.0 Dorus xman2030_air_st running
[113] [CSO LIKE] LaserMG 1.1 Lakerovich cso_weapon_lase running
[114] Janus-11 1.0 m4m3ts zp_extra_janus1 running
[115] [ZP] Extra: HK416 1.0 Crock / =) (Popr yt_extra_janus1 running
[116] Rail Cannon 1.0 m4m3ts zp_extra_railca running
[117] [ZP] Weapon: Shining H 1.0 xUnicorn (t3rkec zp_weapon_magic running
[118] Extraitems: Water Pist 1.0 Base: Batcon & x zp_extraitems_w running
[119] [ZMO] Extra-Item: Skul 1.0 Mr.Kot3 zmo_weapon_skul running
[120] [ZP] Weapon: DInfinity 1.0 -- zp_weapon_duali running
[121] [ZP] Extra: m134ex 1.0 LARS-DAY[BR]EAKE zp_weapon_m134e running
[122] Extraitems: Oz Lion Pi 1.0 Base: Batcon & x zp_extraitems_o running
[123] [ZP] Extra item: Aeoli 1.0 m4m3ts zp_extra_aeolis running
[124] [ZP] Weapon: Salamande 1.0 xUnicorn (t3rkec zp_weapon_flame running
[125] [ZP] Extra: Squeak Gre 1.0.6-wwm Arkshine zp_extra_squeak running
[126] Zombie Plague extra it 1.3 Sonic Son'edit zp_extra_radar. running
[127] [ZM] Choose Weapon 1.6.1 t3rkecorejz | Un xman2030_menu_w running
[128] HUINYA HUINYA HUINYA xman2030_def_we running
[129] [ZP] Extra: Anaconda 1.0 Crock / =) (Popr xman2030_anacon running
[130] [ZP] Extra: CSO Weapon 1.0 KORD_12.7 xman2030_Vulcan running
[131] [ZP] Extra: CSO Weapon 1.0 KORD_12.7 xman2030_Sapien running
[132] [ZP] Extra: M1887 1.0 Crock / =) (Popr xman2030_m1887. running
[133] [ZMO]Weapon: Cyclone 1.0 Base: Batcon; Re xman2030_cyclon running
[134] [ZP] Weapon: Shining H 1.0 xUnicorn (t3rkec xman2030_magicm running
[135] [CSO] Ethereal 0.0.1 Shurik07 xman2030_ethere running
( 34) Load fails: Invalid Plugin (plugin "warnings.amxx")
( 36) Load fails: Module/Library "curl" required for plugin. Check modules.ini.
135 plugins, 128 running
Автор плагина
PbI)I(Uu' / Batcon: Code base
Версия плагина
1.0
Исходный код
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <zombieplague>
#include <xs>
#include <engine>
#define CustomItem(%0) (pev(%0, pev_impulse) == WEAPON_SPECIAL_CODE)

#define PDATA_SAFE 2

#define WEAPON_ANIM_IDLE 0
#define WEAPON_ANIM_SHOOT random_num(1,2)
#define WEAPON_ANIM_INSERT 3
#define WEAPON_ANIM_DRAW 6
#define WEAPON_ANIM_AFTER 4
#define WEAPON_ANIM_BEFORE 5
// From model: Frames/FPS
#define WEAPON_ANIM_IDLE_TIME 2/16.0
#define WEAPON_ANIM_SHOOT_TIME 2.0/20.0
#define WEAPON_ANIM_DRAW_TIME 1.0

#define WEAPON_SPECIAL_CODE 79483166
#define WEAPON_REFERENCE "weapon_m3"
#define WEAPON_ITEM_NAME "weapon_m3"
#define WEAPON_ITEM_COST 0

#define WEAPON_MODEL_VIEW "models/v_m32.mdl"
#define WEAPON_MODEL_PLAYER "models/p_m32.mdl"
#define WEAPON_MODEL_WORLD "models/w_m32.mdl"

#define WEAPON_BODY 0

//Настройки
#define RADIUS_DMG 300.0 //Максимальный радиус для взрыва
#define DMG_EXP 450.0 //Максимальный дамаг (при таком значении в среднем будет 280)
#define DISTANCE 1200 //Расстояние выстрела без прицела
#define DISTANCE_ZOOM 1400 //Расстояние выстрела с прицелом
#define WEAPON_MAX_CLIP 6 //Ля, ребят не эксперементировал, лучше не трогать.(патроны)
#define WEAPON_DEFAULT_AMMO 18 //Ля, ребят эксперементировал, можете трогать.(боезапас)
#define SPEED 1.0 //Скорость выстрела без зума
#define SPEED_ZOOM 0.7 //Скорость выстрела с зумом

// Linux extra offsets
#define linux_diff_weapon 4
#define linux_diff_player 5

// CWeaponBox
#define m_rgpPlayerItems_CWeaponBox 34

// CBaseAnimating
#define m_flLastEventCheck 38

// CBasePlayerItem
#define m_pPlayer 41
#define m_pNext 42
#define m_iId 43

// CBasePlayerWeapon
#define m_flNextPrimaryAttack 46
#define m_flNextSecondaryAttack 47
#define m_flTimeWeaponIdle 48
#define m_iPrimaryAmmoType 49
#define m_iClip 51
#define m_fInReload 54
#define m_fInSpecialReload 55
#define m_iWeaponState 74

// CBaseMonster
#define m_flNextAttack 83

// CBasePlayer
#define m_iFOV 363
#define m_rpgPlayerItems 367
#define m_pActiveItem 373
#define m_rgAmmo 376
#define OFFSET_AMMO_M3 381
new const GRENADE_MODEL[] = "models/grenade.mdl"
new const GRENADE_TRAIL[] = "sprites/laserbeam.spr"
new const GRENADE_EXPLOSION[] = "sprites/zerogxplode.spr"
//#define weapon_list_txt "weapon_m32"
new const Sounds[][]=
{
"weapons/m32-1.wav"
}
new const weapon_list_sprites[][]=
{
"sprites/640hud75.spr",
"sprites/640hud7.spr"
}

new g_iszAllocString_Entity,
g_iszAllocString_ModelView,
g_iszAllocString_ModelPlayer,
g_iItemID,
sTrail,
sExplo

public plugin_init()
{
register_plugin("[ZP] Weapon: M32", "1.0", "PbI)I(Uu' / Batcon: Code base");

//g_iItemID = zp_register_extra_item(WEAPON_ITEM_NAME, WEAPON_ITEM_COST, ZP_TEAM_HUMAN);
register_forward(FM_UpdateClientData, "FM_Hook_UpdateClientData_Post", true);
register_forward(FM_SetModel, "FM_Hook_SetModel_Pre", false);
RegisterHam(Ham_Killed, "player", "M32_Killed", 1)
RegisterHam(Ham_Spawn, "player", "CPlayer__Spawn_Post", true);
RegisterHam(Ham_Item_Holster, WEAPON_REFERENCE, "CWeapon__Holster_Post", true);
RegisterHam(Ham_Item_Deploy, WEAPON_REFERENCE, "CWeapon__Deploy_Post", true);
RegisterHam(Ham_Item_PostFrame, WEAPON_REFERENCE, "CWeapon__PostFrame_Pre", false);
RegisterHam(Ham_Weapon_Reload, WEAPON_REFERENCE, "M32_ReloadP", true)
RegisterHam(Ham_Weapon_PrimaryAttack, WEAPON_REFERENCE, "CWeapon__PrimaryAttack_Pre", false);
RegisterHam(Ham_Weapon_PrimaryAttack, WEAPON_REFERENCE, "M32_Attackp", true);
}

public plugin_precache()
{
engfunc(EngFunc_PrecacheModel, WEAPON_MODEL_VIEW);
engfunc(EngFunc_PrecacheModel, WEAPON_MODEL_PLAYER);
engfunc(EngFunc_PrecacheModel, WEAPON_MODEL_WORLD);
precache_generic( "sprites/scope_vip_grenade.spr" )
sTrail = precache_model(GRENADE_TRAIL)
sExplo = precache_model(GRENADE_EXPLOSION)
new tmp[128]
for(new i; i<=charsmax(Sounds); i++)
{
precache_sound(Sounds[i]);
}
UTIL_PrecacheSoundsFromModel(WEAPON_MODEL_VIEW);
// Other
g_iszAllocString_Entity = engfunc(EngFunc_AllocString, WEAPON_REFERENCE);
g_iszAllocString_ModelView = engfunc(EngFunc_AllocString, WEAPON_MODEL_VIEW);
g_iszAllocString_ModelPlayer = engfunc(EngFunc_AllocString, WEAPON_MODEL_PLAYER);
}

// [ Amxx ]
#if AMXX_VERSION_NUM < 183
public client_disconnect(iPlayer)
#else
public client_disconnected(iPlayer)
#endif
{
UTIL_SetRendering(iPlayer);
set_pev(iPlayer, pev_iuser2, 0);
}

public weapon_list_m32(id) client_cmd(id,WEAPON_REFERENCE)
public zp_extra_item_selected(iPlayer, iItem)
{
if(iItem == g_iItemID)
Command_GiveWeapon(iPlayer);
}

public plugin_natives()
{
register_native("Get_m32", "NativeGiveWeapon", 1)
}

public NativeGiveWeapon(iPlayer)
{
Command_GiveWeapon(iPlayer);
}

public Command_GiveWeapon(iPlayer)
{
static iEntity; iEntity = engfunc(EngFunc_CreateNamedEntity, g_iszAllocString_Entity);
if(iEntity <= 0) return 0;

set_pev(iEntity, pev_impulse, WEAPON_SPECIAL_CODE);
ExecuteHam(Ham_Spawn, iEntity);
UTIL_DropWeapon(iPlayer, 1);

if(!ExecuteHamB(Ham_AddPlayerItem, iPlayer, iEntity))
{
set_pev(iEntity, pev_flags, pev(iEntity, pev_flags) | FL_KILLME);
return 0;
}
set_pdata_float(iPlayer, m_flNextAttack, WEAPON_ANIM_DRAW_TIME, linux_diff_player);
ExecuteHamB(Ham_Item_AttachToPlayer, iEntity, iPlayer);
set_pdata_int(iEntity, m_iClip, WEAPON_MAX_CLIP, linux_diff_weapon);
message_begin(MSG_ONE, get_user_msgid("HideWeapon"), _, iPlayer);
write_byte(1 << 6);
message_end();
static iAmmoType; iAmmoType = m_rgAmmo + get_pdata_int(iEntity, m_iPrimaryAmmoType, linux_diff_weapon);
if(get_pdata_int(iPlayer, m_rgAmmo, linux_diff_player) < WEAPON_DEFAULT_AMMO)
set_pdata_int(iPlayer, iAmmoType, WEAPON_DEFAULT_AMMO, linux_diff_player);
set_pdata_int(iPlayer, m_iFOV, 89, linux_diff_player)
emit_sound(iPlayer, CHAN_ITEM, "items/gunpickup2.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM);
return 1;
}
// [ Fakemeta ]
public FM_Hook_UpdateClientData_Post(iPlayer, SendWeapons, CD_Handle)
{
if(!is_user_alive(iPlayer)) return;

static iItem; iItem = get_pdata_cbase(iPlayer, m_pActiveItem, linux_diff_player);
if(pev_valid(iItem) != PDATA_SAFE || !CustomItem(iItem)) return;

set_cd(CD_Handle, CD_flNextAttack, get_gametime() + 0.001);
}

public FM_Hook_SetModel_Pre(iEntity)
{
static i, szClassName[32], iItem;
pev(iEntity, pev_classname, szClassName, charsmax(szClassName));

if(!equal(szClassName, "weaponbox")) return FMRES_IGNORED;

for(i = 0; i < 6; i++)
{
iItem = get_pdata_cbase(iEntity, m_rgpPlayerItems_CWeaponBox + i, linux_diff_weapon);

if(iItem > 0 && CustomItem(iItem))
{
engfunc(EngFunc_SetModel, iEntity, WEAPON_MODEL_WORLD);
set_pev(iEntity, pev_body, WEAPON_BODY);

return FMRES_SUPERCEDE;
}
}

return FMRES_IGNORED;
}

// [ HamSandwich ]
public CPlayer__Spawn_Post(iPlayer)
{
if(!is_user_connected(iPlayer)) return;

UTIL_SetRendering(iPlayer);
set_pev(iPlayer, pev_iuser2, 0);
}

public CWeapon__Holster_Post(iItem)
{
if(!CustomItem(iItem)) return;
static iPlayer; iPlayer = get_pdata_cbase(iItem, m_pPlayer, linux_diff_weapon);

set_pdata_float(iItem, m_flNextPrimaryAttack, 0.0, linux_diff_weapon);
set_pdata_float(iItem, m_flNextSecondaryAttack, 0.0, linux_diff_weapon);
set_pdata_float(iItem, m_flTimeWeaponIdle, 0.0, linux_diff_weapon);
set_pdata_float(iPlayer, m_flNextAttack, 0.0, linux_diff_player);
message_begin(MSG_ONE, get_user_msgid("HideWeapon"), _, iPlayer);
write_byte(0);
message_end();
set_pdata_int(iPlayer, m_iFOV, 90, linux_diff_player)
set_pdata_int(iItem, m_fInSpecialReload, 0, linux_diff_weapon)
}

public CWeapon__Deploy_Post(iItem)
{
if(!CustomItem(iItem)) return;
static iPlayer; iPlayer = get_pdata_cbase(iItem, m_pPlayer, linux_diff_weapon);
set_pev_string(iPlayer, pev_viewmodel2, g_iszAllocString_ModelView);
set_pev_string(iPlayer, pev_weaponmodel2, g_iszAllocString_ModelPlayer);
message_begin(MSG_ONE, get_user_msgid("HideWeapon"), _, iPlayer);
write_byte(1 << 6);
message_end();
set_pdata_int(iPlayer, m_iFOV, 89, linux_diff_player)
UTIL_SendWeaponAnim(iPlayer, WEAPON_ANIM_DRAW);
set_pdata_float(iPlayer, m_flNextAttack, WEAPON_ANIM_DRAW_TIME, linux_diff_player);
set_pdata_float(iItem, m_flTimeWeaponIdle, WEAPON_ANIM_DRAW_TIME, linux_diff_weapon);
}

public CWeapon__PostFrame_Pre(iItem)
{
if(!CustomItem(iItem)) return HAM_IGNORED;
static id; id = get_pdata_cbase(iItem, m_pPlayer, linux_diff_weapon);
static iClip; iClip = get_pdata_int(iItem, m_iClip, linux_diff_weapon)
static fInReload; fInReload = get_pdata_int(iItem, m_fInReload, linux_diff_weapon)
static Float:flNextAttack; flNextAttack = get_pdata_float(id, m_flNextAttack, linux_diff_player)
if(fInReload && flNextAttack <= 0.0)
{
set_pdata_int(iItem, m_fInSpecialReload, 0, linux_diff_weapon)
fInReload = 0
}
static iButton;iButton = pev(id, pev_button)

if(iButton & IN_ATTACK && get_pdata_float(iItem, m_flNextPrimaryAttack, linux_diff_weapon) <= 0.0)
{
return HAM_IGNORED
}

if(iButton & IN_RELOAD && !fInReload)
{
if(iClip >= WEAPON_MAX_CLIP)
{
set_pev(id, pev_button, iButton & ~IN_RELOAD)
}
else if(iClip == WEAPON_MAX_CLIP)
{
if(!get_pdata_int(id,OFFSET_AMMO_M3,linux_diff_player))
return HAM_IGNORED
}
}

if(get_pdata_float(iItem, m_flNextSecondaryAttack, linux_diff_weapon) <= 0.0)
{
if(iButton & IN_ATTACK2)
{
emit_sound( id, CHAN_ITEM, "weapons/zoom.wav", 0.20, 2.40, 0, 100 )
set_pdata_int(id, m_iFOV, get_pdata_int(id, m_iFOV, linux_diff_player) == 89 ? 65 : 89);
set_pdata_float(iItem, m_flNextSecondaryAttack, 0.3, linux_diff_weapon);
}
}
return HAM_IGNORED;
}
public M32_ReloadP(ent)
{
static id; id = get_pdata_cbase(ent, m_pPlayer, linux_diff_weapon);
if(!CustomItem(ent)) return
if(!get_pdata_int(id,OFFSET_AMMO_M3,linux_diff_player)) return
if(get_pdata_int(id, m_iFOV, linux_diff_player) != 89)
{
set_pdata_int(id, m_iFOV, 89, linux_diff_player);
}
set_pdata_float(id, m_flNextAttack, 0.7, linux_diff_player)
set_pdata_float(ent, m_flTimeWeaponIdle, 0.7, linux_diff_weapon)
set_pdata_float(id, m_flNextPrimaryAttack, 0.7, linux_diff_player)
set_pdata_int(ent, m_fInSpecialReload, 1, linux_diff_weapon)
UTIL_SendWeaponAnim(id, WEAPON_ANIM_BEFORE);
static clip; clip = get_pdata_int(ent,m_iClip,linux_diff_player)
static bpammo; bpammo = get_pdata_int(id,OFFSET_AMMO_M3,linux_diff_player)
if(get_pdata_float(ent, m_flNextPrimaryAttack,linux_diff_weapon) > 0.0) return
if(get_pdata_int(ent, m_fInSpecialReload, linux_diff_weapon))
{

if(get_pdata_int(id,OFFSET_AMMO_M3,linux_diff_player) <= 0 || WEAPON_MAX_CLIP-1 == clip)
set_pdata_float(id, m_flNextAttack, 0.9, linux_diff_player)
set_pdata_float(ent, m_flTimeWeaponIdle, 0.9, linux_diff_weapon)
set_pdata_float(ent, m_flNextPrimaryAttack, 0.9, linux_diff_weapon)
UTIL_SendWeaponAnim(id, WEAPON_ANIM_INSERT);
set_pdata_int(ent, m_fInSpecialReload, 1, linux_diff_weapon)
if(get_pdata_float(ent, m_flNextPrimaryAttack, linux_diff_weapon) > 0.0)
{
if(clip<WEAPON_MAX_CLIP)
{
set_pdata_int(id, OFFSET_AMMO_M3, bpammo-1, linux_diff_player)
set_pdata_int(ent, m_iClip, clip+1)
}
}

if(clip==WEAPON_MAX_CLIP)
{
set_pdata_float(id, m_flNextAttack, 0.9, linux_diff_player)
set_pdata_float(ent, m_flTimeWeaponIdle, 0.9, linux_diff_weapon)
set_pdata_float(id, m_flNextPrimaryAttack, 0.9, linux_diff_player)
set_pdata_int(ent, m_fInSpecialReload, 0, linux_diff_weapon)
UTIL_SendWeaponAnim(id, WEAPON_ANIM_AFTER);
return
}
return
}
return
}
public CWeapon__PrimaryAttack_Pre( iItem )
{
if(CustomItem(iItem)) return HAM_SUPERCEDE
return HAM_IGNORED
}

public M32_Attackp( ent )
{
static id; id = pev( ent, pev_owner )
if(CustomItem(ent))
{
if(get_pdata_int(ent, m_fInSpecialReload, linux_diff_player))
{
set_pdata_float(id, m_flNextAttack, 0.9, linux_diff_player)
set_pdata_float(ent, m_flTimeWeaponIdle, 0.9, linux_diff_weapon)
set_pdata_float(ent, m_flNextPrimaryAttack, 0.9, linux_diff_weapon)
UTIL_SendWeaponAnim(id, WEAPON_ANIM_AFTER);
set_pdata_int(ent, m_fInSpecialReload, 0, linux_diff_weapon)
return HAM_SUPERCEDE
}
if(get_pdata_int(ent,m_iClip,linux_diff_player)!=0)
{
UTIL_SendWeaponAnim(id, WEAPON_ANIM_SHOOT);
emit_sound( id, CHAN_WEAPON, Sounds[0], 1.0, ATTN_NORM, 0, PITCH_NORM )
FireGrenade( id )
//Отдача
static Float:punchAngle[3];
punchAngle[0] = -4.0;
punchAngle[1] = float(random_num(-600, 600)) / 100.0;
punchAngle[2] = 0.0;
set_pev(id, pev_punchangle, punchAngle);
//
static item; item = get_pdata_cbase(id, m_pActiveItem)
static clip; clip = get_pdata_int(item,m_iClip,linux_diff_player)
set_pdata_int(item, m_iClip, clip-1)
if(get_pdata_int(id, m_iFOV, linux_diff_player) != 89)
{
set_pdata_float(id, m_flNextAttack, SPEED_ZOOM, linux_diff_player)
set_pdata_float(ent, m_flTimeWeaponIdle, SPEED_ZOOM, linux_diff_weapon)
set_pdata_float(ent, m_flNextPrimaryAttack, SPEED_ZOOM, linux_diff_weapon)
}
else
{
set_pdata_float(id, m_flNextAttack, SPEED, linux_diff_player)
set_pdata_float(ent, m_flTimeWeaponIdle, SPEED, linux_diff_weapon)
set_pdata_float(ent, m_flNextPrimaryAttack, SPEED, linux_diff_weapon)
}
}
else
{
set_pdata_float(ent, m_flNextPrimaryAttack, 0.5, linux_diff_weapon)
ExecuteHam(Ham_Weapon_PlayEmptySound, ent)
return HAM_SUPERCEDE
}
}
return HAM_IGNORED
}

public FireGrenade(id)
{

static Float:origin[3],Float:velocity[3],Float:angles[3]
pev(id,pev_angles,angles)
static ent; ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))
get_weapon_position(id, origin, 10.0, get_cvar_num("cl_righthand")?8.0: -8.0, -5.0)
set_pev( ent, pev_classname, "m32_grenade" )
set_pev( ent, pev_solid, SOLID_BBOX )
set_pev( ent, pev_movetype, MOVETYPE_TOSS )
engfunc ( EngFunc_SetSize , ent, Float:{ -0.1, -0.1, -0.1 }, Float:{ 0.1, 0.1, 0.1 } );
engfunc ( EngFunc_SetModel , ent, GRENADE_MODEL );
engfunc ( EngFunc_SetOrigin, ent, origin );
set_pev( ent, pev_angles, angles )
set_pev( ent, pev_owner, id )
set_pev( ent, pev_nextthink, get_gametime( ))
set_pev(ent, pev_speed, velocity)
if(get_pdata_int(id, m_iFOV, linux_diff_player) == 89)
{
velocity_by_aim( id,DISTANCE,velocity )
}
else
{
velocity_by_aim( id,DISTANCE_ZOOM, velocity )
}
set_pev( ent, pev_velocity, velocity )
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_BEAMFOLLOW) // Temporary entity ID
write_short(ent) // Entity
write_short(sTrail) // Sprite index
write_byte(3) // Life
write_byte(3) // Line width
write_byte(255) // Red
write_byte(255) // Green
write_byte(255) // Blue
write_byte(100) // Alpha
message_end()
return
}

public pfn_touch(ptr, ptd)
{
// If ent is valid
if (pev_valid(ptr))
{
// Get classnames
static classname[32]
pev(ptr, pev_classname, classname, 31)
// Our ent
if(equal(classname, "m32_grenade"))
{
// Get it's origin
new Float:originF[3]
pev(ptr, pev_origin, originF)
engfunc(EngFunc_MessageBegin, MSG_PAS, SVC_TEMPENTITY, originF, 0)
write_byte(TE_WORLDDECAL)
engfunc(EngFunc_WriteCoord, originF[0])
engfunc(EngFunc_WriteCoord, originF[1])
engfunc(EngFunc_WriteCoord, originF[2])
write_byte(engfunc(EngFunc_DecalIndex,"{scorch3"))
message_end()
// Draw explosion
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_EXPLOSION) // Temporary entity ID
engfunc(EngFunc_WriteCoord, originF[0]) // engfunc because float
engfunc(EngFunc_WriteCoord, originF[1])
engfunc(EngFunc_WriteCoord, originF[2])
write_short(sExplo) // Sprite index
write_byte(45) // Scale
write_byte(25) // Framerate
write_byte(0) // Flags
message_end()
static classnameptd[32]; pev(ptd, pev_classname, classnameptd, 31);
if (equali(classnameptd, "func_breakable")) ExecuteHamB(Ham_TakeDamage, ptd, 0, 0, 500.0, DMG_GENERIC);
static pOwner; pOwner = pev(ptr,pev_owner);
static pevVictim, Float:flDistance,Float:fDamage;
pevVictim = FM_NULLENT;
while((pevVictim = engfunc(EngFunc_FindEntityInSphere, pevVictim, originF, RADIUS_DMG)) != 0)
{
flDistance = entity_range(ptr,pevVictim);
fDamage = floatsub(DMG_EXP,floatmul(floatdiv(DMG_EXP,RADIUS_DMG),flDistance));
if(!is_user_alive(pevVictim))
continue;
if( !zp_get_user_zombie(pevVictim))
continue;
if(fDamage > 0.0)
{
ExecuteHamB(Ham_TakeDamage, pevVictim, ptr, pOwner, fDamage, DMG_BULLET);
}
//если хотите добавить тряску экрана у зомби при нанесении урона
//message_begin ( MSG_ONE_UNRELIABLE, get_user_msgid ( "ScreenShake" ), {0,0,0}, pevVictim)
//write_short ( 0xFFFF ) // Amplitude
//write_short ( 1<<13 ) // Duration
//write_short ( 0xFFFF ) // Frequency
//message_end ( )
}
engfunc( EngFunc_RemoveEntity, ptr );
}
}
}
public M32_Killed(iVictim, iAttacker, shouldgib)
{
if(!is_user_connected(iAttacker) || iAttacker == iVictim) return PLUGIN_CONTINUE

if(CustomItem(iAttacker))
{
if(user_has_weapon(iAttacker,21,-1))
return PLUGIN_CONTINUE;
}
return PLUGIN_CONTINUE;
}
// [ Stocks ]
stock UTIL_SendWeaponAnim(iPlayer, iAnim)
{
set_pev(iPlayer, pev_weaponanim, iAnim);

message_begin(MSG_ONE, SVC_WEAPONANIM, _, iPlayer);
write_byte(iAnim);
write_byte(0);
message_end();
}

stock UTIL_DropWeapon(iPlayer, iSlot)
{
static iEntity, iNext, szWeaponName[32];
iEntity = get_pdata_cbase(iPlayer, m_rpgPlayerItems + iSlot, linux_diff_player);

if(iEntity > 0)
{
do
{
iNext = get_pdata_cbase(iEntity, m_pNext, linux_diff_weapon);

if(get_weaponname(get_pdata_int(iEntity, m_iId, linux_diff_weapon), szWeaponName, charsmax(szWeaponName)))
engclient_cmd(iPlayer, "drop", szWeaponName);
}

while((iEntity = iNext) > 0);
}
}

stock UTIL_PrecacheSoundsFromModel(const szModelPath[])
{
static iFile;

if((iFile = fopen(szModelPath, "rt")))
{
new szSoundPath[64];

new iNumSeq, iSeqIndex;
new iEvent, iNumEvents, iEventIndex;

fseek(iFile, 164, SEEK_SET);
fread(iFile, iNumSeq, BLOCK_INT);
fread(iFile, iSeqIndex, BLOCK_INT);

for(new k, i = 0; i < iNumSeq; i++)
{
fseek(iFile, iSeqIndex + 48 + 176 * i, SEEK_SET);
fread(iFile, iNumEvents, BLOCK_INT);
fread(iFile, iEventIndex, BLOCK_INT);
fseek(iFile, iEventIndex + 176 * i, SEEK_SET);

for(k = 0; k < iNumEvents; k++)
{
fseek(iFile, iEventIndex + 4 + 76 * k, SEEK_SET);
fread(iFile, iEvent, BLOCK_INT);
fseek(iFile, 4, SEEK_CUR);

if(iEvent != 5004)
continue;

fread_blocks(iFile, szSoundPath, 64, BLOCK_CHAR);

if(strlen(szSoundPath))
{
strtolower(szSoundPath);
engfunc(EngFunc_PrecacheSound, szSoundPath);
}
}
}
}

fclose(iFile);
}
stock get_weapon_position(id, Float:fOrigin[], Float:add_forward = 0.0, Float:add_right = 0.0, Float:add_up = 0.0)
{
static Float:Angles[3],Float:ViewOfs[3], Float:vAngles[3]
static Float:Forward[3], Float:Right[3], Float:Up[3]

pev(id, pev_v_angle, vAngles)
pev(id, pev_origin, fOrigin)
pev(id, pev_view_ofs, ViewOfs)
xs_vec_add(fOrigin, ViewOfs, fOrigin)

pev(id, pev_angles, Angles)

Angles[0] = vAngles[0]

engfunc(EngFunc_MakeVectors, Angles)

global_get(glb_v_forward, Forward)
global_get(glb_v_right, Right)
global_get(glb_v_up, Up)

xs_vec_mul_scalar(Forward, add_forward, Forward)
xs_vec_mul_scalar(Right, add_right, Right)
xs_vec_mul_scalar(Up, add_up, Up)

fOrigin[0] = fOrigin[0] + Forward[0] + Right[0] + Up[0]
fOrigin[1] = fOrigin[1] + Forward[1] + Right[1] + Up[1]
fOrigin[2] = fOrigin[2] + Forward[2] + Right[2] + Up[2]
}
stock UTIL_SetRendering(iPlayer, iFx = 0, iRed = 255, iGreen = 255, iBlue = 255, iRender = 0, Float: flAmount = 16.0)
{
static Float: flColor[3];

flColor[0] = float(iRed);
flColor[1] = float(iGreen);
flColor[2] = float(iBlue);

set_pev(iPlayer, pev_renderfx, iFx);
set_pev(iPlayer, pev_rendercolor, flColor);
set_pev(iPlayer, pev_rendermode, iRender);
set_pev(iPlayer, pev_renderamt, flAmount);
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
*/
Всем привет. Возникла такая проблему, что у этого оружия бесконечные патроны, на linux но на windows они не бесконечные. Что делать?
 
Сообщения
672
Реакции
144
Помог
11 раз(а)
в game.cfg
// Пополнение патронов
// 0 - выключено (значение по умолчанию)
// 1 - пополнять запас патронов после спавна
// 2 - пополнять запас патронов после спавна и полная обойма, при покупке оружия
// 3 - пополнять запас патронов при каждой перезарядке оружия (Примечание: полезно для модов DeathMatch, GunGame, ZombieMod и т.п.)
// Значение по умолчанию: "0"
mp_refill_bpammo_weapons 3

// Устанавливаем режим бесконечных патронов для оружия
// 0 - отключено (поведение по умолчанию)
// 1 - Бесконечные патроны
// 2 - Бесконечные патроны в запасе (кол-во запасных патронов не уменьшиться после перезарядки)
// Значение по умолчанию: "0"
mp_infinite_ammo 1
 
Сообщения
1,042
Реакции
206
Предупреждения
1
Помог
6 раз(а)
Artemich,
Код:
if(get_pdata_int(iItem, m_iClip, linux_diff_weapon) == 0)
 
Сообщения
552
Реакции
49
Предупреждения
2
Помог
4 раз(а)
BiZaJe, а какую строку заменить?
 
Сообщения
552
Реакции
49
Предупреждения
2
Помог
4 раз(а)
BiZaJe, я не знаю, но мне просто проблему с беск. патронами решить надо.
 
Сообщения
1,082
Реакции
58
Помог
11 раз(а)
Вроде это
set_pdata_int(_index,_Offset,_linuxdiff=5)
_index - id entity ( игрок тоже entity)
_Offset - Интересующие данные (Пример OFFSET_ARMORTYPE или 112)
_linuxdiff=5 - Смещение для linux
Код:
-#define linux_diff_player 5
+#define linux_diff_player 4
 
Сообщения
1,042
Реакции
206
Предупреждения
1
Помог
6 раз(а)
Code_0xABC, там есть директива с 4
Можно ее попробовать
 
Сообщения
552
Реакции
49
Предупреждения
2
Помог
4 раз(а)
я ничего не понял, объясните нормально
 
Сообщения
552
Реакции
49
Предупреждения
2
Помог
4 раз(а)
Алексеич, не трудно но какая именно она, их тут много таких просто
 
Сообщения
657
Реакции
562
Предупреждения
8
Помог
9 раз(а)
Код:
#define linux_diff_weapon 4
#define linux_diff_player 5
У игрока 5 в у оружие 4. Не надо его менять
 
Сообщения
892
Реакции
149
Помог
25 раз(а)
Кому ты его выдаешь? И как? Через натив в стороннем плагине?
 
Сообщения
552
Реакции
49
Предупреждения
2
Помог
4 раз(а)
ImmortalAmxx, оружие доступно только донатеру, выдаётся через меню командой get_m32, но идёт "дизбаланс" из-за беск. патронов
 
Сообщения
892
Реакции
149
Помог
25 раз(а)
Использовал точно такой-же плагин, но патроны выставлял через кстрайкк модуль (идея не из хороших конечно), но лично мне помогло, была тончо такая же проблема, как и у тебя.
 
Сообщения
1,082
Реакции
58
Помог
11 раз(а)
Artemich, что бы что то определить, для этого нужно все файлы, что бы у себя это все протестировать, я про это
Код:
#include <zombieplague>

#define WEAPON_MODEL_VIEW "models/v_m32.mdl"
#define WEAPON_MODEL_PLAYER "models/p_m32.mdl"
#define WEAPON_MODEL_WORLD "models/w_m32.mdl"
У меня допустим их нет, я думаю и у многих!!!
 
Сообщения
657
Реакции
562
Предупреждения
8
Помог
9 раз(а)
BiZaJe, там еще
Код:
    //
            
static clip; clip = get_pdata_int(item,m_iClip,linux_diff_player)           set_pdata_int(item, m_iClip, clip-1)
Менять на linux_diff_weapon.
Давно не юзал fakemeta set/get_pdata но мне кажется для set_pdata_int тоже надо добавить агрумент linux_diff_weapon
27 Фев 2023
Просто там запутано эктра оффсеты. Ставили 5 для оружие.
27 Фев 2023
Все решается без проблем.
 

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

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