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;};
//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