Arma 3
Unlimited ammo rocket launcher script
Does anybody know a script that makes you have infinite rockets? The scripts I have seen before were only for Primary and secondary weapons.
Originally posted by IM SORRY BUFFALO:
Originally posted by LFG Rice Krispies:
Originally posted by IM SORRY BUFFALO:
fairly simple
player addeventhandler ["fired", { params ["_unit", "_wep"]; _testIsRocket = getText (configFile >> "CfgWeapons" >> _wep >> "cursor"); if (_testIsRocket isEqualTo "missile") then { _rocketArry = getArray (configFile >> "CfgWeapons" >> _wep >> "magazines"); _rocket = (_rocketArry select 0); _unit addMagazine _rocket; reload _unit;//remove if unwanted }; }];
Quick question. Does this also work for the MAAWS?
it will work with any launcher, its why im reading details from the configs.
you put this in the initPlayerLocal, if you put it in the init of a unit then replace
player
with
this
< >
Showing 1-12 of 12 comments
Sgt Smash Aug 13, 2018 @ 11:56am 
Add this to the unit

this addEventHandler ["Fired",{(_this select 0) setVehicleAmmo 1}]
Heavy Weapons Guy Aug 13, 2018 @ 11:58am 
Originally posted by Sgt Smash:
Add this to the unit

this addEventHandler ["Fired",{(_this select 0) setVehicleAmmo 1}]

The problem is.. That script only makes your primary and secondary weapon (Assault rifle and your pistol) have unlimited ammo but it does'nt work for the rocket launcher.
Sgt Smash Aug 13, 2018 @ 12:02pm 
Originally posted by LFG Rice Krispies:
Originally posted by Sgt Smash:
Add this to the unit

this addEventHandler ["Fired",{(_this select 0) setVehicleAmmo 1}]

The problem is.. That script only makes your primary and secondary weapon (Assault rifle and your pistol) have unlimited ammo but it does'nt work for the rocket launcher.
oh, soz my bad never used it for launchers before and thought it would do the job lol

i'm not sure then sorry dude, hopefully someone will know
IM SORRY BUFFALO Aug 13, 2018 @ 12:31pm 
fairly simple
player addeventhandler ["fired", { params ["_unit", "_wep"]; _testIsRocket = getText (configFile >> "CfgWeapons" >> _wep >> "cursor"); if (_testIsRocket isEqualTo "missile") then { _rocketArry = getArray (configFile >> "CfgWeapons" >> _wep >> "magazines"); _rocket = (_rocketArry select 0); _unit addMagazine _rocket; reload _unit;//remove if unwanted }; }];
Heavy Weapons Guy Aug 13, 2018 @ 12:52pm 
Originally posted by IM SORRY BUFFALO:
fairly simple
player addeventhandler ["fired", { params ["_unit", "_wep"]; _testIsRocket = getText (configFile >> "CfgWeapons" >> _wep >> "cursor"); if (_testIsRocket isEqualTo "missile") then { _rocketArry = getArray (configFile >> "CfgWeapons" >> _wep >> "magazines"); _rocket = (_rocketArry select 0); _unit addMagazine _rocket; reload _unit;//remove if unwanted }; }];
Quick question. Does this also work for the MAAWS?
Heavy Weapons Guy Aug 13, 2018 @ 12:58pm 
Originally posted by IM SORRY BUFFALO:
fairly simple
player addeventhandler ["fired", { params ["_unit", "_wep"]; _testIsRocket = getText (configFile >> "CfgWeapons" >> _wep >> "cursor"); if (_testIsRocket isEqualTo "missile") then { _rocketArry = getArray (configFile >> "CfgWeapons" >> _wep >> "magazines"); _rocket = (_rocketArry select 0); _unit addMagazine _rocket; reload _unit;//remove if unwanted }; }];
Oh and do I paste this script into the debug console or into init?
The author of this thread has indicated that this post answers the original topic.
IM SORRY BUFFALO Aug 13, 2018 @ 1:11pm 
Originally posted by LFG Rice Krispies:
Originally posted by IM SORRY BUFFALO:
fairly simple
player addeventhandler ["fired", { params ["_unit", "_wep"]; _testIsRocket = getText (configFile >> "CfgWeapons" >> _wep >> "cursor"); if (_testIsRocket isEqualTo "missile") then { _rocketArry = getArray (configFile >> "CfgWeapons" >> _wep >> "magazines"); _rocket = (_rocketArry select 0); _unit addMagazine _rocket; reload _unit;//remove if unwanted }; }];
Quick question. Does this also work for the MAAWS?
it will work with any launcher, its why im reading details from the configs.
you put this in the initPlayerLocal, if you put it in the init of a unit then replace
player
with
this
Heavy Weapons Guy Aug 13, 2018 @ 1:15pm 
Originally posted by IM SORRY BUFFALO:
Originally posted by LFG Rice Krispies:
Quick question. Does this also work for the MAAWS?
it will work with any launcher, its why im reading details from the configs.
you put this in the initPlayerLocal, if you put it in the init of a unit then replace
player
with
this
Oh alright. Thanks!
ethan919 Mar 18, 2019 @ 1:10pm 
Originally posted by IM SORRY BUFFALO:
Originally posted by LFG Rice Krispies:
Quick question. Does this also work for the MAAWS?
it will work with any launcher, its why im reading details from the configs.
you put this in the initPlayerLocal, if you put it in the init of a unit then replace
player
with
this
I keep getting an error when trying to use this script. Do you know of any other script that works for getting unlimited launcher ammo? I've googled quite a lot and haven't come across anything. Thank you.
Sabot105mm Jul 10, 2019 @ 2:18pm 
Originally posted by IM SORRY BUFFALO:
fairly simple
player addeventhandler ["fired", { params ["_unit", "_wep"]; _testIsRocket = getText (configFile >> "CfgWeapons" >> _wep >> "cursor"); if (_testIsRocket isEqualTo "missile") then { _rocketArry = getArray (configFile >> "CfgWeapons" >> _wep >> "magazines"); _rocket = (_rocketArry select 0); _unit addMagazine _rocket; reload _unit;//remove if unwanted }; }];


this addEventHandler ["Fired",{if (currentWeapon (_this select 0) isKindOf ["Launcher", configFile >> "CfgWeapons"]) then {(_this select 0) addMagazine [(_this select 5),1];};}];
also will work.
preserver83 Feb 27, 2021 @ 6:53am 
Originally posted by Sabot105mm:


this addEventHandler ["Fired",{if (currentWeapon (_this select 0) isKindOf ["Launcher", configFile >> "CfgWeapons"]) then {(_this select 0) addMagazine [(_this select 5),1];};}];
also will work.

This works perfectly. thanks
Swivel Guy Nov 21, 2021 @ 8:35pm 
this addEventHandler ["Reloaded", { params ["_unit", "_weapon", "_muzzle", "_newMagazine", "_oldMagazine"]; _unit addMagazineGlobal (_newMagazine select 0); }];
To all those who google this in the future. Slap this onto the init of ANY infantry unit and you will have unlimited EVERYTHING! This includes rockets, bullets, grenades etc.

Your welcome future googlers.
Last edited by Swivel Guy; Nov 21, 2021 @ 8:36pm
< >
Showing 1-12 of 12 comments
Per page: 1530 50

Date Posted: Aug 13, 2018 @ 11:51am
Posts: 12