[sort of solved] Alive arsenal airdrop help

  1. 7 years ago
    Edited 7 years ago by flibble666

    hello there i used the following to create Arsenal on airdrop but on dedicated the Arsenal option repeats itself 2 arsenal options in the drop down this only occurs on editor placed boxes the droped ones are fine any idea why this is happening the init line of the editor placed box is empty.

    description.ext...

    class Extended_Init_EventHandlers {
         class B_supplyCrate_F {
    		init = " _this call (compile preprocessFileLineNumbers 'arsenalCrate.sqf')";
         };
    };

    arsenalCrate.sqf...

    _crate = _this;
    [-1, {
        _crate = _this; _crate addAction ["<t color='#ff1111'>BIS Arsenal</t>", {["Open",true] call BIS_fnc_arsenal}];
    }, _crate] call CBA_fnc_globalExecute;

    thx in advanced for any help and an amazing commuinty/mod

  2. Try changing init to clientInit

  3. Edited 7 years ago by flibble666

    **edited got abit ahead of my self there its ok testing localy mp but seems to sill happen on dedicated wired ill just use a different box thx for the help

  4. came here because I was mentioned but don't see my name?

  5. Edited 7 years ago by dixon13

    @flibble666... @SpyderBlack723 's suggestion didn't work?

  6. Edited 7 years ago by flibble666

    No only in local MP testing not dedi 2 Aresenal options still appear on editor placed boxes but i think i'm on the correct path.
    My arma knowledge is no where near you guys but i know alot of other code. I know at some point _this addAction ["Open Virtual Arsenal", {["Open",true] spawn BIS_fnc_arsenal}]; was replaced now in the box init you just need ["AmmoboxInit",[this,true]] call BIS_fnc_arsenal; so i assume the reason the code is repeating is because _this; _crate addAction ["<t color='#ff1111'>BIS Arsenal</t>", {["Open",true] call BIS_fnc_arsenal}]; its adding an addAction with the arsenal code and just the ["AmmoboxInit",[this,true]] call BIS_fnc_arsenal; part is adding it a second time.

    So would it work like this

    _crate = _this;
    [-1, {
        _crate = _this; _crate [{["Open",true] call BIS_fnc_arsenal}];
    }, _crate] call CBA_fnc_globalExecute;

    or this

    description.ext...

    class Extended_Init_EventHandlers {
         class B_supplyCrate_F {
    		init = " _this call (compile preprocessFileLineNumbers '["AmmoboxInit",[this,true]] call BIS_fnc_arsenal;')";
         };
    };

    *updated 29/01/17 Ok so ive tested bot the above and they don't work still getting 2 Arsenal options on editor placed boxes i've just changed the box wired error thanks for the initial help.

  7. Edited 7 years ago by HeroesandvillainsOS

    @flibble666 slightly off topic, but what do you mean this code was changed?

     _this addAction ["Open Virtual Arsenal", {["Open",true] spawn BIS_fnc_arsenal}];

    That's what I use to have VA on pre-placed boxes. Is that not valid code in MP anymore?

  8. Sorry @HeroesandvillainsOS bad wording more updated so that it does not require all the _this addAction it maybe its just an easier way of doing it sorry for the confusion. I remember having issues with _this addAction ["Open Virtual Arsenal", {["Open",true] spawn BIS_fnc_arsenal}]; after a few mis searching i used the ["AmmoboxInit",[this,true]] call BIS_fnc_arsenal;

  9. Deleted 7 years ago by flibble666
 

or Sign Up to reply!