Jump to content
  • 0

Remove rockets from helis


theduke

Question

Ok, so i've been banging my head for a while with this script.  Players have been asking for me to put in some helicopters, but they have rockets. Last thing i need lol

So i found this script which removes weapons/rockets, that after a little playing around with, i got it to work properly with the 1051 epoch version.

http://opendayz.net/threads/release-remove-weapons-ammunition-thermal-from-vehicle-epoch-version.18044/

This is my issue.  For ALL helicopters, after the script was added if i got in the pilots seat, the rockets would still be there. The second i turn on Manual Fire, the rockets were not accessible lol go figure, its arma.

Also in the gunner seat the rockets were not accessible.  So i thought, lets force players into manual fire mode while in pilot seat.

This worked well...on my test server lol

When i put it live, i had 2 of my admins try it out. When 2 players get into the heli, the gunner receives a spam chat because the pilot cannot be in manual fire mode while having a gunner... soo yeah lol

So now im trying to find a way, or if someone has experienced this.. I cannot leave the code for forcing players in manual fire...

Here is a snippet from my code

Spoiler

if (_object isKindof "AH1Z") then {
         _object magazinesTurret [-1];
         _object removeMagazinesTurret ["38Rnd_FFAR",[-1]];
         _object WeaponsTurret [-1];
         _object removeWeapon "FFARLauncher";
         _object WeaponsTurret [-1];
         _object removeWeapon "HellfireLauncher";
         _object WeaponsTurret [-1];
        _object removeWeapon "SidewinderLaucher_AH1Z";
    };

I also tried using removeWeaponGlobal

And i noticed some threads talked about RemoveWeaponTurret...but the BI wiki says its just for arma 3.. i tried anyways and it didnt work lol

Theres also a second method in that script, but all it does is remove the ammo from that weapon.. with my rearm script, you can rearm the hydras.

Any advice would be great...even if its DUKE ITS NOT POSSIBLE... then great, ill stop banging me head lol

Thanks

 

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0
6 hours ago, theduke said:

Theres also a second method in that script, but all it does is remove the ammo from that weapon.. with my rearm script, you can rearm the hydras.

 

1 hour ago, Casual_Jeff said:

Maybe you have a solution here. I have use it 2 years ago to remove ammo at pop.

 

 

Link to comment
Share on other sites

  • 0

My rearm setting in service point.

Spoiler

// rearm settings
_rearm_enable = true; // enable or disable the rearm option
//_blockedWeaponNames=["S-5","Hydra","CRV7"]; // weapon names you wish to exclude from rearming.  Leave empty [] to allow all
_blockedWeaponNames=["S-5","Hydra","CRV7","HellfireLauncher","S8Launcher","SmokeLauncher","VikhrLauncher"]; // Weapon names you wish to exclude from rearming.  Leave empty [] to allow all
_blockedAmmoNames = [ // Ammo names you wish to exclude from rearming. Leave empty [] to allow all
    "192Rnd_57mm",
    "128Rnd_57mm",
    "1200Rnd_762x51_M240",
    "SmokeLauncherMag",
    "60Rnd_CMFlareMagazine",
    "120Rnd_CMFlareMagazine",
    "240Rnd_CMFlareMagazine",
    "60Rnd_CMFlare_Chaff_Magazine",
    "120Rnd_CMFlare_Chaff_Magazine",
    "240Rnd_CMFlare_Chaff_Magazine",
    "4Rnd_AT2_Mi24D",
    "4Rnd_Ch29",
    "8Rnd_Hellfire",
    "2Rnd_Sidewinder_AH1Z",
    "80Rnd_80mm",
    "40Rnd_80mm",
    "40Rnd_S8T",
    "80Rnd_S8T",
    "12Rnd_Vikhr_KA50",
    "150Rnd_30mmAP_2A42",
    "150Rnd_30mmHE_2A42",
    "38Rnd_FFAR",
    "12Rnd_CRV7",
    "1500Rnd_762x54_PKT",
    "2000Rnd_762x54_PKT",
    "150Rnd_30mmAP_2A42",
    "150Rnd_30mmHE_2A42", 
    "230Rnd_30mmAP_2A42", 
    "230Rnd_30mmHE_2A42",
    "4000Rnd_762x51_M134"    
    ]; 
 

 

Link to comment
Share on other sites

  • 0
37 minutes ago, theduke said:

you must have a different rearm script than i use... If i add this in, the variable  _blockedWeaponNames is not within my script... interesting though.. thanks

this is my version of service points for 1.0.6+ https://github.com/oiad/service_points

You can block individual weapons from being rearmed in there.

Link to comment
Share on other sites

  • 0
4 hours ago, salival said:

this is my version of service points for 1.0.6+ https://github.com/oiad/service_points

You can block individual weapons from being rearmed in there.

well it partially works, but only while in gunner seat.  If im in pilot seat, not in manual fire, i still get the option to rearm.

Here is the block of code i did the change to

_fnc_getWeapons = {
        private ["_vehicle","_role","_weapons"];
        _vehicle = _this select 0;
        _role = _this select 1;
        _weapons = [];
        if (count _role > 1) then {
                private ["_turret","_weaponsTurret"];
                _turret = _role select 1;
                _weaponsTurret = _vehicle weaponsTurret _turret;
                {
                        private "_weaponName";
                        _weaponName = getText (configFile >> "CfgWeapons" >> _x >> "displayName");
						if !(_WeaponName in _rearm_ignore) then {
                        _weapons set [count _weapons, [_x, _weaponName, _turret]];
						};
                } forEach _weaponsTurret;
        };
        _weapons
};

and i added 

_rearm_ignore = ["Horn","Laser Marker","FFARLauncher"];

Link to comment
Share on other sites

  • 0

I am able to disable individual weapons properly, you just need to add the right weapon name to the list:

_rearm_costs = [
	["Flares",2000],
	["M240",5000],
	["PKM",5000],
	["PKT",5000],
	["M197","disabled"],
	["AIM-9L Sidewinder","disabled"],
	["AGM-114 Hellfire","disabled"],
	["Hydra","disabled"]
];

This example would completely disable the AH1Z from being able to be rearmed.

You need to add the text that is displayed in the menu not the actual  weapon or ammo name.

I.e Hydra is the text name, FFARLauncher is the weapon name. So you would use Hydra

 

*edit* it also looks like the version you're using is older, you should update to the latest one: https://github.com/oiad/service_points

Link to comment
Share on other sites

  • 0

well that didnt work either lol

When i get in the gunner seat, i see the name "rearm hydra" and it disappears right away...so the script works.... but while in pilot seat, I still have the option...

I guess Ill just wait till i do the move to 106...still trying to install coins and figure out the banking lol

Thanks @salival and @Casual_Jeff for the advice!

Link to comment
Share on other sites

  • 0
5 hours ago, theduke said:

well that didnt work either lol

When i get in the gunner seat, i see the name "rearm hydra" and it disappears right away...so the script works.... but while in pilot seat, I still have the option...

I guess Ill just wait till i do the move to 106...still trying to install coins and figure out the banking lol

Thanks @salival and @Casual_Jeff for the advice!

I've only just  clicked you're not using my version for 1.0.6 (so tired)

Did you port my version over to yours? I don't think you can disable individual weapons in the original version like you can in mine

Link to comment
Share on other sites

  • 0

no you cant with the original. And yes i tried to port that part of code into the one i was using. (but again my knowledge haha)

Its all good, im working to make a 106 server..so the players can wait lol

 

 

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

×
×
  • Create New...