Jump to content

If you want to remove vehicle ammo or guns


calamity

Recommended Posts

I,m sure there is prob a more difficult  better way to accomplish this but this is what I did
 
in server_monitor.sqf  
just under this part 
clearWeaponCargoGlobal  _object;
clearMagazineCargoGlobal  _object;
// _object setVehicleAmmo DZE_vehicleAmmo;
 
add this  just change to the vehicle you want
 
//BTR40_MG_TK_GUE_EP1 remove ammo
if (_object isKindOf "BTR40_MG_TK_GUE_EP1") then {
_object removeMagazine "50Rnd_127x107_DSHKM";
_object removeMagazine "50Rnd_127x107_DSHKM";
_object removeMagazine "50Rnd_127x107_DSHKM";
_object removeMagazine "50Rnd_127x107_DSHKM";
_object removeMagazine "50Rnd_127x107_DSHKM";
};
to add a weapon just 
_object addWeapon "DSHKM";
 
to add magazine
_object addMagazine "50Rnd_127x107_DSHKM";
 
to completely remove weapon 
_object removeWeapon "DSHKM";
 
here is the class name for all vehicles and weapon classnames.
 
Link to comment
Share on other sites

Hi for purchased vehicles you can do the same in server_publishVehicle2.sqf

 

You can also use _object setVehicleAmmo 0;  for removing all ammo. [there are few vehicles [mi24, ka62, ah64], where removeMagazine is not working for all ammo]

 

if (_object isKindOf "HMMWV_Avenger") then {
         _object setVehicleAmmo 0;
         _object removeWeapon "StingerLaucher";
         _object removeWeapon "M3P";
         _object addWeapon "M240_veh";
         };
 
To add/remove ammo to both guns in helicopter:
 
 if (_object isKindOf "CH_47F_EP1_DZE") then {
         _object addMagazineturret ["4000Rnd_762x51_M134",[1]];
         _object addMagazineturret ["4000Rnd_762x51_M134",[0]];
         };

 

Driver turret is [-1]

Link to comment
Share on other sites

  • 1 month later...

I was wondering if there would be a way to remove ammo from armed vehicles like the salvage menu for removing vehicle parts? It's kinda a bummer to either spend gold to buy ammo for them or spend time searching just to lose them at server restart. This way players could remove any leftover ammo saving it before restarts!

Link to comment
Share on other sites

I've managed to remove ammo from vehicles which have only 1 turret.

 

I tried the code above with 2 turreted helicopters (UH1H_TK_EP1, MH60S), but the best i could achieve is to remove the ammo from one side.

I removed the GL ammo from KA60_GL_PMC, but i couldn't remove the "57mm_launcher" or even the rockets from it "14Rnd_57mm_HE".

I could't find any reference about the seat/turret numbers.

Could anyone help me out?

Link to comment
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
  • Advertisement
  • Discord

×
×
  • Create New...