Jump to content
  • 0

Adding AH6J and ammo reload.


tigger

Question

I added the AH6J to the server, but I have the obvious issues: It starts with rockets and ammo, and it has a radar.

I think I can get rid of the rockets and keep the MGs by writing

_object setVehicleAmmo 0;
_object addMagazine "4000Rnd_762x51_M134";

in server_monitor.sqf (iterating _object over all AH6J_EP1's). How can I remove the radar?
Reading http://community.bistudio.com/wiki/CfgVehicles_Config_Reference#...CanSee

there seems to be a way, but I have no idea where I could place that code (I suppose it belongs somewhere

to the unpacked dayz_code.pbo or so, not where I can change it.)

 

 

Optimally though, I would like to strip ammo from all vehicles and be able to buy it at traders. However, the two issues associated with the AH6J are that:
 

1) AH6J apparently uses 4000Rnd_762x51_M134 ammo. If I add it to the seller, he will take my money but not give me anything. (The ammo also has no icon.) This is likely related to the following log item:

Updating base class 4000Rnd_762x51_M134->CA_Magazine, by z\addons\dayz_code\config.cpp/CfgMagazines/2000Rnd_762x51_M134/

2) Even if I had the ammo, it doesn't seem you can reload the AH6J. Other vehicles show Reload M134 ammo option even if you do not have the ammo in the inventory. The AH6J doesn't show anything.

 

Can I add it to a "rearmable" category somehow?

Thanks.

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

According to vbawol, using setVehicleAmmo can cause issues. To remove the hydras from the AH-6J without removing the minigun ammo, use this:

if(_type == "AH6J_EP1") then {
	_object removeMagazinesTurret ["14Rnd_FFAR",[-1]];
};

Add it to the server_monitor.sqf under this:

if (_damage < 1) then {
	//diag_log format["OBJ: %1 - %2", _idKey,_type];
	
	//Create it
	_object = createVehicle [_type, _pos, [], 0, "CAN_COLLIDE"];
	_object setVariable ["lastUpdate",time];
	_object setVariable ["ObjectID", _idKey, true];

And the server_publishVehicle2.sqf under this (except replace "_type" with "_class"):

if(!_donotusekey) then {
	// Lock vehicle
	_object setvehiclelock "locked";
};

clearWeaponCargoGlobal  _object;
clearMagazineCargoGlobal  _object;

I don't think you can remove radar without editing the cfgVehicles.hpp, which, as far as I know, can't be done server side. Same with adding new magazine types (cfgMagazines.hpp). As for the "re-arm" option, I think it's only available in gunner seats. Since the AH-6J doesn't have a gunner seat, it doesn't have the option.

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...