Nicolas Eymerich 0 Posted March 13, 2007 It worked in OPF 1.96 Any help? p.s _vehicle is an object passed by another script. Share this post Link to post Share on other sites
ACF 0 Posted March 13, 2007 Magazine classnames aren't the same as weapon classnames now. Have a look at: http://community.bistudio.com/wiki/ArmA:_Weapons Share this post Link to post Share on other sites
Nicolas Eymerich 0 Posted March 13, 2007 In other words... ..there isn't other way to fill the ammunition of the vehicle? Btw Thanks for the reply... Share this post Link to post Share on other sites
satexas69 0 Posted March 13, 2007 Here's my sqs... use this. Works great on crates, vehicles, whatever. Obviously alter the contents to your needs, create multiple .sqs files for each need. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ; Instructions: ; ; 1. In your mission directory, make a subdirectory called "reload" and put this ; script in it called "ammobox_1.sqs" ; ; 2. Make a crate in the game ; ; 3. PUt this as it's NAME: Â ammo_1 ; ; 4. Put this in the item's INIT field: Â [ammo_1] exec "reload\ammobox_1.sqs ; ; Increment the ammobox tag for each individual box after that first one to load others ; IE: [ammo_2]... [ammo_5]... ; NOTE - This is my USA GUNS crate ; Get the crate parameter given _crate = _this Select 0 ; REMOVE STOCK ITEMS FROM THE CRATE: ClearMagazineCargo _crate ClearWeaponCargo _crate ; ADD THE ITEMS TO THE CRATE: ; West Weapons ;_crate addweaponcargo ["M21", 50] ;_crate addmagazinecargo ["M21", 50] _crate addweaponcargo ["M9",100] _crate addweaponcargo ["M9SD",100] _crate addweaponcargo ["M16A2",100] _crate addweaponcargo ["M16A2GL",100] _crate addweaponcargo ["M4",100] _crate addweaponcargo ["M4A1SD",100] _crate addweaponcargo ["M4GL",100] _crate addweaponcargo ["M4A1",100] _crate addweaponcargo ["M4A1GL",100] _crate addweaponcargo ["M4AIM",100] _crate addweaponcargo ["M4SPR",100] _crate addweaponcargo ["G36a",100] _crate addweaponcargo ["g36c",100] _crate addweaponcargo ["g36k",100] _crate addweaponcargo ["m24",100] _crate addweaponcargo ["mp5A5",100] _crate addweaponcargo ["MP5SD",100] _crate addweaponcargo ["M240",100] _crate addweaponcargo ["M249",100] _crate addweaponcargo ["M107",100] _crate addmagazinecargo ["10Rnd_127x99_m107",100] _crate addweaponcargo ["Laserdesignator",100] _crate addweaponcargo ["Binocular",100] _crate addweaponcargo ["NVGoggles",100] _crate addmagazinecargo ["30Rnd_9x19_MP5",100] _crate addmagazinecargo ["30Rnd_9x19_MP5SD",100] _crate addmagazinecargo ["15Rnd_9x19_M9",100] _crate addmagazinecargo ["15Rnd_9x19_M9SD",100] _crate addmagazinecargo ["30Rnd_556x45_Stanag",100] _crate addmagazinecargo ["30Rnd_556x45_G36",100] _crate addmagazinecargo ["200Rnd_556x45_M249",100] _crate addmagazinecargo ["5Rnd_762x51_M24",100] _crate addmagazinecargo ["100Rnd_762x51_M240",100] _crate addmagazinecargo ["1Rnd_HE_M203",100] _crate addmagazinecargo ["Laserbatteries",100] ; East Weapons _crate addweaponcargo ["PK",100] _crate addmagazinecargo ["100Rnd_762x54_PK"] _crate addweaponcargo ["SVD",100] _crate addmagazinecargo ["10Rnd_762x54_SVD"] Exit Yer welcome. Share this post Link to post Share on other sites
KaRRiLLioN 0 Posted March 13, 2007 Are you talking about adding weapon CARGO or adding magazines to a vehicle's weapon? You're probably wanting: {_vehicle addmagazine _x} foreach magazines _vehicle This will only work properly if you haven't zeroed out the magazines in the weapon before getting in. In other words, if you fire all the ammo, then run the command, it'll work. If you put the vehicle in the editor without any ammo, i.e. setVehicleAmmo 0, then the command won't work. Not sure why. If you want to add ammo cargo to a vehicle, then use satexas69's example. Share this post Link to post Share on other sites