Help Thread for Epoch Remove Weapons

This is what our DZE_StripAmmo looks like:

DZE_StripAmmo = ["BAF_Jackal2_L2A1_D", "HMMWV_MK19", "HMMWV_Armored", "HMMWV_M2", "BRDM2_HQ_Gue", "BTR40_MG_TK_GUE_EP1","Mi24_V","Mi24_P","Mi24_D","F35B","Ka60_PMC","L39_TK_EP1","pook_H13_medevac_CDF","pook_H13_transport_CDF","AW159_Lynx_BAF","Su34","A10","AV8B","AV8B2","M2StaticMG","AH6J_EP1","HMMWV_Armored","CSJ_GyroC","M113_UN_EP1","UH1H_TK_EP1","Ka60_GL_PMC","AH64D","AH1Z","Mi24_D"];
 
This only worked on spawned vehicles on restart. New Vehicles that I spawned in, need a restart before the weapons were deleted.
Any way for it to remove on spawn?
 
Does anyone have a working file with the pook gunship in it that wouldn't mind sharing it? I have it working perfect for the Apache on my Chernarus 1.0.4.2 Epoch server. (only available in trade so it's not tested on dynamic or admin spawn on my server) with this as my fnc_remWepSG.sqf
Code:
    //Remove Weapon SiothieGaming german Youtubechannel: http://www.youtube.com/user/SiothieGaming
    //Lines underneath are just a small tutorial
    // the Number in the Bracket is Important, -1  means Pilot seat
    //Try getting up with these numbers when you want to remove from another seat (e.g. gunner, front gunner, rear gunner etc. pp)
    // For every seat you have to do something like i did        
    //_object magazinesTurret [-1];
    //_object removeMagazinesTurret ["14Rnd_FFAR",[-1]]; If you want to remove something from another seat at the same time you need to do something like this:
    // _object magazinesTurret [1];
    //_object removeMagazinesTurret ["14Rnd_FFAR",[1]]; I'm not completly sure now which number is which seat. I only know that -1 is pilot seat.
{
    if (_object isKindof "BAF_Apache_AH1_D") then {
        //DRIVER
        _mag = _object magazinesTurret [-1];
        diag_log ("AMMO LIST OF BAF_Apache_AH1_D DRIVER: " + str(_mag));
        cpt = 0;
        {
            _object removeMagazinesTurret [_mag select cpt,[-1]];  
            diag_log ("REMOVE AMMO OF BAF_Apache_AH1_D DRIVER: " + str(_mag select cpt));
            cpt = cpt + 1;
        } forEach _mag;
        //GUNNER
        _mag = _object magazinesTurret [0];
        diag_log ("AMMO LIST OF BAF_Apache_AH1_D GUNNER: " + str(_mag));
        cpt = 0;
        {
            _object removeMagazinesTurret [_mag select cpt,[0]];  
            diag_log ("REMOVE AMMO OF BAF_Apache_AH1_D GUNNER: " + str(_mag select cpt));
            cpt = cpt + 1;
        } forEach _mag;
    };
  
  
    //THIS IS STILL IN TESTING PHASE, IT COULD SCREW UP YOUR WHOLE SERVER
    //Just put the Classname of the Vehicle there and it should disable thear vision.
    // For example my server runs fine with it (Epoch Panthera) but a friend of mine screwed up his whole database
    //if (_object isKindof "AH64D") then {
    //     _object disableTIEquipment true;
    //};
    //TESTING STUFF END
} forEach vehicles; //Not completly necessary, it just makes sure no vehicle is left out during the process (e.g. high server load)

I noticed some people having ammo issues with it so i thought i'd post it for anyone who cared to try it =]
 
This only worked on spawned vehicles on restart. New Vehicles that I spawned in, need a restart before the weapons were deleted.
Any way for it to remove on spawn?
If you spawn it in via an Admin tool you would have to include a call in there during the spawn process. If they are spawned through the database they will always have the ammo removed (except for a few cases where the script didnt work), if you spawn them via some trader you are also gtg bc if you follwed the instruction it will definitly work.
 
If i spawn them in using admin tool, they are armed until the next restart.

You can just shoot all the ammo out quickly if you want
 
No matter what I do this doesn't work for me. Is it because of the newest version of epoch? I try your way and the original way you linked too and neither work.

Here is an example of what I am adding:

Code:
{
    if (_object isKindof "Mi17_rockets_RU") then {
         _object removeWeapon "57mmLauncher";
         _object removeMagazine "128Rnd_57mm";
    };
 
No matter what I do this doesn't work for me. Is it because of the newest version of epoch? I try your way and the original way you linked too and neither work.

Here is an example of what I am adding:

Code:
{
    if (_object isKindof "Mi17_rockets_RU") then {
         _object removeWeapon "57mmLauncher";
         _object removeMagazine "128Rnd_57mm";
    };
Try this:

Code:
    if (_object isKindof "Mi17_rockets_RU") then {
         _object magazinesTurret [-1];
        _object removeMagazinesTurret ["128Rnd_57mm",[-1]];
        _object WeaponsTurret [-1];
        _object removeWeapon "57mmLauncher";
 
Try this:

Code:
    if (_object isKindof "Mi17_rockets_RU") then {
         _object magazinesTurret [-1];
        _object removeMagazinesTurret ["128Rnd_57mm",[-1]];
        _object WeaponsTurret [-1];
        _object removeWeapon "57mmLauncher";

Ill give it a shot later tonight - just out atm. Thanks for the quick reply, I will let you know if it works!
 
Try this:

Code:
    if (_object isKindof "Mi17_rockets_RU") then {
         _object magazinesTurret [-1];
        _object removeMagazinesTurret ["128Rnd_57mm",[-1]];
        _object WeaponsTurret [-1];
        _object removeWeapon "57mmLauncher";

That worked perfect! Would you know what would work for the Ka60_GL_PMC and F35B

Cheers!
 
When i have time i come back to this.

Thanks I really do appreciate it! I got the F35B working just need the weapon and ammo names for the Ka60_GL_PMC which i can't seem to find anywhere. I will keep digging though!

Thanks again for your help
 
Thanks I really do appreciate it! I got the F35B working just need the weapon and ammo names for the Ka60_GL_PMC which i can't seem to find anywhere. I will keep digging though!

Thanks again for your help

The weapon now should be the same as for the Mi17.
The problem is that you cant remove it right now as far as i see it. You can remove the ammunition atleast. If that enough (cant be refilled if you havent added anything that can do it, like vehicle service points.).

try something like this then:

Code:
if (_object isKindof "Ka60_GL_PMC") then {
        _mag = _object magazinesTurret [-1];
        diag_log ("AMMO LIST OF Ka60_GL_PMC " + str(_mag));
        cpt = 0;
        {
            _object removeMagazinesTurret [_mag select cpt,[-1]];  
            diag_log ("REMOVE AMMO OF Ka60_GL_PMC: " + str(_mag select cpt));
            cpt = cpt + 1;
        } forEach _mag;
    };
^credits for the basic code to oshydaka
 
Back
Top