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
  • 0
hekut144

Добавление молотова в игру, не получается бросить

Вообщем создал пбо, с ним все нормально, какая-то ошибка в конфиге у меня, редактировал:
CfgWeapons: - http://pasted.co/afa0bf03
CfgMagazines: - http://pasted.co/b96d528d

CfgAmmo: - http://pasted.co/28f7b5c1

CfgCloudlets: - http://pasted.co/ade3ae5d

GlassSmash: - http://pasted.co/266a47ef

В игре предмет есть, но как оружие не воспринимает его (бросить не могу)..

Edited by hekut144 (see edit history)

Share this post


Link to post
Share on other sites

16 answers to this question

Recommended Posts




  • 0

Т.е. искать, мне его ко мне в аддон данный класс перетащить и прописать мой предмет туда?

Нет, так тоже не работает... cfgmagazines:

    class HandGrenade_Stone;    // External class reference
    class MolotovCoctail : HandGrenade_Stone {
        scope = 2;
        count = 1;
        displayName = "Molotov Coctail";
        descriptionShort = "Molotov Coctail";
        model = "\z\addons\hapodha9i_coji9ihka_main\molotov\models\molotov.p3d";
        picture = "\dayz_equip\textures\equip_bottle_jd_ca.paa";
        type = 256;
        ammo = "JackDanielsMol";
    };

Edited by hekut144 (see edit history)

Share this post


Link to post
Share on other sites
  • 0

Оружие ссылается на магазин, магазин на патрон, патрон на GlassSmash, а GlassSmash на эффекты

Edited by hekut144 (see edit history)

Share this post


Link to post
Share on other sites
  • 0

Ссыль бы на гайд скинул откуда ты это взял.

Share this post


Link to post
Share on other sites
  • 0

тебе нужно создать подкласс ThrowMuzzle. Например:

		class ThrowMuzzle ;

		class MolotovCocktailMuzzle : ThrowMuzzle
		{
			displayName = "Бросить";
			magazines[] = {
					"CoctailAmmo"
			};
		};


Ссыль бы на гайд скинул откуда ты это взял.

https://community.bistudio.com/wiki/CfgMagazines_Config_Reference

Share this post


Link to post
Share on other sites
  • 0

Разве это не CfgWeapons? В CfgWeapons есть - http://pasted.co/afa0bf03 идет класс фаер у него действие бросить есть, на нем основаны те 3-и, фаер, хим свет и молотов

Так же попытался сделать как у вас, увы не работает, все так же кинуть не могу, это часть cfgweapons
 

class ThrowMuzzle;
class MolotovCocktailMuzzle : ThrowMuzzle {
     displayName = "Бросить";
     magazines[] = {"JackDanielsMol"}; // Класснейм из cfgmagazines
};
 

 

Edited by hekut144 (see edit history)

Share this post


Link to post
Share on other sites
  • 0

Как только не пытался, не выходит бросить, видел видео на ютубе от ZombZ в 2 видео где у них есть тот самый молотов, бросают его имеется ввиду 

Edited by hekut144 (see edit history)

Share this post


Link to post
Share on other sites
  • 0

Как только не пытался, не выходит бросить, видел видео на ютубе от ZombZ в 2 видео где у них есть тот самый молотов, бросают его имеется ввиду 

А в cfgPatches в разделе cfgWeapons\Ammo и т.п., ты его обозначил?

Share this post


Link to post
Share on other sites
  • 0

У меня в cfgPatches лишь прописана версия, и путь (название аддона), может быть вы про config.cpp и инклюды имеете ввиду? 

Edited by hekut144 (see edit history)

Share this post


Link to post
Share on other sites
  • 0

У меня в cfgPatches лишь прописана версия, и путь (название аддона), может быть вы про config.cpp и инклюды имеете ввиду? 

Это с А3.

Для А2 так же, все свои предметы аддона должны быть перечислены -

 

class CfgPatches

    {

        class a3_ultima_objects

            {

                units[]                =

                    {

                        //    [Юниты]

                        "Ultima_Man_M"

                        

                        //    [Постройки]

                        ,"Ultima_Base_Preview"                                //    Базовая постройка - предпросмотр                        

                        ,"Ultima_Base"                                        //    Базовая постройка

                        

                        ,"Land_Ultima_Brick_Wall_Ruins"                        //    Обломки кирпичной постройки

                        

                        ,"Ultima_Brick_Wall_1_5x3m_Preview"                    //    Кирпичная стена 1.5м - предпросмотр

                        ,"Ultima_Brick_Wall_1_5x3m"                            //    Кирпичная стена 1.5м

                        

                        ,"Ultima_Brick_Wall_3x3m_Preview"                    //    Кирпичная стена, 3м    - предпросмотр

                        ,"Ultima_Brick_Wall_3x3m"                            //    Кирпичная стена, 3м

                        

                        ,"Ultima_Brick_Wall_3x3m_With_Window_Preview"        //    Кирпичная стена, 3м с окном - предпросмотр

                        ,"Ultima_Brick_Wall_3x3m_With_Window"                //    Кирпичная стена, 3м с окном

                                                    

                        ,"Ultima_Brick_Wall_3x3m_With_Gate_Preview"            //    Кирпичная стена, 3м с воротами - предпросмотр

                        ,"Ultima_Brick_Wall_3x3m_With_Gate"                    //    Кирпичная стена, 3м с воротами

                        

                        ,"Ultima_Brick_Wall_6x6m_With_Gate_Preview"            //    Кирпичная стена, 6м с воротами - предпросмотр

                        ,"Ultima_Brick_Wall_6x6m_With_Gate"                    //    Кирпичная стена, 6м с воротами

 

                        ,"Ultima_Iron_Gate"                                    //    Железные подъемные ворота(усовершенствование для - Большая кирпичная стена с воротами)

                        ,"Ultima_Super_Iron_Gate"                            //    Железные подъемные ворота(усовершенствование для - Очень большая кирпичная стена с воротами)                        

                                                    

                        ,"Ultima_Cement_Floor_3x3m_Preview"                    //    Бетонный пол - предпросмотр

                        ,"Ultima_Cement_Floor_3x3m"                            //    Бетонный пол

                                                                    

                        ,"Ultima_Stairs_Vertical_Preview"                    //    Вертикальная деревянная лестница - предпросмотр

                        ,"Ultima_Stairs_Vertical"                            //    Вертикальная деревянная лестница

                                                                    

                                                                            //    Наклонная деревянная лестница - предпросмотр

                                                                            //    Наклонная деревянная лестница

                                                                            

                        ,"Ultima_Safe_Lock_Preview"                            //    Сейф закрытый предпросмотр

                        ,"Ultima_Safe_Lock"                                    //    Сейф закрытый

                        ,"Ultima_Safe_Unlock"                                //    Сейф открытый

                        

                        

                        //    [Транспорт]

                        ,"Ultima_Heli_Transport_01_Virtual_A"

                        ,"Ultima_Heli_Transport_01_Virtual_B"

                        ,"Ultima_Heli_Transport_01"};

                weapons[]            =    {};

                magazines[]            =

                    {

                                                //    [Предметы инвентаря]

                        "Ultima_Item_Food_Tooshenka"                        //    Тушенка

                        ,"Ultima_Item_Bottle_Filled"                        //    Фляга с водой

                        ,"Ultima_Item_Bottle_Unfilled"                        //    Пустая фляга

                        

                        //    [Инструменты]

                        ,"Ultima_Item_Trowel"                                //    Мастерок

                        

                        //    [Строительные объекты]

                        ,"Ultima_Base_Preview"                                //    База

                        ,"Ultima_Safe_Lock_Preview"                            //    Сейф

                        

                        ,"Ultima_Brick_Wall_1_5x3m_Preview"                    //    Кирпичная стена 1.5м - предпросмотр

                        ,"Ultima_Brick_Wall_3x3m_Preview"                    //    Кирпичная стена, 3м    - предпросмотр

                        ,"Ultima_Brick_Wall_3x3m_With_Window_Preview"        //    Кирпичная стена, 3м с окном - предпросмотр

                        ,"Ultima_Brick_Wall_3x3m_With_Gate_Preview"            //    Кирпичная стена, 3м с воротами - предпросмотр

                        ,"Ultima_Brick_Wall_6x6m_With_Gate_Preview"            //    Кирпичная стена, 6м с воротами - предпросмотр

                        ,"Ultima_Cement_Floor_3x3m_Preview"                    //    Бетонный пол - предпросмотр                                                                    

                        ,"Ultima_Stairs_Vertical_Preview"                    //    Вертикальная деревянная лестница - предпросмотр

                                                                    

                                                                            //    Наклонная деревянная лестница - предпросмотр

                                                                            //    Наклонная деревянная лестница

                        

                        //    [Строй материалы]

                        ,"Ultima_Item_Cement"                                //    Цемент

                        ,"Ultima_Item_Brick"                                //    Кирпич                        

                        ,"Ultima_Item_Glass"                                //    Стекло

                    };

                requiredVersion        =    0.1;

                requiredAddons[]    =

                    {

                        "A3_Characters_F_Civil"

                        ,"A3_characters_f"

                        ,"A3_map_altis"

                        ,"A3_characters_f_gamma"

                        ,"A3_Characters_F_OPFOR"

                        ,"A3_Characters_F_INDEP"                

                        ,"A3_Soft_F_Car"

                        ,"A3_Soft_F_Quadbike"

                        ,"A3_soft_f_beta_quadbike"

                        ,"A3_Boat_F_Civilian_Boat"

                        ,"A3_Boat_F_Boat_Transport_01"

                        ,"A3_Air_F_Heli_Light_01"

                        ,"A3_Air_F_Heli_Heli_Transport_04"

                        ,"A3_Air_F_Heli_Heli_Transport_03"

                        ,"A3_Data_F_Curator_Virtual"

                        ,"A3_Data_F"

                        ,"A3_Weapons_F"

                        ,"A3_Structures_F"

                        ,"A3_Structures_F_Items_Cans"

                        ,"A3_Structures_F_EPA_Items_Food"

                    };

                Ultima_Version        =    0.1;

            };

    };

Share this post


Link to post
Share on other sites
  • 0

Вот только один момент, когда я сделал по аналогии в чужом аддоне добавляющем гранаты, добавил свою (молотов), все отлично работает, только вот она в CfgPatches не описана



Хорошо попробую сделать как у вас, т.е. описать оружие и магазин?

Edited by hekut144 (see edit history)

Share this post


Link to post
Share on other sites
  • 0

Вот только один момент, когда я сделал по аналогии в чужом аддоне добавляющем гранаты, добавил свою (молотов), все отлично работает, только вот она в CfgPatches не описана

 

Хорошо попробую сделать как у вас, т.е. описать оружие и магазин?

Я не знаю как у тебя работало... но по бисам, все твои предметы обязаны быть перечислены в соответствующих классах, внутри патча.

 

Указывать надо - класс_патч->твой_аддон->классы оружия и т.п.

Edited by NoNameUltima (see edit history)

Share this post


Link to post
Share on other sites
  • 0

Вообщем хрен с ним (но мне слон с арма.ат.уа говорит что не нужно перечисялть, все и без того работать будет), все равно спасибо, почищу аддон чужой, пускай там валяется, вообщем мне со всем помог всеми так нелюбимый докторсова, который делал мод ядерный писец

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 Sovest2
      Пожалуйста, Войдите или Зарегистрируйтесь, чтобы увидеть это: Вложение.

      Подготовка
      Для начала нам понадобится подключить кастомный player_death.sqf в compiles.sqf
      Делается это следующим образом:
      В compiles.sqf заменить строку 
      player_death = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_death.sqf"; на
      player_death = compile preprocessFileLineNumbers "*ВАШ ПУТЬ*\player_death.sqf";  
      Если у вас стоит инфистар,то необходимо заменить строку в AH.sqf
      _death = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\player_death.sqf'; на
      _death = compile preprocessFileLineNumbers '*ВАШ ПУТЬ*\player_death.sqf';  
      В вашем кастомном player_death.sqf необходимо заменить 
      _array = _this; if (count _array > 0) then { _source = _array select 0; _method = _array select 1; if ((!isNull _source) && (_source != player)) then { _canHitFree = player getVariable ["freeTarget",false]; _isBandit = (player getVariable["humanity",0]) <= -2000; _punishment = _canHitFree || _isBandit; //if u are bandit || start first - player will not recieve humanity drop _humanityHit = 0; if (!_punishment) then { //i'm "not guilty" - kill me && be punished _myKills = ((player getVariable ["humanKills",0]) / 30) * 1000; _humanityHit = -(2000 - _myKills); _kills = _source getVariable ["humanKills",0]; _source setVariable ["humanKills",(_kills + 1),true]; PVDZE_send = [_source,"Humanity",[_source,_humanityHit,300]]; publicVariableServer "PVDZE_send"; } else { //i'm "guilty" - kill me as bandit _killsV = _source getVariable ["banditKills",0]; _source setVariable ["banditKills",(_killsV + 1),true]; }; }; _body setVariable ["deathType",_method,true]; }; на
      _array = _this; if (count _array > 0) then { _source = _array select 0; _method = _array select 1; if ((!isNull _source) && (_source != player)) then { [player,_source]execVM "*ВАШ ПУТЬ*\humanityChange.sqf"; [player,_source]execVM "*ВАШ ПУТЬ*\kill_msg_send.sqf"; }; _body setVariable ["deathType",_method,true]; }; Отображение ника убийцы(Kill message)
       
      Создаем файл и закидываем в миссию файл kill_msg_send.sqf
      С содержанием
      private ["_victim","_killer","_vehicle","_weapon","_pic"]; _victim = _this select 0; _killer = _this select 1; _killerName = name _killer; _victimName = name _victim; _vehicle = typeOf (vehicle _killer); _weapon = currentWeapon _killer; if ((getText (configFile >> "CfgVehicles" >> _vehicle >> "vehicleClass")) in ["CarW","Car","CarD","Armored","Ship","Support","Air","ArmouredW","ArmouredD","SupportWoodland_ACR","AllVehicles"]) then { _pic = gettext(configFile >> 'CfgVehicles' >> _vehicle >> 'picture'); } else { _pic = gettext(configFile >> 'cfgWeapons' >> _weapon >> 'picture'); }; _kill_txt = format ["<t align='left' size='0.5'>%1 </t>",_victimName]; _kill_txt = _kill_txt + format ["<img size='1.0' align='left' image='%1'/>",_pic]; _kill_txt = _kill_txt + format ["<t align='left' size='0.5'> %1 </t>",_killerName]; PVDZE_send = [player,"kill_message",[_kill_txt]]; publicVariableServer "PVDZE_send";  
      Далее,нам необходимо отредактировать файл server_sendToClient.sqf ,которой находится в директории сервера
      И добавить после
      case "tagFriendly": { PVDZE_plr_FriendRQ = _arraytosend; _owner publicVariableClient "PVDZE_plr_FriendRQ"; }; Это
      case "kill_message": { custom_kill_message_show = _arraytosend; publicVariable "custom_kill_message_show"; }; Теперь необходимо создать файл kill_msg_show.sqf в папке с вашей миссией
      с содержимым
      private ["_pos","_i"]; arr_kill = ["","","","","",""]; fnc_kill_message = { private ["_finaltxt"]; _finaltxt = _this select 0; for[{_i = 0},{(_i<6)},{_i = _i +1}] do { if((arr_kill select _i) == "") then { arr_kill set [_i,_finaltxt]; [_i] execVM "*ВАШ ПУТЬ*\kill_msg_delete.sqf"; _i = count(arr_kill); }; }; }; "custom_kill_message_show" addPublicVariableEventHandler {(_this select 1) call fnc_kill_message;}; while {true} do { _pos = 0.01; _layout = 1001; { [_x,[safezoneX + 0.01 * safezoneW,2.0],[safezoneY + _pos * safezoneH,0.3],5,0.5,0,_layout] spawn BIS_fnc_dynamicText; _pos = _pos + 0.021; _layout = _layout + 1; } ForEach arr_kill; sleep 1; }; Создать файл kill_msg_delete.sqf с 
      private["_pos"]; _pos = _this select 0; sleep 10; arr_kill set [_pos,""];  
      И вставить в init.sqf после строки
      _playerMonitor = [] execVM "custom\player_monitor.sqf"; строку
      execVM "*ВАШ ПУТЬ*\kill_msg_show.sqf"; Осталось только добавить
      custom_kill_message_show В первую строку файла publicvariable.txt
       
      Все,отображение ника убийцы готово!
       
       
      Изменение человечности за убийство Бандита\Героя
      создать файл humanityChange.sqf с содержимым
      private ["_victim","_killer","_myKills","_humanity","_killerHumanity","_isKillerBandit","_isBandit","_humanityHit","_kills","_killerGunner"]; _victim = _this select 0; _killer = _this select 1; _humanity = _victim getVariable["humanity",0]; _killerHumanity = _killer getVariable["humanity",0]; _isKillerBandit = (_killerHumanity) < 0 ; _isBandit = (_humanity) < 0; _humanityHit = 0; _myKills = 0; _killerVehicle = vehicle _killer; if(((!_isBandit) && _isKillerBandit) || (_isBandit && (!_isKillerBandit))) then { _myKills = round((_humanity) / 10); }; if(!_isBandit) then { _myKills = (_myKills + 200); _kills = _killer getVariable ["humanKills",0]; _killer setVariable ["humanKills",(_kills + 1),true]; } else { _myKills = (_myKills - 200); _kills = _killer getVariable ["banditKills",0]; _killer setVariable ["banditKills",(_kills + 1),true]; }; _killerGunner = gunner _killerVehicle; if(!isNil"_sourceGunner") then { _killer = _killerGunner; }; _humanityHit = _myKills * (-1); PVDZE_send = [_killer,"Humanity",[_killer,_humanityHit,300]]; publicVariableServer "PVDZE_send"; Изменение Человечности готово!
       
      Плюсы Всего этого:
      Отображение ника убийцы теперь работает всегда и корректно.(Если убивают с техники или с одного выстрела).
    • By misha123
      Здравствуйте хотел добавить крафты на сервер. Но не знаю как это сделать. Кто знает как добавить крафты подскажите пожалуйста скрипт. Хочется разнообразить сервер.
      Спасибо за внимание
    • By Summrak2232
      Создал сервер,и не могу к нему подключится постоянно выбивает время подключения истекло.Подскажите что делать?
    • By etojeflexx
      Доброго времени суток, хотел узнать, как можно подключать дополнительные постройки (допустим построенный город) к основной карте, чтобы не захламлять объектами основной файл миссии? 
    • By Nerve
      Всем добра!
      Подскажите пожалуйста, как добавить кастомных торговцев на Exile?
      Использую редактор m3e_3den от Maca.
      Здания есть а трейдера нет =(

      Добавил вот это в initPlayerLocal
      private _traders = [ ["Exile_Trader_SpecialOperations",[46.6963,1594.77,0.00111437],77.218,"Exile_Trader_SpecialOperations","WhiteHead_21"], ["Exile_Trader_SpecialOperations",[2304.91,15313.6,-0.00616455],133.922,"Exile_Trader_SpecialOperations","WhiteHead_16"], ["Exile_Trader_SpecialOperations",[3957.81,11601.5,-0.000762939],29.1087,"Exile_Trader_SpecialOperations","WhiteHead_15"], ["Exile_Trader_SpecialOperations",[11437.7,11361.8,0.00534058],267.483,"Exile_Trader_SpecialOperations","GreekHead_A3_09"], ["Exile_Trader_SpecialOperations",[6331.58,7702.21,0.00143433],286.613,"Exile_Trader_SpecialOperations","WhiteHead_10"], ["Exile_Trader_Aircraft",[11787.9,12829.8,0.00143433],113.69,"Exile_Trader_Aircraft","GreekHead_A3_09"] ]; { private _trader = [ _x select 0, _x select 4, ["HubStanding_idle1"], _x select 1, _x select 2 ] call ExileClient_object_trader_create; _trader setVariable ["ExileTraderType", _x select 3]; } forEach _traders;  
  • 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.