Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • Need help?

    Create a topic in the appropriate section
    Don't write everything in the chat!
  • Take a look at the marketplace

    There you can buy
    everything related to game servers
  • Don't want a ban?

    Please read our rules
    Don't disturb the order!
  • Sell or buy?

    Use services of the guarantor
    We will make your deal safe
Koms

Крафт и апгрейд оружия (ПКМ опции у предмета. Maca_rc)

Recommended Posts

Всем привет.
Нашел на просторах сети (где-то на http://epochmod.com) автор: HALV, такой скрипт, опробовал, русифицировал, допилил и решил поделиться со всеми.

 

 

Пожалуйста, Войдите или Зарегистрируйтесь, чтобы увидеть это: Вложение.

 

Пожалуйста, Войдите или Зарегистрируйтесь, чтобы увидеть это: Вложение.

 

Пожалуйста, Войдите или Зарегистрируйтесь, чтобы увидеть это: Вложение.

 

При  нажатии ПКМ на оружии (в моём примере extra_rc.hpp) появляется меню "Поставить глушитель" и "Снять глушитель" .  Дальше добавляйте свои варианты - возможности практически безграничны - как Вам фантазия позволит...

Итак, нам понадобятся 2 файла - код приведу ниже, и сам файл extra_rc.hpp: 
 
Как сделать extra_rc.hpphttp://s-platoon.ru/...edmeta-maca-rc/  
 
У меня скрипты находятся в папке custom, поэтому пути привожу свои. Создаём файлы:
 
upgrades.sqf

/*
	Script by HALV
	usage: parse varibles to the script, example below will Detatch supressor from mk17 and will:
	require toolbox and scrap metal, remove scrap, but leave toolbox
	["weapon2change",	"toolneeded"(""=nothing),	"magazineneeded/removed"(""=nothing),	"toolremoved"(""=nothing),	"outputweapon",			"Text"]
	["SCAR_H_CQC_CCO",	"ItemToolbox",				"PartGeneric",							"",							"SCAR_H_CQC_CCO_SD",	"Suppressor Attatched"]
*/
private["_weapon","_toolitem","_magitem","_toolitem2","_weapoutput","_string","_this","_txt1","_txt2"];
_weapon = _this select 0;
_toolitem = _this select 1;
_magitem = _this select 2;
_toolitem2 = _this select 3;
_weapoutput = _this select 4;
_string = _this select 5;

if(_magitem !="" and !(_magitem in magazines player))exitwith{
	_txt2 = (gettext (configFile >> 'cfgmagazines' >> _magitem >> 'displayName'));
	titleText [format["Необходимо %1 для этого",_txt2], "PLAIN DOWN"]; titleFadeOut 5;
};

if(_toolitem !="" and !(player hasWeapon _toolitem))exitwith{
	_txt1 = (gettext (configFile >> 'cfgweapons' >> _toolitem >> 'displayName'));
	titleText [format["Необходимо %1 для этого",_txt1], "PLAIN DOWN"]; titleFadeOut 5;
};

closeDialog 0;

player playActionNow "Medic";
[player,"repair",0,false,10] call dayz_zombieSpeak;
[player,10,true,(getPosATL player)] spawn player_alertZombies;
sleep 2;
player removeWeapon _weapon;

if(_toolitem2 !="")then{
	player removeWeapon _toolitem2;
};

if(_magitem !="")then{
	player removeMagazine _magitem;
};

sleep 2;
player addWeapon _weapoutput;
sleep 1;
player selectWeapon _weapoutput;
titleText [format["%1",_string], "PLAIN DOWN"]; titleFadeOut 5;

 
downgrades.sqf

/*
	Script by HALV
	usage: parse varibles to the script, example below will Detatch suppressor from mk17 and will:
	require toolbox and scrap metal, remove scrap, but leave toolbox
	["weapon2change",	"toolneeded",	"magazineadded"(""=nothing),	"tooladded"(""=nothing),	"outputweapon",			"Text"]
	["SCAR_H_CQC_CCO",	"ItemToolbox",	"PartGeneric",					"",							"SCAR_H_CQC_CCO_SD",	"Suppressor Detatched"]
*/
private["_weapon","_toolitem","_magitem","_toolitem2","_weapoutput","_string","_this","_txt1","_txt2"];
_weapon = _this select 0;
_toolitem = _this select 1;
_magitem = _this select 2;
_tooloutput = _this select 3;
_weapoutput = _this select 4;
_string = _this select 5;

if(_toolitem !="" and !(player hasWeapon _toolitem))exitwith{
	_txt1 = (gettext (configFile >> 'cfgweapons' >> _toolitem >> 'displayName'));
	titleText [format["Необходимо %1 для этого",_txt1], "PLAIN DOWN"]; titleFadeOut 5;
};

if(_tooloutput !="" and (player hasWeapon _tooloutput))exitwith{
	_txt1 = (gettext (configFile >> 'cfgweapons' >> _tooloutput >> 'displayName'));
	titleText [format["Необходимо %1 для этого",_txt1], "PLAIN DOWN"]; titleFadeOut 5;
};

closeDialog 0;
player playActionNow "Medic";
[player,"repair",0,false,10] call dayz_zombieSpeak;
[player,10,true,(getPosATL player)] spawn player_alertZombies;
sleep 2;
player removeWeapon _weapon;
sleep 2;

if(_magitem !="")then{
	player addMagazine _magitem;
};

if(_tooloutput !="")then{
	player addWeapon _tooloutput;
};

player addWeapon _weapoutput;
sleep 1;
player selectWeapon _weapoutput;
titleText [format["%1",_string], "PLAIN DOWN"]; titleFadeOut 5;

 
Сохраняем их в папку: custom\weapons
 
Добавление записей в сам файл extra_rc.hpp  (вы же его уже создали по ссылке с инструкцией вверху?):

//weapons
//pistols
	class M9 {
		class M9 {
			text = "Поставить глушитель";
			script = "[""M9"",""ItemToolbox"",""PartGeneric"","""",""M9SD"",""Глушитель установлен""]execVM ""custom\weapons\upgrades.sqf"";";
		};
	};
	class M9SD {
		class M9SD {
			text = "Снять глушитель";
			script = "[""M9SD"",""ItemToolbox"",""PartGeneric"","""",""M9"",""Глушитель снят""]execVM ""custom\weapons\downgrades.sqf"";";
		};
	};
	class Makarov {
		class Makarov {
			text = "Поставить глушитель";
			script = "[""Makarov"",""ItemToolbox"",""PartGeneric"","""",""MakarovSD"",""Глушитель установлен""]execVM ""custom\weapons\upgrades.sqf"";";
		};
	};
	class MakarovSD {
		class MakarovSD {
			text = "Снять глушитель";
			script = "[""MakarovSD"",""ItemToolbox"",""PartGeneric"","""",""Makarov"",""Глушитель снят""]execVM ""custom\weapons\downgrades.sqf"";";
		};
	};
	class UZI_EP1 {
		class UZI_EP1 {
			text = "Поставить глушитель";
			script = "[""UZI_EP1"",""ItemToolbox"",""PartGeneric"","""",""UZI_SD_EP1"",""Глушитель установлен""]execVM ""custom\weapons\upgrades.sqf"";";
		};
	};
	class UZI_SD_EP1 {
		class UZI_SD_EP1 {
			text = "Снять глушитель";
			script = "[""UZI_SD_EP1"",""ItemToolbox"",""PartGeneric"","""",""UZI_EP1"",""Глушитель снят""]execVM ""custom\weapons\downgrades.sqf"";";
		};
	};

Сохраняем и радуемся.  :smile:   
 
Для примера разберем один апгрейд пистолета M9 до M9SD:

 

  class M9 { - на каком предмете работает данный апгрейд
        class M9 { - произвольное название
            text = "Поставить глушитель"; - название отображаемое по ПКМ на данном предмете
            script = "[""M9"",""ItemToolbox"",""PartGeneric"","""",""M9SD"",""Глушитель установлен""]execVM ""custom\weapons\upgrades.sqf"";";
        };
    };

            script = "[""что берём за исходный материал"",""необходимый инструмент\то что в классе оружия"",""дополнительные материалы для крафта"",""удаляемый инструмент"",""что получаем на выходе"",""уведомление"]execVM ""custom\weapons\upgrades.sqf"";"; - ну и какой скрипт выполняем.

 

Ну и ещё пример:

 class AKS_74 {
        class aks74nspu {
            text = "Поставить NSPU прицел";
            script = "[""AKS_74"",""NVGoggles"",""PartGeneric"",""NVGoggles"",""AKS_74_NSPU"",""NSPU прицел установлен""]execVM ""custom\weapons\upgrades.sqf"";";        
        };
 };

 

ГОТОВО!
 
Файлы крафта и extra_rc.hpp прикрепил к сообщению.  
Скрипты полностью рабочие, не блокируются, оружие не исчезает и не убивает. Серверный и клиентский логи чисты.

weapons.zip

extra_rc.zip

Edited by Koms (see edit history)

Share this post


Link to post
Share on other sites





можно сцылочку на оригинал?

Share this post


Link to post
Share on other sites

 

Файлы крафта и extra_rc.hpp прикрепил к сообщению.  
Скрипты полностью рабочие, не блокируются, оружие не исчезает и не убивает. Серверный и клиентский логи чисты.

 

ссылочки битые, перезалейте пожалуйста.

тыкаю ПКМ по стволу, появляется надпись. Тыкаю по надписи ничего не происходит (абсолютно ничего), ни на что не ссылается, ни на что не ругается, RPT чистый.

Edited by Evgeniy1983 (see edit history)

Share this post


Link to post
Share on other sites

ссылочки битые, перезалейте пожалуйста.

тыкаю ПКМ по стволу, появляется надпись. Тыкаю по надписи ничего не происходит (абсолютно ничего), ни на что не ссылается, ни на что не ругается, RPT чистый.

Топаем в клиентский РПТ (AppData/Local/Arma2oa)

Share this post


Link to post
Share on other sites

Топаем в клиентский РПТ (AppData/Local/Arma2oa)

 

 

 

_agent moveTo _targetPos;

_a>

  Error Undefined variable in expression: _target

Error in expression <temToolbox","PartGeneric","ItemPole",","AK_74_GL","GP-25 установлен"]e>

  Error position: <AK_74_GL","GP-25 установлен"]e>

  Error Missing ]

Error in expression <temToolbox","PartGeneric","ItemPole",","AK_74_GL","GP-25 установлен"]e>

  Error position: <AK_74_GL","GP-25 установлен"]e>

  Error Missing ]

Error in expression <temToolbox","PartGeneric","ItemPole",","AK_74_GL","GP-25 установлен"]e>

  Error position: <AK_74_GL","GP-25 установлен"]e>

  Error Missing ]

Error in expression <temToolbox","PartGeneric","ItemPole",","AK_74_GL","GP-25 установлен"]e>

  Error position: <AK_74_GL","GP-25 установлен"]e>

  Error Missing ]

Error in expression <["AK_74","ItemToolbox","PartGeneric",","AKS_74","Складной приклад>

  Error position: <AKS_74","Складной приклад>

  Error Missing ]

Error in expression <["AK_74","ItemToolbox","PartGeneric",","AKS_74","Складной приклад>

  Error position: <AKS_74","Складной приклад>

  Error Missing ]

Error in expression <ItemToolbox","PartGeneric",2,"ItemPole",::,"RPK_74","РПК74 сделан"]exec>

  Error position: <::,"RPK_74","РПК74 сделан"]exec>

  Error Invalid number in expression

Error in expression <ItemToolbox","PartGeneric",2,"ItemPole",::,"RPK_74","РПК74 сделан"]exec>

  Error position: <::,"RPK_74","РПК74 сделан"]exec>

  Error Invalid number in expression

Error in expression <oolbox","PartGeneric",3,"ItemPole",2,","PK_DZ","ПКМ готов"]execVM "scrip>

  Error position: <PK_DZ","ПКМ готов"]execVM "scrip>

  Error Missing ]

Error in expression <oolbox","PartGeneric",3,"ItemPole",2,","PK_DZ","ПКМ готов"]execVM "scrip>

  Error position: <PK_DZ","ПКМ готов"]execVM "scrip>

  Error Missing ]

Error in expression <oolbox","PartGeneric",3,"ItemPole",2,","PK_DZ","ПКМ готов"]execVM "scrip>

  Error position: <PK_DZ","ПКМ готов"]execVM "scrip>

  Error Missing ]

Error in expression <oolbox","PartGeneric",3,"ItemPole",2,","PK_DZ","ПКМ готов"]execVM "scrip>

  Error position: <PK_DZ","ПКМ готов"]execVM "scrip>

  Error Missing ]

Error in expression <oolbox","PartGeneric",3,"ItemPole",2,","PK_DZ","ПКМ готов"]execVM "scrip>

  Error position: <PK_DZ","ПКМ готов"]execVM "scrip>

  Error Missing ]

Error in expression <oolbox","PartGeneric",3,"ItemPole",2,","PK_DZ","ПКМ готов"]execVM "scrip>

  Error position: <PK_DZ","ПКМ готов"]execVM "scrip>

  Error Missing ]

Error in expression <oolbox","PartGeneric",3,"ItemPole",2,","PK_DZ","ПКМ готов"]execVM "scrip>

  Error position: <PK_DZ","ПКМ готов"]execVM "scrip>

  Error Missing ]

Error in expression <oolbox","PartGeneric",3,"ItemPole",2,","PK_DZ","ПКМ готов"]execVM "scrip>

  Error position: <PK_DZ","ПКМ готов"]execVM "scrip>

  Error Missing ]

Error in expression <oolbox","PartGeneric",3,"ItemPole",2,","PK_DZ","ПКМ готов"]execVM "scrip>

  Error position: <PK_DZ","ПКМ готов"]execVM "scrip>

  Error Missing ]

Error in expression <oolbox","PartGeneric",3,"ItemPole",2,","PK_DZ","ПКМ готов"]execVM "scrip>

  Error position: <PK_DZ","ПКМ готов"]execVM "scrip>

  Error Missing ]

Error in expression <oolbox","PartGeneric",3,"ItemPole",2,","PK_DZ","ПКМ готов"]execVM "scrip>

  Error position: <PK_DZ","ПКМ готов"]execVM "scrip>

  Error Missing ]

Error in expression <oolbox","PartGeneric",3,"ItemPole",2,","PK_DZ","ПКМ готов"]execVM "scrip>

  Error position: <PK_DZ","ПКМ готов"]execVM "scrip>

  Error Missing ]

Error in expression <oolbox","PartGeneric",3,"ItemPole",2,","PK_DZ","ПКМ готов"]execVM "scrip>

  Error position: <PK_DZ","ПКМ готов"]execVM "scrip>

  Error Missing ]

Error in expression <oolbox","PartGeneric",3,"ItemPole",2,","PK_DZ","ПКМ готов"]execVM "scrip>

  Error position: <PK_DZ","ПКМ готов"]execVM "scrip>

  Error Missing ]

Error in expression <oolbox","PartGeneric",3,"ItemPole",2,","PK_DZ","ПКМ готов"]execVM "scrip>

  Error position: <PK_DZ","ПКМ готов"]execVM "scrip>

  Error Missing ]

Error in expression <oolbox","PartGeneric",3,"ItemPole",2,","PK_DZ","ПКМ готов"]execVM "scrip>

  Error position: <PK_DZ","ПКМ готов"]execVM "scrip>

  Error Missing ]

Error in expression <oolbox","PartGeneric",3,"ItemPole",2,","PK_DZ","ПКМ готов"]execVM "scrip>

  Error position: <PK_DZ","ПКМ готов"]execVM "scrip>

  Error Missing ]

Error in expression <oolbox","PartGeneric",3,"ItemPole",2,","PK_DZ","ПКМ готов"]execVM "scrip>

  Error position: <PK_DZ","ПКМ готов"]execVM "scrip>

  Error Missing ]

Error in expression <oolbox","PartGeneric",3,"ItemPole",2,","PK_DZ","ПКМ готов"]execVM "scrip>

  Error position: <PK_DZ","ПКМ готов"]execVM "scrip>

  Error Missing ]

Error in expression <oolbox","PartGeneric",3,"ItemPole",2,","PK_DZ","ПКМ готов"]execVM "scrip>

  Error position: <PK_DZ","ПКМ готов"]execVM "scrip>

  Error Missing ]

Error in expression <oolbox","PartGeneric",3,"ItemPole",2,","PK_DZ","ПКМ готов"]execVM "scrip>

  Error position: <PK_DZ","ПКМ готов"]execVM "scrip>

  Error Missing ]

Error in expression <oolbox","PartGeneric",3,"ItemPole",2,","PK_DZ","ПКМ готов"]execVM "scrip>

  Error position: <PK_DZ","ПКМ готов"]execVM "scrip>

  Error Missing ]

 

 

 

я хз чего он хочет

Edited by Evgeniy1983 (see edit history)

Share this post


Link to post
Share on other sites

куча ошибок. проверяйте скрипт. одна кавычка вместо двух, нет скобки.

Share this post


Link to post
Share on other sites

куча ошибок. проверяйте скрипт. одна кавычка вместо двух, нет скобки.

Да был косяк, нашел. А можно как то усложнить крафт типа 2 запчасти+труба+бинокль?

Share this post


Link to post
Share on other sites

А кто мешает? Примеры  я дал и расписал что куда. Только бинокль в другом классе. 

Share this post


Link to post
Share on other sites

Можете пояснить как в ""дополнительные материалы для крафта"" запихать скажем 2-3 предмета и в ""удаляемый инструмент"" скажем 2 инструмента?

Я пробовал с кавычками, со скобками, без кавычек, без скобок, через запятую и ставил так ""PartGeneric,3"". Ничего не происходит.

Хотяб 1 пример усложненый, а то простовато как то запчасть+бинокль.

Share this post


Link to post
Share on other sites

 script = "[""что берём за исходный материал"",""необходимый инструмент\то что в классе оружия","еще один необходимый инструмент\то что в классе оружия"",""дополнительные материалы для крафта","ещё дополнительные материалы для крафта"",""удаляемый инструмент","ещё удаляемый инструмент"",""что получаем на выходе"",""уведомление"]execVM ""custom\weapons\upgrades.sqf"";";

Вроде так. В любом случае-надо пробовать и смотреть результат и логи.

Share this post


Link to post
Share on other sites

 script = "[""что берём за исходный материал"",""необходимый инструмент\то что в классе оружия","еще один необходимый инструмент\то что в классе оружия"",""дополнительные материалы для крафта","ещё дополнительные материалы для крафта"",""удаляемый инструмент","ещё удаляемый инструмент"",""что получаем на выходе"",""уведомление"]execVM ""custom\weapons\upgrades.sqf"";";

Вроде так. В любом случае-надо пробовать и смотреть результат и логи.

Попробовал вот так   

 

 

    class M249_EP1_DZ {

                class M249_EP1_DZ {

                        text = "+ Оптика";

                        script = "[""M249_EP1_DZ"",""ItemToolbox"",""PartGeneric","PartGeneric"",""Binocular_Vector"",""M249_m145_EP1_DZE"",""Scope добавлен""]execVM ""scripts\upgrades.sqf"";";

                };

       };

или так

//M240

        class M249_EP1_DZ {

                class M249_EP1_DZ {

                        text = "+ Оптика";

                        script = "[""M249_EP1_DZ"",[""ItemToolbox""],[[""PartGeneric"",2]],[""Binocular_Vector""],""M249_m145_EP1_DZE"",""Scope добавлен""]execVM ""scripts\upgrades.sqf"";";

                };

       };

вот так

//M240

        class M249_EP1_DZ {

                class M249_EP1_DZ {

                        text = "+ Оптика";

                        script = "[""M249_EP1_DZ"",""ItemToolbox"",""PartGeneric",2"",""Binocular_Vector"],""M249_m145_EP1_DZE"",""Scope добавлен""]execVM ""scripts\upgrades.sqf"";";

                };

       };

 

Выдало вот так

20:23:21 File mpmissions\DayZ_Epoch_11.Chernarus\Scripts\extra_rc.hpp, line 201: '/ExtraRc/M249_EP1_DZ/M249_EP1_DZ.script': Missing ';' at the end of line

20:23:21 Error context PartGeneric","Binocular_Vector","M249_m145_EP1_DZE","Scope добавлен"]execVM "scripts\upgrades.sqf";

ErrorMessage: File mpmissions\DayZ_Epoch_11.Chernarus\Scripts\extra_rc.hpp, line 201: '/ExtraRc/M249_EP1_DZ/M249_EP1_DZ.': ',' encountered instead of '='

        };

 

 

 

 

Самое забавное что по вашему примеру ExtraRc все прекрасно работает, а вот если попытаться добавить  еще доп предмет то спам в RPT. По всякому пробовал экспериментировать.

Edited by Evgeniy1983 (see edit history)

Share this post


Link to post
Share on other sites

Лог выдаёт полную информацию, что нехватает скобки или точки\запятой.

Я когда ставил данный скрипт-экспериментировал и добился того результата, как Вы спрашиваете, но не сохранил те примеры. У меня данный скрипт только глушитель на пистолеты ставит\снимает. Помочь пока не могу-плотный график работы. Пробуйте, главное соблюдать парность, закрытие строк и читать логи))

Share this post


Link to post
Share on other sites

Самое забавное что по вашему примеру ExtraRc все прекрасно работает, а вот если попытаться добавить  еще доп предмет то спам в RPT. По всякому пробовал экспериментировать.

 

Доработал этот скрипт, добавил возможность использовать в крафте 4 итема, 4 инструмента (требуемых и удаляемых, независимые), а также добавление 4 итемов, теперь можно делать апгрейд и даунгрейд одним скриптом. Если нужно могу опубликовать здесь.

 

Пример в extra_rc:

 

 

[""FNFAL"",""work"",""fire"",""ItemToolbox"","""","""","""",""PartGeneric"",""ItemPole"","""","""","""","""","""","""",""Binocular"",""NVGoggles"","""","""",""FN_FAL_ANPVS4"",""AN/PVS-4 attached""]

 

Исходное оружие

Получаемое оружие

Проверка верстака и костра в радиусе 3м

Необходимые инструменты

Удаляемые итемы при крафте

Добавляемые итемы при крафте (для даунгрейда)

Удаляемые интсрументы

Получаемое оружие

Текст выводимый на экран после апгрейда

 

Также теперь нет необходимости отключать _RAI в инфистар, оружие добавляется не игроку в снаряжение, а в WeaponHolder, который создается по завершении крафта, автоматически открывается Gear на нем.

Edited by Ramond (see edit history)

Share this post


Link to post
Share on other sites

 

Доработал этот скрипт, добавил возможность использовать в крафте 4 итема, 4 инструмента (требуемых и удаляемых, независимые), а также добавление 4 итемов, теперь можно делать апгрейд и даунгрейд одним скриптом. Если нужно могу опубликовать здесь.

 

Пример в extra_rc:

 

 

[""FNFAL"",""work"",""fire"",""ItemToolbox"","""","""","""",""PartGeneric"",""ItemPole"","""","""","""","""","""","""",""Binocular"",""NVGoggles"","""","""",""FN_FAL_ANPVS4"",""AN/PVS-4 attached""]

 

Исходное оружие

Получаемое оружие

Проверка верстака и костра в радиусе 3м

Необходимые инструменты

Удаляемые итемы при крафте

Добавляемые итемы при крафте (для даунгрейда)

Удаляемые интсрументы

Получаемое оружие

 

Также теперь нет необходимости отключать _RAI в инфистар, оружие добавляется не игроку в снаряжение, а в WeaponHolder, который создается по завершении крафта, автоматически открывается Gear на нем.

как всем тут нравится мартышкин труд.

вложенные массивы использовать не проще? тогда и количество предметов ограничено вместимостью инвентаря и рюкзака

[""LeeEnfield"",[""ItemToolbox""],[""PartGeneric"",""PartGeneric"",""ItemPole"",""ItemPole""],[""Binocular""],[""""],[""""],""M14_EP1"",""Колиматор установлен""]

и таки код компактнее

{
	if (_x !="" && !(player hasWeapon _x)) exitwith {
		_txt = (gettext (configFile >> 'cfgweapons' >> _x >> 'displayName'));
		systemChat format["Необходимо %1 для этого",_txt];
		_exit = true;
	};
} count _tools;
if (_exit) exitWith {};

простенький цикл вместо перебора каждого элемента.

а про верстак и костёр, хорошая идея.

Share this post


Link to post
Share on other sites

 

Если нужно могу опубликовать здесь.

 думаю, опубликовать даже очень нужно.

Share this post


Link to post
Share on other sites

 

как всем тут нравится мартышкин труд. вложенные массивы использовать не проще? тогда и количество предметов ограничено вместимостью инвентаря и рюкзака

Недостаток опыта пытаюсь компенсировать как могу. Лишний раз задавать вопросы или просить помощи - отправят в поиск или гугл.

 

 

 думаю, опубликовать даже очень нужно.

 

Пожалуйста:

 

weaponmod.sqf

 

 

private["_iPos","_radius","_distance","_isNearWork","_work","_fire","_weapoutput","_toolrem4","_toolrem3","_toolrem2","_toolrem1","_itemadd4","_itemadd3","_itemadd2","_itemadd1","_itemrem4","_itemrem3","_itemrem2","_itemrem1","_toolneed4","_toolneed3","_toolneed2","_toolneed1","_needWork","_needfire","_needwork","_weapon"];


_weapon = _this select 0;
_needwork = _this select 1;
_needfire = _this select 2;
_toolneed1 = _this select 3;
_toolneed2 = _this select 4;
_toolneed3 = _this select 5;
_toolneed4 = _this select 6;
_itemrem1 = _this select 7;
_itemrem2 = _this select 8;
_itemrem3 = _this select 9;
_itemrem4 = _this select 10;
_itemadd1 = _this select 11;
_itemadd2 = _this select 12;
_itemadd3 = _this select 13;
_itemadd4 = _this select 14;
_toolrem1 = _this select 15;
_toolrem2 = _this select 16;
_toolrem3 = _this select 17;
_toolrem4 = _this select 18;
_weapoutput = _this select 19;
_string = _this select 20;


_radius = 1;
_iPos = getPosATL player;
_distance = 3;
_isNearWork = count (nearestObjects [player, ["Wooden_shed_DZ","WoodShack_DZ","WorkBench_DZ"], _distance]);
_work = _isNearWork;
_isNearFire = {inflamed _x} count (getPosATL player nearObjects _distance);
_fire = _isNearFire;


if(_needfire !="" and (_fire == 0)) exitwith {
        cutText [format["\n \n Для модификации требуется костер в радиусе 3 метров"], "PLAIN DOWN"];
};


if(_needwork !="" and (_work == 0)) exitwith {
        cutText [format["\n \n Для модификации требуется верстак в радиусе 3 метров"], "PLAIN DOWN"];
};


if(_toolneed1 !="" and !(player hasWeapon _toolneed1))exitwith{
        _txt1 = (gettext (configFile >> 'cfgweapons' >> _toolneed1 >> 'displayName'));
        cutText [format["\n \n Нужен инструмент %1",_txt1], "PLAIN DOWN"]; titleFadeOut 5;
};


if(_toolneed2 !="" and !(player hasWeapon _toolneed2))exitwith{
        _txt1 = (gettext (configFile >> 'cfgweapons' >> _toolneed2 >> 'displayName'));
        cutText [format["\n \n Нужен инструмент %1",_txt1], "PLAIN DOWN"]; titleFadeOut 5;
};


if(_toolneed3 !="" and !(player hasWeapon _toolneed3))exitwith{
        _txt1 = (gettext (configFile >> 'cfgweapons' >> _toolneed3 >> 'displayName'));
        cutText [format["\n \n Нужен инструмент %1",_txt1], "PLAIN DOWN"]; titleFadeOut 5;
};


if(_toolneed4 !="" and !(player hasWeapon _toolneed4))exitwith{
        _txt1 = (gettext (configFile >> 'cfgweapons' >> _toolneed4 >> 'displayName'));
        cutText [format["\n \n Нужен инструмент %1",_txt1], "PLAIN DOWN"]; titleFadeOut 5;
};


if(_itemrem1 !="" and !(_itemrem1 in magazines player))exitwith{
        _txt2 = (gettext (configFile >> 'cfgmagazines' >> _itemrem1 >> 'displayName'));
        cutText [format["\n \n Для модификации необходимо еще %1 ",_txt2], "PLAIN DOWN"]; titleFadeOut 5;
};


if(_itemrem2 !="" and !(_itemrem2 in magazines player))exitwith{
        _txt2 = (gettext (configFile >> 'cfgmagazines' >> _itemrem2 >> 'displayName'));
        cutText [format["\n \n Для модификации необходимо еще %1 ",_txt2], "PLAIN DOWN"]; titleFadeOut 5;
};


if(_itemrem3 !="" and !(_itemrem3 in magazines player))exitwith{
        _txt2 = (gettext (configFile >> 'cfgmagazines' >> _itemrem3 >> 'displayName'));
        cutText [format["\n \n Для модификации необходимо еще %1 ",_txt2], "PLAIN DOWN"]; titleFadeOut 5;
};


if(_itemrem4 !="" and !(_itemrem4 in magazines player))exitwith{
        _txt2 = (gettext (configFile >> 'cfgmagazines' >> _itemrem4 >> 'displayName'));
        cutText [format["\n \n Для модификации необходимо еще %1 ",_txt2], "PLAIN DOWN"]; titleFadeOut 5;
};


if(_toolrem1 !="" and !(player hasWeapon _toolrem1))exitwith{
        _txt1 = (gettext (configFile >> 'cfgweapons' >> _toolrem1 >> 'displayName'));
        cutText [format["\n \n Для модификации нужен %1",_txt1], "PLAIN DOWN"]; titleFadeOut 5;
};


if(_toolrem2 !="" and !(player hasWeapon _toolrem2))exitwith{
        _txt1 = (gettext (configFile >> 'cfgweapons' >> _toolrem2 >> 'displayName'));
        cutText [format["\n \n Для модификации нужен %1",_txt1], "PLAIN DOWN"]; titleFadeOut 5;
};


if(_toolrem3 !="" and !(player hasWeapon _toolrem3))exitwith{
        _txt1 = (gettext (configFile >> 'cfgweapons' >> _toolrem3 >> 'displayName'));
        cutText [format["\n \n Для модификации нужен %1",_txt1], "PLAIN DOWN"]; titleFadeOut 5;
};


if(_toolrem4 !="" and !(player hasWeapon _toolrem4))exitwith{
        _txt1 = (gettext (configFile >> 'cfgweapons' >> _toolrem4 >> 'displayName'));
        cutText [format["\n \n Для модификации нужен %1",_txt1], "PLAIN DOWN"]; titleFadeOut 5;
};


closeDialog 0;


if(_toolrem1 !="")then{
        player removeWeapon _toolrem1;
};


if(_toolrem2 !="")then{
        player removeWeapon _toolrem2;
};


if(_toolrem3 !="")then{
        player removeWeapon _toolrem3;
};


if(_toolrem4 !="")then{
        player removeWeapon _toolrem4;
};


if(_itemrem1 !="")then{
        player removeMagazine _itemrem1;
};


if(_itemrem2 !="")then{
        player removeMagazine _itemrem2;
};


if(_itemrem3 !="")then{
        player removeMagazine _itemrem3;
};


if(_itemrem4 !="")then{
        player removeMagazine _itemrem4;
};


player playActionNow "Medic";
[player,"repair",0,false,10] call dayz_zombieSpeak;
[player,10,true,(getPosATL player)] spawn player_alertZombies;
player removeWeapon _weapon;
sleep 6;
_holder = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
_holder addWeaponCargoGlobal [_weapoutput,1];
_holder setposATL _iPos;


if(_itemadd1 !="")then{
        _holder addMagazineCargoGlobal [_itemadd1,1];
};


if(_itemadd2 !="")then{
        _holder addMagazineCargoGlobal [_itemadd2,1];
};


if(_itemadd3 !="")then{
        _holder addMagazineCargoGlobal [_itemadd3,1];
};


if(_itemadd4 !="")then{
        _holder addMagazineCargoGlobal [_itemadd4,1];
};


sleep 2;
player reveal _holder;
player action ["Gear", _holder];
//player addWeapon _weapoutput;
sleep 1;
//player selectWeapon _weapoutput;
cutText [format["\n \n %1",_string], "PLAIN DOWN"]; titleFadeOut 5;

 

 

 
 
extra_rc.hpp

class ExtraRc {
    class revolver_EP1 {
        class wpnrevolveraddgold {
            text = "MOD: Покрыть золотом";
            script = "[""revolver_EP1"",""work"",""fire"",""ItemToolbox"","""","""","""",""PartOreGold"","""","""","""","""","""","""","""","""","""","""","""",""revolver_gold_EP1"",""Револьвер покрыт золотом""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };  
    class revolver_gold_EP1 {
        class wpnrevolvergoldaddchrome {
            text = "MOD: Хромирование";
            script = "[""revolver_gold_EP1"",""work"",""fire"",""ItemToolbox"","""","""","""",""PartOreSilver"","""","""","""","""","""","""","""","""","""","""","""",""revolver_EP1"",""Револьвер покрыт хромом""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };  
    class M9 {
        class wpnm9addsd {
            text = "MOD: Поставить ПБС";
            script = "[""M9"",""work"","""",""ItemToolbox"","""","""","""",""ItemPole"",""TrashTinCan"","""","""","""","""","""","""","""","""","""","""",""M9SD"",""Глушитель установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };  
    class M9SD {
        class wpnm9remsd {
            text = "MOD: Снять ПБС";
            script = "[""M9SD"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""M9"",""Глушитель снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };  
    class UZI_EP1 {
        class wpnuziaddsd {
            text = "MOD: Поставить ПБС";
            script = "[""UZI_EP1"",""work"","""",""ItemToolbox"","""","""","""",""ItemPole"",""TrashTinCan"","""","""","""","""","""","""","""","""","""","""",""UZI_SD_EP1"",""Глушитель установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };  
    class UZI_SD_EP1 {
        class wpnuziremsd {
            script = "[""UZI_SD_EP1"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""UZI_EP1"",""Глушитель снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class MP5A5 {
        class wpnmp5addsd {
            text = "MOD: Поставить ПБС";
            script = "[""MP5A5"",""work"","""",""ItemToolbox"","""","""","""",""ItemPole"",""TrashTinCan"","""","""","""","""","""","""","""","""","""","""",""MP5SD"",""Глушитель установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class MP5SD {
        class wpnmp5remsd {
            text = "MOD: Снять ПБС";
            script = "[""MP5SD"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""MP5A5"",""Глушитель снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class bizon {
        class wpnbizonaddsd {
            text = "MOD: Поставить ПБС";
            script = "[""bizon"",""work"","""",""ItemToolbox"","""","""","""",""ItemPole"",""TrashTinCan"","""","""","""","""","""","""","""","""","""","""",""bizon_silenced"",""Глушитель установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class bizon_silenced {
        class wpnbizonremsd {
            text = "MOD: Снять ПБС";
            script = "[""bizon_silenced"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""bizon"",""Глушитель снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class AKS_74_U {
        class wpnaksuaddsd {
            text = "MOD: ПБС и Кобра";
            script = "[""AKS_74_U"",""work"","""",""ItemToolbox"","""","""","""",""ItemPole"",""TrashTinCan"",""PartGlass"","""","""","""","""","""","""","""","""","""",""AKS_74_UN_kobra"",""Глушитель и прицел Кобра установлены""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class AKS_74_UN_kobra {
        class wpnaksuremsd {
            text = "MOD: Снять ПБС и Кобру";
            script = "[""AKS_74_UN_kobra"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""AKS_74_U"",""Глушитель и прицел Кобра сняты""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class Remington870 {
        class wpnr870addflash {
            text = "MOD: Поставить фонарь";
            script = "[""Remington870"","""","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""",""ItemFlashlightRed"","""","""","""",""Remington870_lamp"",""Тактический фонарь установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class Remington870_lamp {
        class wpnr870remflash {
            text = "MOD: Снять фонарь";
            script = "[""Remington870_lamp"","""","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""Remington870"",""Тактический фонарь снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class M4A1 {
        class wpnm4a1addaim {
            text = "MOD: Поставить AIM";
            script = "[""M4A1"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""",""PartGlass"","""","""","""","""","""","""","""","""",""M4A1_Aim"",""Прицел AIM установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class M4A1_Aim {
        class wpnm4a1remaim {
            text = "MOD: Снять AIM";
            script = "[""M4A1_Aim"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""M4A1"",""Прицел AIM снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnm4a1aimaddcamo {
            text = "MOD: Камуфляж";
            script = "[""M4A1_Aim"","""","""",""ItemMatchbox_DZE"","""","""","""",""HandChemGreen"","""","""","""","""","""","""","""","""","""","""","""",""M4A1_Aim_camo"",""Камуфляж добавлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class M4A1_Aim_camo {
        class wpnm4a1aimcamoaddsd {
            text = "MOD: Поставить ПБС";
            script = "[""M4A1_Aim_camo"",""work"","""",""ItemToolbox"","""","""","""",""ItemPole"",""TrashTinCan"","""","""","""","""","""","""","""","""","""","""",""M4A1_AIM_SD_camo"",""Глушитель установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnm4a1aimcamoaddflash {
            text = "MOD: Поставить фонарь";
            script = "[""M4A1_Aim_camo"","""","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""",""ItemFlashlightRed"","""","""","""",""M4A3_CCO_EP1"",""Тактический фонарь установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnm4a1aimremcamo {
            text = "MOD: Убрать камуфляж";
            script = "[""M4A1_Aim_camo"","""","""","""","""","""","""",""ItemWaterbottle"","""","""","""",""ItemWaterbottleUnfilled"","""","""","""","""","""","""","""",""M4A1_Aim"",""Камуфляж удален""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class M4A3_CCO_EP1 {
        class wpnm4a3ccoremflash {
            text = "MOD: Снять фонарь";
            script = "[""M4A3_CCO_EP1"","""","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""M4A1_Aim_camo"",""Тактический фонарь снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class M4A1_AIM_SD_camo {
        class wpnm4a1aimcamoremsd {
            text = "MOD: Снять ПБС";
            script = "[""M4A1_AIM_SD_camo"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""M4A1_Aim_camo"",""Глушитель снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class M4A1_RCO_GL {
        class wpnm4a1rcogladdholo {
            text = "MOD: Поставить Holo";
            script = "[""M4A1_RCO_GL"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""",""PartGlass"","""","""","""","""","""","""","""","""",""M4A1_HWS_GL"",""Прицел Holo установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnm4a1rcogladdcamo {
            text = "MOD: Камуфляж";
            script = "[""M4A1_RCO_GL"","""","""",""ItemMatchbox_DZE"","""","""","""",""HandChemGreen"","""","""","""","""","""","""","""","""","""","""","""",""M4A3_RCO_GL_EP1"",""Камуфляж добавлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class M4A3_RCO_GL_EP1 {
        class wpnm4a3rcoglremcamo {
            text = "MOD: Убрать камуфляж";
            script = "[""M4A3_RCO_GL_EP1"","""","""","""","""","""","""",""ItemWaterbottle"","""","""","""",""ItemWaterbottleUnfilled"","""","""","""","""","""","""","""",""M4A1_RCO_GL"",""Камуфляж удален""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class M4A1_HWS_GL {
        class wpnm4a1hwsgladdrco {
            text = "MOD: Поставить RCO";
            script = "[""M4A1_HWS_GL"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""",""Binocular"","""","""","""",""M4A1_RCO_GL"",""Прицел RCO установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnm4a1hwsgladdcamo {
            text = "MOD: Камуфляж";
            script = "[""M4A1_HWS_GL"","""","""",""ItemMatchbox_DZE"","""","""","""",""HandChemGreen"","""","""","""","""","""","""","""","""","""","""","""",""M4A1_HWS_GL_camo"",""Камуфляж добавлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class M4A1_HWS_GL_camo {
        class wpnm4a1hwsglcamoaddsd {
            text = "MOD: Поставить ПБС";
            script = "[""M4A1_HWS_GL_camo"",""work"","""",""ItemToolbox"","""","""","""",""ItemPole"",""TrashTinCan"","""","""","""","""","""","""","""","""","""","""",""M4A1_HWS_GL_SD_Camo"",""Глушитель установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnm4a1hwsglremcamo {
            text = "MOD: Убрать камуфляж";
            script = "[""M4A1_HWS_GL_camo"","""","""","""","""","""","""",""ItemWaterbottle"","""","""","""",""ItemWaterbottleUnfilled"","""","""","""","""","""","""","""",""M4A1_HWS_GL"",""Камуфляж удален""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class M4A1_HWS_GL_SD_Camo {
        class wpnm4a1hwsglcamoremsd {
            text = "MOD: Снять ПБС";
            script = "[""M4A1_HWS_GL_SD_Camo"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""M4A1_HWS_GL_camo"",""Глушитель снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class G36C {
        class wpng36caddeotechsd {
            text = "MOD: ПБС и EOtech";
            script = "[""G36C"",""work"","""",""ItemToolbox"","""","""","""",""ItemPole"",""TrashTinCan"",""PartGlass"","""","""","""","""","""","""","""","""","""",""G36_C_SD_eotech"",""Глушитель и прицел EOtech установлены""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpng36caddcamo {
            text = "MOD: Камуфляж";
            script = "[""G36C"","""","""",""ItemMatchbox_DZE"","""","""","""",""HandChemGreen"","""","""","""","""","""","""","""","""","""","""","""",""G36C_camo"",""Камуфляж добавлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class G36_C_SD_eotech {
        class wpng36cremeotechsd {
            text = "MOD: Снять ПБС";
            script = "[""G36_C_SD_eotech"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""G36C"",""Глушитель и прицел EOtech сняты""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpng36ceotechsdaddcamo {
            text = "MOD: Камуфляж";
            script = "[""G36_C_SD_eotech"","""","""",""ItemMatchbox_DZE"","""","""","""",""HandChemGreen"","""","""","""","""","""","""","""","""","""","""","""",""G36_C_SD_camo"",""Камуфляж добавлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class G36C_camo {
        class wpng36ccamoaddeotechsd {
            text = "MOD: ПБС и EOtech";
            script = "[""G36C_camo"",""work"","""",""ItemToolbox"","""","""","""",""ItemPole"",""TrashTinCan"",""PartGlass"","""","""","""","""","""","""","""","""","""",""G36_C_SD_camo"",""Глушитель и прицел EOtech установлены""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpng36cremcamo {
            text = "MOD: Убрать камуфляж";
            script = "[""G36C_camo"","""","""","""","""","""","""",""ItemWaterbottle"","""","""","""",""ItemWaterbottleUnfilled"","""","""","""","""","""","""","""",""G36C"",""Камуфляж удален""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class G36_C_SD_camo {
        class wpng36ccamoremeotechsd {
            text = "MOD: Снять ПБС и EOtech";
            script = "[""G36_C_SD_camo"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""G36C_camo"",""Глушитель и прицел EOtech сняты""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpng36ceotechsdremcamo {
            text = "MOD: Убрать камуфляж";
            script = "[""G36_C_SD_camo"","""","""","""","""","""","""",""ItemWaterbottle"","""","""","""",""ItemWaterbottleUnfilled"","""","""","""","""","""","""","""",""G36_C_SD_eotech"",""Камуфляж удален""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class m8_carbine {
        class wpnm8holoaddsd {
            text = "MOD: ПБС, Фонарь, Holo";
            script = "[""m8_carbine"",""work"","""",""ItemToolbox"","""","""","""",""ItemPole"",""TrashTinCan"",""PartGlass"","""","""","""","""","""",""ItemFlashlightRed"","""","""","""",""m8_holo_sd"",""Глушитель, фонарь и прицел Holo установлены""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnm8carbineaddgl {
            text = "MOD: CCO и M320";
            script = "[""m8_carbine"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"",""ItemPole"",""PartGlass"","""","""","""","""","""","""","""","""","""",""m8_carbineGL"",""Прицел CCO и подствольный гранатомет M320 установлены""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class m8_carbineGL {
        class wpnm8carbineremgl {
            text = "MOD: Снять M320";
            script = "[""m8_carbineGL"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""",""Binocular"","""","""","""",""m8_carbine"",""Подствольный гранатомет M320 снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class m8_holo_sd {
        class wpnm8holoremsd {
            text = "MOD: Поставить опт.прицел";
            script = "[""m8_holo_sd"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""",""Binocular"","""","""","""",""m8_carbine"",""Оптический прицел установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class SCAR_L_CQC_EGLM_Holo {
        class wpnmk16eglmholoaddrco {
            text = "MOD: Поставить RCO";
            script = "[""SCAR_L_CQC_EGLM_Holo"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""",""Binocular"","""","""","""",""SCAR_L_STD_EGLM_RCO"",""Прицел RCO установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnmk16cqcremeglm {
            text = "MOD: Снять EGLM";
            script = "[""SCAR_L_CQC_EGLM_Holo"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""SCAR_L_CQC_Holo"",""Подствольный гранатомет EGLM снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class SCAR_L_STD_EGLM_RCO {
        class wpnmk16eglmrcoaddholo {
            text = "MOD: Поставить Holo";
            script = "[""SCAR_L_STD_EGLM_RCO"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""",""PartGlass"","""","""","""","""","""","""","""","""",""SCAR_L_CQC_EGLM_Holo"",""Прицел Holo установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class SCAR_L_CQC {
        class wpnmk16addholo {
            text = "MOD: Holo и Фонарь";
            script = "[""SCAR_L_CQC"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""",""PartGlass"","""","""","""","""",""ItemFlashlightRed"","""","""","""",""SCAR_L_CQC_Holo"",""Прицел Holo установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnmk16cqcaddccosd {
            text = "MOD: Поставить CCO и ПБС";
            script = "[""SCAR_L_CQC"",""work"","""",""ItemToolbox"","""","""","""",""ItemPole"",""TrashTinCan"",""PartGlass"","""","""","""","""","""","""","""","""","""",""SCAR_L_CQC_CCO_SD"",""Глушитель и прицел CCO установлены""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class SCAR_L_CQC_CCO_SD {
        class wpnmk16cqcremccosd {
            text = "MOD: Снять CCO и ПБС";
            script = "[""SCAR_L_CQC_CCO_SD"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""SCAR_L_CQC"",""Глушитель и прицел Holo сняты""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class SCAR_L_CQC_Holo {
        class wpnmk16remholo {
            text = "MOD: Снять Holo и Фонарь";
            script = "[""SCAR_L_CQC_Holo"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""SCAR_L_CQC"",""Прицел Holo снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnmk16cqcaddeglm {
            text = "MOD: Поставить EGLM";
            script = "[""SCAR_L_CQC_Holo"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"",""ItemPole"","""","""","""","""","""","""","""","""","""","""",""SCAR_L_CQC_EGLM_Holo"",""Подствольный гранатомет EGLM установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class SCAR_L_STD_HOLO {
        class wpnmk16stdholoaddcqt {
            text = "MOD: Поставить Mk4/CQT";
            script = "[""SCAR_L_STD_HOLO"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""",""Binocular"","""","""","""",""SCAR_L_STD_Mk4CQT"",""Прицел Mk4/CQT установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class SCAR_L_STD_Mk4CQT {
        class wpnmk16stdcqtaddholo {
            text = "MOD: Поставить Holo";
            script = "[""SCAR_L_STD_Mk4CQT"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""",""PartGlass"","""","""","""","""","""","""","""","""",""SCAR_L_STD_HOLO"",""Прицел Holo установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class SCAR_H_STD_EGLM_Spect {
        class wpnmmk17eglmspectaddcqccco {
            text = "MOD: Поставить CCO";
            script = "[""SCAR_H_STD_EGLM_Spect"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""",""PartGlass"","""","""","""","""","""","""","""","""",""SCAR_H_CQC_CCO"",""Прицел Holo установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class SCAR_H_CQC_CCO {
        class wpnmk17cqcccoaddsd {
            text = "MOD: Поставить ПБС";
            script = "[""SCAR_H_CQC_CCO"",""work"","""",""ItemToolbox"","""","""","""",""ItemPole"",""TrashTinCan"","""","""","""","""","""","""","""","""","""","""",""SCAR_H_CQC_CCO_SD"",""Глушитель установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnmmk17cqcccoaddeglmspect {
            text = "MOD: Поставить EGLM и RCO";
            script = "[""SCAR_H_CQC_CCO"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""",""ItemPole"","""","""","""","""","""",""Binocular"","""","""","""",""SCAR_H_STD_EGLM_Spect"",""Подствольный гранатомет EGLM и прицел RCO установлены""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class SCAR_H_CQC_CCO_SD {
        class wpnmk17cqcccoremsd {
            text = "MOD: Снять ПБС";
            script = "[""SCAR_H_CQC_CCO_SD"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""SCAR_H_CQC_CCO"",""Глушитель снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class SCAR_H_LNG_Sniper {
        class wpnmk17lngsniperaddsd {
            text = "MOD: Поставить ПБС";
            script = "[""SCAR_H_LNG_Sniper"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""",""ItemPole"","""","""","""","""","""","""","""","""","""",""SCAR_H_LNG_Sniper_SD"",""Глушитель установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class SCAR_H_LNG_Sniper_SD {
        class wpnmk17lngsniperremsd {
            text = "MOD: Снять ПБС";
            script = "[""SCAR_H_LNG_Sniper_SD"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""SCAR_H_LNG_Sniper"",""Глушитель снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class Sa58P_EP1 {
        class wpnsa58paddmetalstock {
            text = "MOD: Складной приклад";
            script = "[""Sa58P_EP1"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""","""","""","""","""",""Sa58V_EP1"",""Складной приклад установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class Sa58V_EP1 {
        class wpnsa58vaddwoodstock {
            text = "MOD: Деревянный приклад";
            script = "[""Sa58V_EP1"",""work"","""",""ItemToolbox"",""ItemHatchet_DZE"",""ItemKnife"","""",""PartWoodLumber"","""","""","""","""","""","""","""","""","""","""","""",""Sa58P_EP1"",""Деревянный приклад установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class AK_47_M {
        class wpnak47maddmetalstock {
            text = "MOD: Складной приклад";
            script = "[""AK_47_M"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""","""","""","""","""",""AK_47_S"",""Складной приклад установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class AKS_GOLD {
        class wpnaksgoldaddblack {
            text = "MOD: Воронение";
            script = "[""AKS_GOLD"",""work"",""fire"",""ItemToolbox"","""","""","""",""PartGeneric"",""ItemMixOil"","""","""","""","""","""","""","""","""","""","""",""AK_47_S"",""АКС покрыт воронением""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class AK_47_S {
        class wpnak47saddgold {
            text = "MOD: Покрыть золотом";
            script = "[""AK_47_S"",""work"",""fire"",""ItemToolbox"","""","""","""",""PartOreGold"",""PartOreGold"",""PartOreGold"","""","""","""","""","""","""","""","""","""",""AKS_GOLD"",""АКС покрыт золотом""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnak47saddwoodstock {
            text = "MOD: Деревянный приклад";
            script = "[""AK_47_S"",""work"","""",""ItemToolbox"",""ItemHatchet_DZE"",""ItemKnife"","""",""PartWoodLumber"","""","""","""","""","""","""","""","""","""","""","""",""AK_47_M"",""Деревянный приклад установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class AK_74 {
        class wpnak74addmetalstock {
            text = "MOD: Складной приклад";
            script = "[""AK_74"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""","""","""","""","""",""AKS_74"",""Складной приклад установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnak74addgl {
            text = "MOD: Поставить ГП-25";
            script = "[""AK_74"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"",""ItemPole"","""","""","""","""","""","""","""","""","""","""",""AK_74_GL"",""Подствольный гранатомет ГП-25 установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class AK_74_GL {
        class wpnak74gladdkobra {
            text = "MOD: Поставить Кобру";
            script = "[""AK_74_GL"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""",""PartGlass"","""","""","""","""","""","""","""","""",""AK_74_GL_kobra"",""Прицел Кобра установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnak74remgl {
            text = "MOD: Снять ГП-25";
            script = "[""AK_74_GL"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""AK_74"",""Подствольный гранатомет ГП-25 снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class AK_74_GL_kobra {
        class wpnak74glremkobra {
            text = "MOD: Снять Кобру";
            script = "[""AK_74_GL_kobra"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""AK_74_GL"",""Прицел Кобра снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class AKS_74 {
        class wpnaks74addwoodstock {
            text = "MOD: Деревянный приклад";
            script = "[""AKS_74"",""work"","""",""ItemToolbox"",""ItemHatchet_DZE"",""ItemKnife"","""",""PartWoodLumber"","""","""","""","""","""","""","""","""","""","""","""",""AK_74"",""Деревянный приклад установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnaks74addkobra {
            text = "MOD: Поставить Кобру";
            script = "[""AKS_74"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""",""PartGlass"","""","""","""","""","""","""","""","""",""AKS_74_kobra"",""Прицел Кобра установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnaks74addpso {
            text = "MOD: Поставить ПСО-1";
            script = "[""AKS_74"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""",""Binocular"","""","""","""",""AKS_74_pso"",""Прицел ПСО-1 установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnak74addnspu {
            text = "MOD: Поставить НСПУ";
            script = "[""AKS_74"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""",""Binocular"",""NVGoggles"","""","""",""AKS_74_NSPU"",""Прицел НСПУ установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class AKS_74_kobra {
        class wpnaks74remkobra {
            text = "MOD: Снять Кобру";
            script = "[""AKS_74_kobra"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""AKS_74"",""Прицел Кобра снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnaks74kobraaddpso {
            text = "MOD: Поставить ПСО-1";
            script = "[""AKS_74_kobra"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""",""Binocular"","""","""","""",""AKS_74_pso"",""Прицел ПСО-1 установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnaks74kobraaddnspu {
            text = "MOD: Поставить НСПУ";
            script = "[""AKS_74_kobra"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""",""Binocular"",""NVGoggles"","""","""",""AKS_74_NSPU"",""Прицел НСПУ установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class AKS_74_pso {
        class wpnaks74psoaddkobra {
            text = "MOD: Поставить Кобру";
            script = "[""AKS_74_pso"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""",""PartGlass"","""","""","""","""","""","""","""","""",""AKS_74_kobra"",""Прицел Кобра установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnaks74rempso {
            text = "MOD: Снять ПСО-1";
            script = "[""AKS_74_pso"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""AKS_74"",""Прицел ПСО-1 снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnaks74psoaddnspu {
            text = "MOD: Поставить НСПУ";
            script = "[""AKS_74_pso"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""","""",""NVGoggles"","""","""",""AKS_74_NSPU"",""Прицел НСПУ установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class AKS_74_NSPU {
        class wpnaks74nspuaddkobra {
            text = "MOD: Поставить Кобру";
            script = "[""AKS_74_NSPU"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""",""PartGlass"","""","""","""","""","""","""","""","""",""AKS_74_kobra"",""Прицел Кобра установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnaks74nspuaddpso {
            text = "MOD: Поставить ПСО-1";
            script = "[""AKS_74_NSPU"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""",""Binocular"","""","""","""",""AKS_74_pso"",""Прицел ПСО-1 установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnak74remnspu {
            text = "MOD: Снять НСПУ";
            script = "[""AKS_74_NSPU"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""AKS_74"",""Прицел НСПУ снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class AK_107_kobra {
        class wpnak107addpso {
            text = "MOD: Поставить ПСО-1";
            script = "[""AK_107_kobra"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""",""Binocular"","""","""","""",""AK_107_pso"",""Прицел ПСО-1 установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnak107kobraaddgl {
            text = "MOD: Поставить ГП-25";
            script = "[""AK_107_kobra"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"",""ItemPole"","""","""","""","""","""","""","""","""","""","""",""AK_107_GL_kobra"",""Подствольный гранатомет ГП-25 установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class AK_107_pso {
        class wpnak107addkobra {
            text = "MOD: Поставить Кобру";
            script = "[""AK_107_pso"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""",""PartGlass"","""","""","""","""","""","""","""","""",""AK_107_kobra"",""Прицел Кобра установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnak107psoaddgl {
            text = "MOD: Поставить ГП-25";
            script = "[""AK_107_pso"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"",""ItemPole"","""","""","""","""","""","""","""","""","""","""",""AK_107_GL_pso"",""Подствольный гранатомет ГП-25 установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class AK_107_GL_kobra {
        class wpnak107gladdpso {
            text = "MOD: Поставить ПСО-1";
            script = "[""AK_107_GL_kobra"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""",""Binocular"","""","""","""",""AK_107_GL_pso"",""Прицел ПСО-1 установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnak107kobraremgl {
            text = "MOD: Снять ГП-25";
            script = "[""AK_107_GL_kobra"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""AK_107_kobra"",""Подствольный гранатомет ГП-25 снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class AK_107_GL_pso {
        class wpnak107gladdkobra {
            text = "MOD: Поставить Кобру";
            script = "[""AK_107_GL_pso"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""",""PartGlass"","""","""","""","""","""","""","""","""",""AK_107_GL_kobra"",""Прицел Кобра установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnak107psoremgl {
            text = "MOD: Снять ГП-25";
            script = "[""AK_107_GL_pso"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""AK_107_pso"",""Подствольный гранатомет ГП-25 снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class M16A2 {
        class wpnm16a2addaim {
            text = "MOD: Поставить AIM";
            script = "[""M16A2"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""",""PartGlass"","""","""","""","""","""","""","""","""",""M16A4"",""Прицел AIM установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnm16a2addacog {
            text = "MOD: Поставить ACOG";
            script = "[""M16A2"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""",""Binocular"","""","""","""",""M16A4_ACG"",""Прицел ACOG установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnm16a2addgl {
            text = "MOD: Поставить M203";
            script = "[""M16A2"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"",""ItemPole"","""","""","""","""","""","""","""","""","""","""",""M16A2GL"",""Подствольный гранатомет M203 установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class M16A2GL {
        class wpnm16a2remgl {
            text = "MOD: Снять M203";
            script = "[""M16A2GL"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""M16A2"",""Подствольный гранатомет M203 снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnm16a2gladdlaser {
            text = "MOD: Поставить ЛЦУ";
            script = "[""M16A2GL"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""","""","""","""","""",""M16A4_GL"",""ЛЦУ установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class M16A4 {
        class wpnm16a2remaim {
            text = "MOD: Снять AIM";
            script = "[""M16A4"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""M16A2"",""Прицел AIM снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class M16A4_ACG {
        class wpnm16a2remacog {
            text = "MOD: Снять ACOG";
            script = "[""M16A4_ACG"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""M16A2"",""Прицел ACOG снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnm16a2acogaddaim {
            text = "MOD: Поставить AIM";
            script = "[""M16A4_ACG"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""",""PartGlass"","""","""","""","""","""","""","""","""",""M16A4"",""Прицел AIM установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class M16A4_GL {
        class wpnm16a4gladdacog {
            text = "MOD: Поставить ACOG";
            script = "[""M16A4_GL"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""",""Binocular"","""","""","""",""M16A4_ACG_GL"",""Прицел ACOG установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnm16a4glremgl {
            text = "MOD: Снять M203";
            script = "[""M16A4_GL"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""M16A2"",""Подствольный гранатомет M203 снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnm16a4glremlaser {
            text = "MOD: Снять ЛЦУ";
            script = "[""M16A4_GL"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""M16A2GL"",""ЛЦУ снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class M16A4_ACG_GL {
        class wpnm16a4glremacog {
            text = "MOD: Снять ACOG";
            script = "[""M16A4_ACG_GL"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""M16A4_GL"",""Прицел ACOG снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnm16a4remgl {
            text = "MOD: Снять M203";
            script = "[""M16A4_ACG_GL"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""M16A4_ACG"",""Подствольный гранатомет M203 снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class BAF_L85A2_RIS_Holo {
        class wpnl85a2holoaddacog {
            text = "MOD: Поставить ACOG";
            script = "[""BAF_L85A2_RIS_Holo"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""",""Binocular"","""","""","""",""BAF_L85A2_RIS_ACOG"",""Прицел ACOG установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnl85a2holoaddsusat {
            text = "MOD: Поставить SUSAT";
            script = "[""BAF_L85A2_RIS_Holo"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""",""Binocular"","""","""","""",""BAF_L85A2_RIS_SUSAT"",""Прицел SUSAT установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnl85a2holoaddgl {
            text = "MOD: Поставить UGL";
            script = "[""BAF_L85A2_RIS_Holo"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"",""ItemPole"","""","""","""","""","""","""","""","""","""","""",""BAF_L85A2_UGL_Holo"",""Подствольный гранатомет UGL установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class BAF_L85A2_UGL_Holo {
        class wpnl85a2uglholoaddacog {
            text = "MOD: Поставить ACOG";
            script = "[""BAF_L85A2_UGL_Holo"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""",""Binocular"","""","""","""",""BAF_L85A2_UGL_ACOG"",""Прицел ACOG установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnl85a2uglholoaddsusat {
            text = "MOD: Поставить SUSAT";
            script = "[""BAF_L85A2_UGL_Holo"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""",""Binocular"","""","""","""",""BAF_L85A2_UGL_SUSAT"",""Прицел SUSAT установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnl85a2uglholoremgl {
            text = "MOD: Снять UGL";
            script = "[""BAF_L85A2_UGL_Holo"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""BAF_L85A2_RIS_Holo"",""Подствольный гранатомет UGL снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class BAF_L85A2_RIS_SUSAT {
        class wpnl85a2susataddholo {
            text = "MOD: Поставить Holo";
            script = "[""BAF_L85A2_RIS_SUSAT"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""",""PartGlass"","""","""","""","""","""","""","""","""",""BAF_L85A2_RIS_Holo"",""Прицел Holo установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnl85a2susataddacog {
            text = "MOD: Поставить ACOG";
            script = "[""BAF_L85A2_RIS_SUSAT"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""",""Binocular"","""","""","""",""BAF_L85A2_RIS_ACOG"",""Прицел ACOG установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnl85a2susataddgl {
            text = "MOD: Поставить UGL";
            script = "[""BAF_L85A2_RIS_SUSAT"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"",""ItemPole"","""","""","""","""","""","""","""","""","""","""",""BAF_L85A2_UGL_SUSAT"",""Подствольный гранатомет UGL установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class BAF_L85A2_RIS_ACOG {
        class wpnl85a2acogaddholo {
            text = "MOD: Поставить Holo";
            script = "[""BAF_L85A2_RIS_ACOG"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""",""PartGlass"","""","""","""","""","""","""","""","""",""BAF_L85A2_RIS_Holo"",""Прицел Holo установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnl85a2acogaddsusat {
            text = "MOD: Поставить SUSAT";
            script = "[""BAF_L85A2_RIS_ACOG"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""",""Binocular"","""","""","""",""BAF_L85A2_RIS_SUSAT"",""Прицел SUSAT установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnl85a2acogaddgl {
            text = "MOD: Поставить UGL";
            script = "[""BAF_L85A2_RIS_ACOG"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"",""ItemPole"","""","""","""","""","""","""","""","""","""","""",""BAF_L85A2_UGL_ACOG"",""Подствольный гранатомет UGL установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class BAF_L85A2_UGL_SUSAT {
        class wpnl85a2uglsusataddholo {
            text = "MOD: Поставить Holo";
            script = "[""BAF_L85A2_UGL_SUSAT"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""",""PartGlass"","""","""","""","""","""","""","""","""",""BAF_L85A2_UGL_Holo"",""Прицел Holo установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnl85a2uglsusataddacog {
            text = "MOD: Поставить ACOG";
            script = "[""BAF_L85A2_UGL_SUSAT"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""",""Binocular"","""","""","""",""BAF_L85A2_UGL_ACOG"",""Прицел ACOG установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnl85a2susatremgl {
            text = "MOD: Снять UGL";
            script = "[""BAF_L85A2_UGL_SUSAT"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""BAF_L85A2_RIS_SUSAT"",""Подствольный гранатомет UGL снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class BAF_L85A2_UGL_ACOG {
        class wpnl85a2uglacogaddholo {
            text = "MOD: Поставить Holo";
            script = "[""BAF_L85A2_UGL_ACOG"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""",""PartGlass"","""","""","""","""","""","""","""","""",""BAF_L85A2_UGL_Holo"",""Прицел Holo установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnl85a2uglacogaddsusat {
            text = "MOD: Поставить SUSAT";
            script = "[""BAF_L85A2_UGL_ACOG"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""",""Binocular"","""","""","""",""BAF_L85A2_UGL_SUSAT"",""Прицел SUSAT установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnl85a2acogremgl {
            text = "MOD: Снять UGL";
            script = "[""BAF_L85A2_UGL_ACOG"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""BAF_L85A2_RIS_ACOG"",""Подствольный гранатомет UGL снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class Sa58V_CCO_EP1 {
        class wpnsa58vccoaddrco {
            text = "MOD: Поставить RCO";
            script = "[""Sa58V_CCO_EP1"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""",""Binocular"","""","""","""",""Sa58V_RCO_EP1"",""Прицел RCO установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class Sa58V_RCO_EP1 {
        class wpnsa58vrcoaddcco {
            text = "MOD: Поставить CCO";
            script = "[""Sa58V_RCO_EP1"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""",""PartGlass"","""","""","""","""","""","""","""","""",""Sa58V_CCO_EP1"",""Прицел CCO установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class G36K {
        class wpng36kaddcamo {
            text = "MOD: Камуфляж";
            script = "[""G36K"","""","""",""ItemMatchbox_DZE"","""","""","""",""HandChemGreen"","""","""","""","""","""","""","""","""","""","""","""",""G36K_camo"",""Камуфляж добавлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class G36K_camo {
        class wpng36kremcamo {
            text = "MOD: Убрать камуфляж";
            script = "[""G36K_camo"","""","""","""","""","""","""",""ItemWaterbottle"","""","""","""",""ItemWaterbottleUnfilled"","""","""","""","""","""","""","""",""G36K"",""Камуфляж удален""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class G36a {
        class wpng36aaddcamo {
            text = "MOD: Камуфляж";
            script = "[""G36a"","""","""",""ItemMatchbox_DZE"","""","""","""",""HandChemGreen"","""","""","""","""","""","""","""","""","""","""","""",""G36A_camo"",""Камуфляж добавлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class G36A_camo {
        class wpng36aremcamo {
            text = "MOD: Убрать камуфляж";
            script = "[""G36A_camo"","""","""","""","""","""","""",""ItemWaterbottle"","""","""","""",""ItemWaterbottleUnfilled"","""","""","""","""","""","""","""",""G36a"",""Камуфляж удален""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class MG36 {
        class wpnmg36addcamo {
            text = "MOD: Камуфляж";
            script = "[""MG36"","""","""",""ItemMatchbox_DZE"","""","""","""",""HandChemGreen"","""","""","""","""","""","""","""","""","""","""","""",""MG36_camo"",""Камуфляж добавлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class MG36_camo {
        class wpnmg36remcamo {
            text = "MOD: Убрать камуфляж";
            script = "[""MG36_camo"","""","""","""","""","""","""",""ItemWaterbottle"","""","""","""",""ItemWaterbottleUnfilled"","""","""","""","""","""","""","""",""MG36"",""Камуфляж удален""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class FN_FAL {
        class fnfaladdnv {
            text = "MOD: Поставить AN/PVS-4";
            script = "[""FN_FAL"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""",""Binocular"",""NVGoggles"","""","""",""FN_FAL_ANPVS4"",""Прицел AN/PVS-4 установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class FN_FAL_ANPVS4 {
        class fnfalremnv {
            text = "MOD: Убрать AN/PVS-4";
            script = "[""FN_FAL_ANPVS4"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""FN_FAL"",""Прицел AN/PVS-4 снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class M249_EP1_DZ {
        class wpnm249addopt {
            text = "MOD: Поставить прицел";
            script = "[""M249_EP1_DZ"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""",""Binocular"","""","""","""",""M249_m145_EP1_DZE"",""Оптический прицел установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class M249_m145_EP1_DZE {
        class wpnm249remopt {
            text = "MOD: Убрать прицел";
            script = "[""M249_m145_EP1_DZE"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""M249_EP1_DZ"",""Оптический прицел снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class M240_DZ {
        class wpnm240addopt {
            text = "MOD: Поставить прицел";
            script = "[""M240_DZ"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""",""Binocular"","""","""","""",""m240_scoped_EP1_DZE"",""Оптический прицел установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class m240_scoped_EP1_DZE {
        class wpnm240remopt {
            text = "MOD: Убрать прицел";
            script = "[""m240_scoped_EP1_DZE"",""work"","""",""ItemToolbox"","""","""","""","""","""","""","""","""","""","""","""","""","""","""","""",""M240_DZ"",""Оптический прицел снят""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class SVD {
        class wpnsvdaddcamowood {
            text = "MOD: Камуфляж лес";
            script = "[""SVD"","""","""",""ItemKnife"","""","""","""",""Skin_Sniper1_DZ"",""HandChemGreen"","""","""","""","""","""","""","""","""","""","""",""SVD_CAMO"",""Камуфляж добавлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnsvdaddcamodesert {
            text = "MOD: Камуфляж пустыня";
            script = "[""SVD"","""","""",""ItemKnife"","""","""","""",""Skin_CZ_Soldier_Sniper_EP1_DZ"",""HandChemGreen"","""","""","""","""","""","""","""","""","""","""",""SVD_des_EP1"",""Камуфляж добавлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class svdaddnspu {
            text = "MOD: Поставить НСПУ";
            script = "[""SVD"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""","""",""NVGoggles"","""","""",""SVD_NSPU_EP1"",""Прицел НСПУ установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class SVD_CAMO {
        class wpnsvdcamowoodadddesert {
            text = "MOD: Камуфляж пустыня";
            script = "[""SVD_CAMO"","""","""",""ItemKnife"","""","""","""",""Skin_CZ_Soldier_Sniper_EP1_DZ"",""HandChemGreen"","""","""","""","""","""","""","""","""","""","""",""SVD_des_EP1"",""Камуфляж добавлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnsvdremcamowood {
            text = "MOD: Убрать камуфляж";
            script = "[""SVD_CAMO"","""","""","""","""","""","""",""ItemWaterbottle"","""","""","""",""ItemWaterbottleUnfilled"","""","""","""","""","""","""","""",""SVD"",""Камуфляж удален""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class SVD_des_EP1 {
        class wpnsvdcamodesertaddwood {
            text = "MOD: Камуфляж лес";
            script = "[""SVD_des_EP1"","""","""",""ItemKnife"","""","""","""",""Skin_Sniper1_DZ"",""HandChemGreen"","""","""","""","""","""","""","""","""","""","""",""SVD_CAMO"",""Камуфляж добавлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
        class wpnsvdremcamodesert {
            text = "MOD: Убрать камуфляж";
            script = "[""SVD_des_EP1"","""","""","""","""","""","""",""ItemWaterbottle"","""","""","""",""ItemWaterbottleUnfilled"","""","""","""","""","""","""","""",""SVD"",""Камуфляж удален""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class SVD_NSPU_EP1 {
        class svdremnspu {
            text = "MOD: Снять НСПУ";
            script = "[""SVD_NSPU_EP1"",""work"","""",""ItemToolbox"","""","""","""",""PartGeneric"","""","""","""","""","""","""","""",""Binocular"","""","""","""",""SVD"",""Оптический прицел установлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class M24_des_EP1 {
        class wpnm24addwoodcamo {
            text = "MOD: Камуфляж лес";
            script = "[""M24_des_EP1"","""","""",""ItemMatchbox_DZE"","""","""","""",""HandChemGreen"","""","""","""","""","""","""","""","""","""","""","""",""M24"",""Камуфляж добавлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
    class M24 {
        class wpnm24adddesertcamo {
            text = "MOD: Камуфляж пустыня";
            script = "[""M24"","""","""",""ItemMatchbox_DZE"","""","""","""",""HandChemGreen"","""","""","""","""","""","""","""","""","""","""","""",""M24_des_EP1"",""Камуфляж добавлен""]execVM ""Scripts\weaponmod.sqf"";";
        };
    };
};

 

 

 

Если кому понадобится, пользуйтесь на здоровье. Схема добавления новых вариантов апгрейда в сообщении выше.

Share this post


Link to post
Share on other sites

как всем тут нравится мартышкин труд.

вложенные массивы использовать не проще? тогда и количество предметов ограничено вместимостью инвентаря и рюкзака

[""LeeEnfield"",[""ItemToolbox""],[""PartGeneric"",""PartGeneric"",""ItemPole"",""ItemPole""],[""Binocular""],[""""],[""""],""M14_EP1"",""Колиматор установлен""]

и таки код компактнее

{
	if (_x !="" && !(player hasWeapon _x)) exitwith {
		_txt = (gettext (configFile >> 'cfgweapons' >> _x >> 'displayName'));
		systemChat format["Необходимо %1 для этого",_txt];
		_exit = true;
	};
} count _tools;
if (_exit) exitWith {};

простенький цикл вместо перебора каждого элемента.

а про верстак и костёр, хорошая идея.

Может поделитесь своим вариантом?

Share this post


Link to post
Share on other sites

Может поделитесь своим вариантом?

я уже поделился ключевым куском кода. осталось добавить обвязку с _this select и addweapon. тем более выше есть готовый код. замените 16 условий на 4 цикла и всё.

Share this post


Link to post
Share on other sites

не проще ли поставить asc weapon pack

не проще, как минимум потому, что каждому игроку придётся докачивать дополнительный мод.

Share this post


Link to post
Share on other sites

не проще, как минимум потому, что каждому игроку придётся докачивать дополнительный мод.

ну если выкачать 50мб это проблема, то конечно

Share this post


Link to post
Share on other sites

ну если выкачать 50мб это проблема, то конечно

дело не в объёме. важен сам факт, необходимости что то качать.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By Venom21
      Появилась такая проблема, нужно закрыть некоторые слоты под одежду, когда на определённый слот одет предмет…
      пример: возьмём экзоскелет от Фидова, там есть две версии которая одеваеться как на тело и ноги, и есть которая одеваться на разгрузку и пояс, так вот, нужно например чтобы при одетом экзаче на тело и ноги слоты под пояс и разгрузку блокировались, либо только под определенные предметы, если есть интерес то цену можем в личке обсудить…
      P.S. Разрешение от Фидова на переделку и переупаковку есть)
    • By CubeIn
      Здарова, уважаемые знатоки, вопрос.
      Мне скриптер скинул скрипт и сказал закинуть её в северную часть, но не указал куда именно. Подскажите пожалуйста, куда мне её деть? 
    • By CubeIn
      Здарова всем!
      У меня срочный вопрос опытным хозяинам серверостроения. Есть ли возможность настроить холод на карте Namalsk? А то слишком холодновато игрокам, а где это настраивать...
    • By BorizzK
      Накатал по быстрому для себя и своих ребят от нефиг делать, тк в командировке и дейзить возможности нет, только удаленно ковырять сервер
      Внутри настройки через переменные
      путь к базе сервера и инстанс ид берет из конфига сервера (нужно настроить имя файла и путь в файле)
      Мониторит сервер по названию окна, сохранив pid
      При вылете в 90% случаев корректно убивает процесс
      При перезапуске так же
      При каждом старте с 0 и при перезапусках делает бэкапы баз/настроек/
      Пожалуйста, Войдите или Зарегистрируйтесь, чтобы увидеть это: Вложение.
    • By BorizzK
      В эксперементалке 1.08 если сбросить предмет находясь на машине (крыше, багажнике, капоте в кузове) предмет проваливается сквозь машину на землю или оказывается в ее текстурах
       
      Тикет
      https://feedback.bistudio.com/T152071
       
      ответ богемии поразителен - сейчас нет простого решения
       
      А ниже что? Проще не бывает...
       
      Собственно код фикса (Автор Я)
       
      Code ``` modded class ItemBase extends InventoryItem { override void EEItemLocationChanged(notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc) { super.EEItemLocationChanged(oldLoc,newLoc); if (newLoc.GetType() == InventoryLocationType.GROUND) { if (oldLoc.GetParent()) { PlayerBase player = PlayerBase.Cast(oldLoc.GetParent()); if (player) { FixPositionIfDropOnCar(player); } } } } void FixPositionIfDropOnCar(PlayerBase player) { vector m_RayStart; vector m_RayEnd; m_RayStart = player.GetPosition(); m_RayStart[1] = m_RayStart[1] + 0.5; m_RayEnd = m_RayStart; m_RayEnd[1] = m_RayEnd[1] - 1; RaycastRVParams m_RayCastInput = new RaycastRVParams(m_RayStart, m_RayEnd, this, 0.05); array<ref RaycastRVResult> m_RayCastResults = new array<ref RaycastRVResult>; m_RayCastInput.with = player; m_RayCastInput.flags = CollisionFlags.FIRSTCONTACT; if (DayZPhysics.RaycastRVProxy(m_RayCastInput, m_RayCastResults)) { if (m_RayCastResults.Count() > 0) { Car car; if (Class.CastTo(car, m_RayCastResults[0].obj) || Class.CastTo(car, m_RayCastResults[0].parent)) { this.SetPosition(m_RayCastResults[0].pos + (player.GetDirection() * 0.1)); } } } } } ``` Наверное имеет смысл чуть приподнять предмет над поверхностью, но необходимость этого зависит от типа предмета, потому не стал этого делать
       
      чуть откорректировал код
  • Our picks

×
×
  • Create New...

Important Information

By using this site, you automaticly agree to our Guidelines and Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.