Jump to content
  • 0

[How To] Remove ammo from Flying Fortress (Overpoch/Epoch-Origins)


oSoDirty

Question

I added this since i have found little to no help on removing ammo from vehicles with multiple gunners. I take no credit for the script what so ever i just fiddled around with it until i got it working to my needs.

 

 

If you use the fnc_remWepSG script and run a Epoch-Origins of Overpochins server and would like to make the Flying Fortress avaialble in traders without ammo at every restart just add

if (_object isKindof "ori_gunship_helicopter") then {
//M240
        _mag = _object magazinesTurret [0];
diag_log ("AMMO LIST OF ori_gunship_helicopter GUNNER: " + str(_mag));
cpt = 0;
{
_object removeMagazinesTurret [_mag select cpt,[0]];
diag_log ("REMOVE AMMO OF ori_gunship_helicopter GUNNER: " + str(_mag select cpt));
cpt = cpt + 1;
} forEach _mag;
};
 
if (_object isKindof "ori_gunship_helicopter") then {
//M240
        _mag = _object magazinesTurret [1];
diag_log ("AMMO LIST OF ori_gunship_helicopter GUNNER: " + str(_mag));
cpt = 0;
{
_object removeMagazinesTurret [_mag select cpt,[1]];
diag_log ("REMOVE AMMO OF ori_gunship_helicopter GUNNER: " + str(_mag select cpt));
cpt = cpt + 1;
} forEach _mag;
};
 
if (_object isKindof "ori_gunship_helicopter") then {
//M240
        _mag = _object magazinesTurret [2];
diag_log ("AMMO LIST OF ori_gunship_helicopter GUNNER: " + str(_mag));
cpt = 0;
{
_object removeMagazinesTurret [_mag select cpt,[2]];
diag_log ("REMOVE AMMO OF ori_gunship_helicopter GUNNER: " + str(_mag select cpt));
cpt = cpt + 1;
} forEach _mag;
};
 
if (_object isKindof "ori_gunship_helicopter") then {
//M240
        _mag = _object magazinesTurret [3];
diag_log ("AMMO LIST OF ori_gunship_helicopter GUNNER: " + str(_mag));
cpt = 0;
{
_object removeMagazinesTurret [_mag select cpt,[3]];
diag_log ("REMOVE AMMO OF ori_gunship_helicopter GUNNER: " + str(_mag select cpt));
cpt = cpt + 1;
} forEach _mag;
};

 
to your "dayz_server\compile\fnc_remWepSG.sqf" and the ammo will be stripped upon purchase and each restart forcing player to use their own ammo.
 
If you dont have this or know what this is, google how to remove ammo from vehicles in epoch. There is a cached version of the install process if the site is still down. If you cant download the sqf here is mine. Its quite easy to edit. Already includes Flying fortress,F-35,Apache,& all variants of the pook transport.

	//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;
	};
	
		if (_object isKindof "F35B") then {
		//DRIVER
        _mag = _object magazinesTurret [-1];
		diag_log ("AMMO LIST OF F35B DRIVER: " + str(_mag));
		cpt = 0;
		{
			_object removeMagazinesTurret [_mag select cpt,[-1]];	
			diag_log ("REMOVE AMMO OF F35B DRIVER: " + str(_mag select cpt));
			cpt = cpt + 1;
		} forEach _mag;
	};
	
	if (_object isKindof "pook_H13_transport") then {
		//DRIVER
        _mag = _object magazinesTurret [-1];
		diag_log ("AMMO LIST OF pook_H13_transport DRIVER: " + str(_mag));
		cpt = 0;
		{
			_object removeMagazinesTurret [_mag select cpt,[-1]];	
			diag_log ("REMOVE AMMO OF pook_H13_transport DRIVER: " + str(_mag select cpt));
			cpt = cpt + 1;
		} forEach _mag;
		//GUNNER
        _mag = _object magazinesTurret [0];
		diag_log ("AMMO LIST OF pook_H13_transport GUNNER: " + str(_mag));
		cpt = 0;
		{
			_object removeMagazinesTurret [_mag select cpt,[0]];	
			diag_log ("REMOVE AMMO OF pook_H13_transport GUNNER: " + str(_mag select cpt));
			cpt = cpt + 1;
		} forEach _mag;
	};
	
		if (_object isKindof "pook_H13_transport_CDF") then {
		//DRIVER
        _mag = _object magazinesTurret [-1];
		diag_log ("AMMO LIST OF pook_H13_transport_CDF DRIVER: " + str(_mag));
		cpt = 0;
		{
			_object removeMagazinesTurret [_mag select cpt,[-1]];	
			diag_log ("REMOVE AMMO OF pook_H13_transport_CDF DRIVER: " + str(_mag select cpt));
			cpt = cpt + 1;
		} forEach _mag;
		//GUNNER
        _mag = _object magazinesTurret [0];
		diag_log ("AMMO LIST OF pook_H13_transport_CDF GUNNER: " + str(_mag));
		cpt = 0;
		{
			_object removeMagazinesTurret [_mag select cpt,[0]];	
			diag_log ("REMOVE AMMO OF pook_H13_transport_CDF GUNNER: " + str(_mag select cpt));
			cpt = cpt + 1;
		} forEach _mag;
	};
	
		if (_object isKindof "pook_H13_transport_UNO") then {
		//DRIVER
        _mag = _object magazinesTurret [-1];
		diag_log ("AMMO LIST OF pook_H13_transport_UNO DRIVER: " + str(_mag));
		cpt = 0;
		{
			_object removeMagazinesTurret [_mag select cpt,[-1]];	
			diag_log ("REMOVE AMMO OF pook_H13_transport_UNO DRIVER: " + str(_mag select cpt));
			cpt = cpt + 1;
		} forEach _mag;
		//GUNNER
        _mag = _object magazinesTurret [0];
		diag_log ("AMMO LIST OF pook_H13_transport_UNO GUNNER: " + str(_mag));
		cpt = 0;
		{
			_object removeMagazinesTurret [_mag select cpt,[0]];	
			diag_log ("REMOVE AMMO OF pook_H13_transport_UNO GUNNER: " + str(_mag select cpt));
			cpt = cpt + 1;
		} forEach _mag;
	};
	
		if (_object isKindof "pook_H13_transport_PMC") then {
		//DRIVER
        _mag = _object magazinesTurret [-1];
		diag_log ("AMMO LIST OF pook_H13_transport_PMC DRIVER: " + str(_mag));
		cpt = 0;
		{
			_object removeMagazinesTurret [_mag select cpt,[-1]];	
			diag_log ("REMOVE AMMO OF pook_H13_transport_PMC DRIVER: " + str(_mag select cpt));
			cpt = cpt + 1;
		} forEach _mag;
		//GUNNER
        _mag = _object magazinesTurret [0];
		diag_log ("AMMO LIST OF pook_H13_transport_PMC GUNNER: " + str(_mag));
		cpt = 0;
		{
			_object removeMagazinesTurret [_mag select cpt,[0]];	
			diag_log ("REMOVE AMMO OF pook_H13_transport_PMC GUNNER: " + str(_mag select cpt));
			cpt = cpt + 1;
		} forEach _mag;
	};
	
		if (_object isKindof "pook_H13_transport_GUE") then {
		//DRIVER
        _mag = _object magazinesTurret [-1];
		diag_log ("AMMO LIST OF pook_H13_transport_GUE DRIVER: " + str(_mag));
		cpt = 0;
		{
			_object removeMagazinesTurret [_mag select cpt,[-1]];	
			diag_log ("REMOVE AMMO OF pook_H13_transport_GUE DRIVER: " + str(_mag select cpt));
			cpt = cpt + 1;
		} forEach _mag;
		//GUNNER
        _mag = _object magazinesTurret [0];
		diag_log ("AMMO LIST OF pook_H13_transport_GUE GUNNER: " + str(_mag));
		cpt = 0;
		{
			_object removeMagazinesTurret [_mag select cpt,[0]];	
			diag_log ("REMOVE AMMO OF pook_H13_transport_GUE GUNNER: " + str(_mag select cpt));
			cpt = cpt + 1;
		} forEach _mag;
	};
	
		if (_object isKindof "pook_H13_transport_TAK") then {
		//DRIVER
        _mag = _object magazinesTurret [-1];
		diag_log ("AMMO LIST OF pook_H13_transport_TAK DRIVER: " + str(_mag));
		cpt = 0;
		{
			_object removeMagazinesTurret [_mag select cpt,[-1]];	
			diag_log ("REMOVE AMMO OF pook_H13_transport_TAK DRIVER: " + str(_mag select cpt));
			cpt = cpt + 1;
		} forEach _mag;
		//GUNNER
        _mag = _object magazinesTurret [0];
		diag_log ("AMMO LIST OF pook_H13_transport_TAK GUNNER: " + str(_mag));
		cpt = 0;
		{
			_object removeMagazinesTurret [_mag select cpt,[0]];	
			diag_log ("REMOVE AMMO OF pook_H13_transport_TAK GUNNER: " + str(_mag select cpt));
			cpt = cpt + 1;
		} forEach _mag;
	};
	
		if (_object isKindof "pook_H13_transport_INS") then {
		//DRIVER
        _mag = _object magazinesTurret [-1];
		diag_log ("AMMO LIST OF pook_H13_transport_INS DRIVER: " + str(_mag));
		cpt = 0;
		{
			_object removeMagazinesTurret [_mag select cpt,[-1]];	
			diag_log ("REMOVE AMMO OF pook_H13_transport_INS DRIVER: " + str(_mag select cpt));
			cpt = cpt + 1;
		} forEach _mag;
		//GUNNER
        _mag = _object magazinesTurret [0];
		diag_log ("AMMO LIST OF pook_H13_transport_INS GUNNER: " + str(_mag));
		cpt = 0;
		{
			_object removeMagazinesTurret [_mag select cpt,[0]];	
			diag_log ("REMOVE AMMO OF pook_H13_transport_INS GUNNER: " + str(_mag select cpt));
			cpt = cpt + 1;
		} forEach _mag;
	};
	
		if (_object isKindof "ori_gunship_helicopter") then {
		//M240
        _mag = _object magazinesTurret [0];
		diag_log ("AMMO LIST OF ori_gunship_helicopter GUNNER: " + str(_mag));
		cpt = 0;
		{
			_object removeMagazinesTurret [_mag select cpt,[0]];	
			diag_log ("REMOVE AMMO OF ori_gunship_helicopter GUNNER: " + str(_mag select cpt));
			cpt = cpt + 1;
		} forEach _mag;
	};
	
		if (_object isKindof "ori_gunship_helicopter") then {
		//M240
        _mag = _object magazinesTurret [1];
		diag_log ("AMMO LIST OF ori_gunship_helicopter GUNNER: " + str(_mag));
		cpt = 0;
		{
			_object removeMagazinesTurret [_mag select cpt,[1]];	
			diag_log ("REMOVE AMMO OF ori_gunship_helicopter GUNNER: " + str(_mag select cpt));
			cpt = cpt + 1;
		} forEach _mag;
	};
	
		if (_object isKindof "ori_gunship_helicopter") then {
		//M240
        _mag = _object magazinesTurret [2];
		diag_log ("AMMO LIST OF ori_gunship_helicopter GUNNER: " + str(_mag));
		cpt = 0;
		{
			_object removeMagazinesTurret [_mag select cpt,[2]];	
			diag_log ("REMOVE AMMO OF ori_gunship_helicopter GUNNER: " + str(_mag select cpt));
			cpt = cpt + 1;
		} forEach _mag;
	};
	
		if (_object isKindof "ori_gunship_helicopter") then {
		//M240
        _mag = _object magazinesTurret [3];
		diag_log ("AMMO LIST OF ori_gunship_helicopter GUNNER: " + str(_mag));
		cpt = 0;
		{
			_object removeMagazinesTurret [_mag select cpt,[3]];	
			diag_log ("REMOVE AMMO OF ori_gunship_helicopter 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)

Just make a file with notepad++ and place this code inside and name it fnc_remWepSG.sgf and place it in the compile folder of your dayz_server.pbo

 
As of now there is no way that i know of to acquire/add ammo to the F35 and Apache. I use them as vanity vehicles! Hope this helps! Any other vehicles that trouble you just ask and ill give them a shot on my test server when i have time! But its really easy to do. The only thing that needs edited is the classname usually. the numbers represent the seat. -1 is driver 0-(one less than how ever many gunners the vehicle has) are the gunners. not sure of passengers but they dont matter!
Not all drivers have guns, wont hurt to have the command in but its not needed!
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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
  • Discord

×
×
  • Create New...