Help Thread for Epoch Remove Weapons

I would suggest tryin to split it into 2 maybe 3 functions. I heard a while ago a story, that says when it contains to many vehicles it woudln't load up properly.
So try to split it and just add the functions. (Maybe One for Wheeled,Tracked,Air,etc.) And if that also won't work try it with just one vehicle.

Report after you did this.
 
try something like this:
Code:
    if (_object isKindof "BRDM2_HQ_Gue") then {
         _mags = _object magazinesTurret [0];
             cpt = 0;
             {
                _object removeMagazinesTurret [_mag select cpt,[0]];        
                cpt = cpt + 1;
             } forEach _mag;
    };
 
Hey guys, I'm trying to remove ammo + weapons from a AH11 Wildcat (AW159_Lynx_BAF)
I have search the internet for a while trying to figure out what the weapon name and ammo for this helicopter are, but I just haven't had any luck after two hours. Any info will be greatly appreciated.


Code:
if (_object isKindof "AW159_Lynx_BAF") then {
         _object magazinesTurret [-1];
         _object removeMagazinesTurret ["",[-1]];
         _object removeMagazinesTurret ["",[-1]];
         _object WeaponsTurret [-1];
         _object removeWeapon "";
         _object removeWeapon "";
 
Here is what i've done for the Wildcat :

Code:
if (_object isKindof "AW159_Lynx_BAF") then {
        _mag = _object magazinesTurret [-1];
        diag_log ("AMMO LIST OF AW159_Lynx_BAF: " + str(_mag));
        cpt = 0;
        {
            _object removeMagazinesTurret [_mag select cpt,[-1]];   
            diag_log ("REMOVE AMMO OF AW159_Lynx_BAF: " + str(_mag select cpt));
            cpt = cpt + 1;
        } forEach _mag;
    };
It doesn't remove the turret, but i don't care, cause you can't reammo the turrets ^^
 
  • Like
Reactions: J3T
Hello there, I cant get my head round the 'fnc_remWepSG' editing part, I was wondering if someone could give me an example of how it looks with an apache, and a tank of some sort please.

many thanks

robbie
 
Here is what i've done for the Wildcat :

Code:
if (_object isKindof "AW159_Lynx_BAF") then {
        _mag = _object magazinesTurret [-1];
        diag_log ("AMMO LIST OF AW159_Lynx_BAF: " + str(_mag));
        cpt = 0;
        {
            _object removeMagazinesTurret [_mag select cpt,[-1]]; 
            diag_log ("REMOVE AMMO OF AW159_Lynx_BAF: " + str(_mag select cpt));
            cpt = cpt + 1;
        } forEach _mag;
    };
It doesn't remove the turret, but i don't care, cause you can't reammo the turrets ^^

Thanks for this, I'll attempt to add it soon. My server is refusing connections to 3rd party programs at the moment so it's making it very annoying to edit it via FTP.

Edit: This works great, thanks! I just use this for all vehicles now. So much easier.
 
Last edited:
Tried this on Epoch 1.0.4.2 and every seat has it´s ammo:

Code:
if (_object isKindof "AH64D") then {
        _mag = _object magazinesTurret [-1];
        cpt = 0;
        {
            _object removeMagazinesTurret [_mag select cpt,[-1]];  
            cpt = cpt + 1;
        } forEach _mag;
        _mag = _object magazinesTurret [0];
        cpt = 0;
        {
            _object removeMagazinesTurret [_mag select cpt,[0]];  
            cpt = cpt + 1;
        } forEach _mag;
       
    };

Some other workarounds that may work?
 
It's working for me with your code ^^

Maybe you made a mistake somewhere else !

Check if you have add this :

Code:
fnc_remWepSG =                compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\fnc_remWepSG.sqf";

And if your calls to that are good !
 
hm, I'm havin a bit of a problem with this on my server. I've gotten it to remove the ammo out of vehicles when purchased and after server restart, but vehicles spawned in randomly at startup still have ammo until the next restart. any idea how to go about fixing this?
 
Last edited:
Back
Top