Jump to content
Sign in to follow this  
bravo 6

Rearm air vehicles with truck?

Recommended Posts

I'll rephrase for clarity.

I want to find the maximum capacity of firable ammunition for a particular weapon on a particular vehicle, FROM THE CONFIGs (I script which works fine but use hard-code values).

ie. to quote from below

for the M197 on a AH1W the answer is 750

I don't need to test if the vehicle needs ammo, I need to test for when it is FULL.

Either way you still need to get the hard-coded values, 750 (M137) ,38 (FFAR) and 8 (HELLHFIRE) from somewhere.

And yes you're right your solution is complicated.

BarmyArmy

LynxEye @ April 02 2007,20:11)]I did it, but in a complicated way.

As i noticed in ArmA 1.05 (original addOn), the vehicle that has the max. amount of 'fireable' weapons is 4.

.

.

.

Weapon 4 : make the 100% of the max. amount.

If we have a vehicle with 3 weapons... make % of Weapon 4 = 100.

If we have a vehicle with 2 weapons... make % of Weapon 3 to 100, and Wpon4 to 100.

.

.

.

As example:

AH1Z. 3 Weapons. One mag per weapon.

Weapon1: M197 cannon. 100% = 750 x 1 (750 bullets, 1 mag).

Weapon2: FFAR rckts. 100% = 38 x 1 (38 rockets, 1 mag).

Weapon3: Hellf's missils. 100% = 8 x 1 (8 missils, 1 mag).

Weapon4 = none, then 100% wink_o.gif

[edited by Barmy for brevity]

The script i wrote here is not a real one. My original one is much more complicated.

If you have more than 1 mag, you need another kind of maths... I gave you only one possible way. Not the only one.

You have to make a lot different and complicated script to catch ammo of special vehicles/turrets.

Use Event Handler 'fired' to catch ammo of these vehicles:

- KA50. Weapon "2A42" with 2 kind of different ammo.

- BMP2. Weapon "2A42" with 2 kind of different ammo.

- UH60MG. Weapon "M134_2".

- RHIB2Turret. Weapon "MK19".

- M1Abrams. "M256" & "M2".

- T72. "D81" & "DSHKM".

Following weapons can be rearmed only its actual/last mag:

- RHIB2Turret. MK19. (Reargunner GL).

- M1Abrams. M2. (Commander MG).

- T72. DSHKM. (Commander MG).

The rest, can be fully rearmed (all mags, no matter).

If you want to see how a dynamic (crapply scripted) rearm in action...

LynxEye in LynxPC

8 players.

Mission (all vehicles, no enemies. Just testing vehicles).

"Just-A-Test by LynxEye"

Quote[/b] ]Is there a way to tell what the 'maximum FIRABLE capacity' of a vehicle for a particular weapon

If you making arrays with some REAL info about declaring max weapons... its names... its name of magazines... you can do easy maths to test the weapons of a vehicle.

Share this post


Link to post
Share on other sites

Are u asking for the max values for all vehicles with weapons?

Including mags?

Ok..Ok...Ok...

Rdy to read spam arrays...

It seems people don't want to research...

Ok.

vehplyr == "ParachuteWest"          : Vehp = ["Parachute W"      ,0,0,0, 0, 1,0,0,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0,  0,3, 2,0,0,0]; goto "Parachute"

?vehplyr == "ParachuteEast"          : Vehp = ["Parachute E"      ,0,0,0, 0, 1,0,0,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0,  0,3, 2,0,0,0]; goto "Parachute"

?vehplyr == "Parachute"              : Vehp = ["Parachute"        ,0,0,0, 0, 1,0,0,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0,  0,3, 2,0,0,0]; goto "Parachute"

?vehplyr == "ParachuteG"             : Vehp = ["RACS Parachute"   ,0,0,0, 0, 1,0,0,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0,  0,3, 2,0,0,0]; goto "Parachute"

?vehplyr == "ParachuteC"             : Vehp = ["Civil Parachute"  ,0,0,0, 0, 1,0,0,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0,  0,3, 2,0,0,0]; goto "Parachute"

; Air Vehicles - Helicopters

?vehplyr == "AH1W"                   : Vehp = ["Cobra AH-1Z"      ,3,1,0, 0, 2,2,1,"M197 Cannon: "   ,"M197"             ,"750Rnd_M197_AH1"      , 750,1,"FFAR Rockets:   ","FFARLauncher"      ,"38Rnd_FFAR"         ,  38,1,"HellFires:         ","HellfireLauncher","8Rnd_Hellfire"      ,   8,1,""                   ,""                 ,""                   ,   0,0,  1,3, 3,1,0,1]; goto "MainSeats"

?vehplyr == "AH6"                    : Vehp = ["AH6"              ,2,0,0, 1, 2,2,1,"FFAR Rockets:   ","FFARLauncher"     ,"14Rnd_FFAR"           ,  14,1,"M134 Cannon:   " ,"TwinM134"          ,"4000Rnd_762x51_M134",4000,1,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 50,7, 5,1,0,1]; goto "MainSeats"

?vehplyr == "AH6_RACS"               : Vehp = ["RACS AH6"         ,2,0,0, 1, 2,2,1,"FFAR Rockets:   ","FFARLauncher"     ,"14Rnd_FFAR"           ,  14,1,"M134 Cannon:   " ,"TwinM134"          ,"4000Rnd_762x51_M134",4000,1,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 50,7, 5,1,0,1]; goto "MainSeats"

?vehplyr == "MH6"                    : Vehp = ["MH6"              ,0,0,0, 5, 6,2,1,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0,100,7,10,1,0,1]; goto "MainSeats"

?vehplyr == "MH6_RACS"               : Vehp = ["RACS MH6"         ,0,0,0, 5, 6,2,1,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0,100,7,10,1,0,1]; goto "MainSeats"

?vehplyr == "KA50"                   : Vehp = ["Kamov KA50"       ,4,0,0, 0, 1,2,0,"2A42 AP:      "  ,"SPECIAL"          ,"230Rnd_30mmAP_2A42"   , 230,1,"2A42 HE:      "  ,"SPECIAL"           ,"230Rnd_30mmHE_2A42" , 230,1,"80mm Rockets:    "  ,"80mmLauncher"    ,"40Rnd_80mm"         ,  40,1,"Vikhr Rockets:     ","VikhrLauncher"    ,"12Rnd_Vikhr_KA50"   ,  12,1, 11,3, 2,1,4,2]; goto "MainSeats"

?vehplyr == "UH60MG"                 : Vehp = ["BlackHawk UH60 MG",2,2,0,13,16,2,1,"M134 Cannon:   " ,"M134"             ,"2000Rnd_762x51_M134"  ,2000,1,"M134 2:"         ,"SPECIAL"           ,"2000Rnd_762x51_M134",2000,1,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 99,9,10,1,4,2]; goto "MainSeats"

?vehplyr == "UH60"                   : Vehp = ["BlackHawk UH60"   ,1,0,0,13,14,2,1,"FFAR Rockets:   ","FFARLauncher"     ,"38Rnd_FFAR"           ,  38,1,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,7,10,1,0,1]; goto "MainSeats"

?vehplyr == "Mi17_MG"                : Vehp = ["Mi 17 MG"         ,1,1,0,16,18,2,1,"PKT Cannon:   "  ,"PKT"              ,"2000Rnd_762x54_PKT"   ,2000,1,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 30,8,10,1,0,1]; goto "MainSeats"

?vehplyr == "Mi17"                   : Vehp = ["Mi 17"            ,1,0,0,16,17,2,1,"57mm Rockets:   ","57mmLauncher"     ,"96Rnd_57mm"           ,  96,1,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,7,10,1,0,1]; goto "MainSeats"

; Air Vehicles - Planes

?vehplyr == "Camel"                  : Vehp = ["Camel Biplane W"  ,2,0,0, 0, 1,2,0,"TwinVickers:   " ,"TwinVickers"      ,"500Rnd_TwinVickers"   , 500,1,"Grenades:       ","CamelGrenades"     ,"6Rnd_Grenade_Camel" ,   6,1,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 10,6, 2,0,0,1]; goto "MainSeats"

?vehplyr == "Camel2"                 : Vehp = ["Camel Biplane E"  ,2,0,0, 0, 1,2,0,"TwinVickers:   " ,"TwinVickers"      ,"500Rnd_TwinVickers"   , 500,1,"Grenades:       ","CamelGrenades"     ,"6Rnd_Grenade_Camel" ,   6,1,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 10,6, 2,0,0,1]; goto "MainSeats"

?vehplyr == "AV8B"                   : Vehp = ["AV8B Bomber"      ,2,0,0, 0, 1,2,0,"Bombs: "         ,"BombLauncher"     ,"5Rnd_GBU12_AV8B"      ,   5,1,"GAU12 Cannon:   ","GAU12"             ,"300Rnd_25mm_GAU12"  , 300,1,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 10,6, 2,0,0,1]; goto "MainSeats"

?vehplyr == "AV8B2"                  : Vehp = ["AV8B Fighter"     ,2,0,0, 0, 1,2,0,"AIM-9X :"        ,"SidewinderLaucher","4Rnd_Sidewinder_AV8B" ,   4,1,"GAU12 Cannon:   ","GAU12"             ,"300Rnd_25mm_GAU12"  , 300,1,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 10,6, 2,0,0,1]; goto "MainSeats"

?vehplyr == "Su34"                   : Vehp = ["Su34 Fighter"     ,3,1,0, 0, 2,2,1,"R73Launcher: "   ,"R73Launcher"      ,"4Rnd_R73"             ,   4,1,"S8Launcher: "    ,"S8Launcher"        ,"80Rnd_S8T"          ,  80,1,"GSh301: "           ,"GSh301"          ,"180Rnd_30mm_GSh301" , 180,1,""                   ,""                 ,""                   ,   0,0,666,6, 3,0,0,1]; goto "MainSeats"

?vehplyr == "Su34B"                  : Vehp = ["Su34 Bomber"      ,3,1,0, 0, 2,2,1,"Ch29Launcher: "  ,"Ch29Launcher"     ,"4Rnd_Ch29"            ,   4,1,"S8Launcher: "    ,"S8Launcher"        ,"80Rnd_S8T"          ,  40,1,"GSh301: "           ,"GSh301"          ,"180Rnd_30mm_GSh301" , 180,1,""                   ,""                 ,""                   ,   0,0,666,6, 3,0,0,1]; goto "MainSeats"

#IsWaterVehicle

; Water Vehicles

?vehplyr == "Zodiac"                 : Vehp = ["CRRC Boat"        ,0,0,0, 4, 5,1,1,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2,11,0,0,0]; goto "MainSeats"

?vehplyr == "Zodiac2"                : Vehp = ["CRRC-2 Boat"      ,0,0,0, 4, 5,1,1,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2,11,0,0,0]; goto "MainSeats"

?vehplyr == "PBX"                    : Vehp = ["PBX Boat"         ,0,0,0, 3, 4,1,1,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2,11,0,0,0]; goto "MainSeats"

?vehplyr == "RHIB"                   : Vehp = ["RHIB Boat"        ,1,1,0,10,12,1,1,"M2: "            ,"M2"               ,"100Rnd_127x99_M2"     , 100,3,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0,777,2,11,0,0,2]; goto "MainSeats"

?vehplyr == "RHIB2Turret"            : Vehp = ["RHIB-2 Boat"      ,2,2,0, 7,10,1,1,"M2: "            ,"M2"               ,"100Rnd_127x99_M2"     , 100,3,"MK19: "          ,"SPECIAL"           ,""                   ,  48,4,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0,778,9,11,0,4,2]; goto "MainSeats"

#IsCarVehicle

; Ground Vehicles with Weapons

?vehplyr == "Truck5tMG"              : Vehp = ["5t Truck-MG"      ,1,1,0,12,14,1,1,"M2: "            ,"M2"               ,"100Rnd_127x99_M2"     , 100,4,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2, 9,0,1,2]; goto "MainSeats"

?vehplyr == "LandroverMG"            : Vehp = ["Army 4x4 MG"      ,1,1,0, 1, 3,1,1,"M2: "            ,"M2"               ,"100Rnd_127x99_M2"     , 100,6,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2, 4,0,2,2]; goto "MainSeats"

?vehplyr == "Stryker_ICV_M2"         : Vehp = ["Stryker-M2"       ,1,1,0, 9,11,1,1,"M2: "            ,"M2"               ,"100Rnd_127x99_M2"     , 100,6,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2, 9,0,2,2]; goto "MainSeats"

?vehplyr == "Stryker_ICV_MK19"       : Vehp = ["Stryker-Mk19"     ,1,1,0, 9,11,1,1,"MK19: "          ,"MK19"             ,"48Rnd_40mm_MK19"      ,  48,4,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2, 9,0,2,2]; goto "MainSeats"

?vehplyr == "Stryker_TOW"            : Vehp = ["Stryker-TOW"      ,1,1,0, 0, 2,1,1,"TOW: "           ,"TOWLauncher"      ,"2Rnd_TOW"             ,   2,5,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2,12,0,2,2]; goto "MainSeats"

?vehplyr == "BRDM2"                  : Vehp = ["BRDM-2"           ,2,1,0, 3, 5,1,1,"KVPT: "          ,"KPVT"             ,"500Rnd_145x115_KPVT"  , 500,1,"PKT: "           ,"PKT"               ,"1500Rnd_762x54_PKT" ,1500,1,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2, 7,0,2,1]; goto "MainSeats"

?vehplyr == "BRDM2_ATGM"             : Vehp = ["BRDM-2-ATGM"      ,1,1,0, 1, 3,1,1,"AT5Launcher: "   ,"AT5Launcher"      ,"5Rnd_AT5_BRDM2"       ,   5,2,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2, 4,0,2,2]; goto "MainSeats"

?vehplyr == "UAZMG"                  : Vehp = ["UAZ-MG"           ,1,1,0, 1, 3,1,1,"DSHKM: "         ,"DSHKM"            ,"50Rnd_127x107_DSHKM"  ,  50,6,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2, 4,0,2,2]; goto "MainSeats"

?vehplyr == "UAZ_AGS30"              : Vehp = ["UAZ-AGS30"        ,1,1,0, 1, 3,1,1,"AGS30: "         ,"AGS30"            ,"29Rnd_30mm_AGS30"     ,  29,6,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2, 4,0,2,2]; goto "MainSeats"

?vehplyr == "HMMWV50"                : Vehp = ["HumVee-MG"        ,1,1,0, 3, 5,1,1,"M2: "            ,"M2"               ,"100Rnd_127x99_M2"     , 100,6,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2, 7,0,2,2]; goto "MainSeats"

?vehplyr == "HMMWVTOW"               : Vehp = ["HumVee-TOW"       ,1,1,0, 3, 5,1,1,"TOW: "           ,"TOWLauncherSingle","6Rnd_TOW_HMMWV"       ,   6,1,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2, 7,0,2,1]; goto "MainSeats"

?vehplyr == "HMMWVMK"                : Vehp = ["HumVee-Mk"        ,1,1,0, 3, 5,1,1,"Mk19: "          ,"MK19"             ,"48Rnd_40mm_MK19"      ,  48,4,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2, 7,0,2,2]; goto "MainSeats"

; Ground Vehicles - Trucks,Bus,Tractors,Motorcycles

?vehplyr == "Truck5t"                : Vehp = ["5t Truck"         ,0,0,0,13,14,1,1,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2, 9,0,0,0]; goto "MainSeats"

?vehplyr == "Truck5tOpen"            : Vehp = ["5t Truck Open"    ,0,0,0,13,14,1,1,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2, 9,0,0,0]; goto "MainSeats"

?vehplyr == "Truck5tRepair"          : Vehp = ["5t Repair Truck"  ,0,0,0, 1, 2,1,1,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2, 4,0,0,0]; goto "MainSeats"

?vehplyr == "Truck5tReammo"          : Vehp = ["5t Ammo Truck"    ,0,0,0, 1, 2,1,1,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2, 4,0,0,0]; goto "MainSeats"

?vehplyr == "Truck5tRefuel"          : Vehp = ["5t Fuel Truck"    ,0,0,0, 1, 2,1,1,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2, 4,0,0,0]; goto "MainSeats"

?vehplyr == "Ural"                   : Vehp = ["Ural"             ,0,0,0,14,15,1,1,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2, 9,0,0,0]; goto "MainSeats"

?vehplyr == "UralOpen"               : Vehp = ["Ural Open"        ,0,0,0,14,15,1,1,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2, 9,0,0,0]; goto "MainSeats"

?vehplyr == "UralRepair"             : Vehp = ["Repair Ural"      ,0,0,0, 2, 3,1,1,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2, 6,0,1,0]; goto "MainSeats"

?vehplyr == "UralReammo"             : Vehp = ["Ammo Ural"        ,0,0,0, 2, 3,1,1,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2, 6,0,1,0]; goto "MainSeats"

?vehplyr == "UralRefuel"             : Vehp = ["Fuel Ural"        ,0,0,0, 2, 3,1,1,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2, 6,0,1,0]; goto "MainSeats"

?vehplyr == "UralCivil"              : Vehp = ["Civil Ural"       ,0,0,0,14,15,1,1,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2, 9,0,0,0]; goto "MainSeats"

?vehplyr == "UralCivil2"             : Vehp = ["Civil Ural-2"     ,0,0,0,14,15,1,1,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2, 9,0,0,0]; goto "MainSeats"

?vehplyr == "Bus_city"               : Vehp = ["Bus"              ,0,0,0,12,13,1,1,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2, 9,0,0,0]; goto "MainSeats"

?vehplyr == "tractor"                : Vehp = ["Super Tractor"    ,0,0,0, 0, 1,1,0,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2, 1,0,0,0]; goto "MainSeats"

#IsMoto

; Ground Vehicles - Motorbykes

?vehplyr == "M1030"                  : Vehp = ["Motorcycle"       ,0,0,0, 1, 2,1,1,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0,666,0, 4,0,3,0]; goto "MainSeats"

?vehplyr == "TT650G"                 : Vehp = ["RACS Motorcycle"  ,0,0,0, 1, 2,1,1,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0,666,0, 4,0,3,0]; goto "MainSeats"

?vehplyr == "TT650C"                 : Vehp = ["Civil Motorcycle" ,0,0,0, 1, 2,1,1,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0,666,0, 4,0,3,0]; goto "MainSeats"

; Ground Vehicles - Cars

?vehplyr == "HMMWV"                  : Vehp = ["HumVee"           ,0,0,0, 3, 4,1,1,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2, 7,0,0,0]; goto "MainSeats"

?vehplyr == "UAZ"                    : Vehp = ["UAZ"              ,0,0,0, 6, 7,1,1,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2, 9,0,0,0]; goto "MainSeats"

?vehplyr == "Skoda"                  : Vehp = ["Ckoda White Car"  ,0,0,0, 3, 4,1,1,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2, 7,0,0,0]; goto "MainSeats"

?vehplyr == "SkodaBlue"              : Vehp = ["Ckoda Blue Car"   ,0,0,0, 3, 4,1,1,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2, 7,0,0,0]; goto "MainSeats"

?vehplyr == "SkodaRed"               : Vehp = ["Ckoda Red Car"    ,0,0,0, 3, 4,1,1,""                ,""                 ,""                     ,   0,0,""                ,""                  ,""                   ,   0,0,""                   ,""                ,""                   ,   0,0,""                   ,""                 ,""                   ,   0,0, 80,2, 7,0,0,0]; goto "MainSeats"

Share this post


Link to post
Share on other sites
LynxEye @ April 02 2007,20:58)]Are u asking for the max values for all vehicles with weapons?

Including mags?

Not sure I need the magazines, just the ammo count

ie. 8 Hellfires, I don't care so much about the magazine size.

And to re-iterate I wanted to know if anyone knew how to read these valuesa from the ArmA CONFIGs, NOT using an array...

BA

Share this post


Link to post
Share on other sites

These are my arrays declaring the info you needing.

As you not testing... and only asking... try to 'decrypt' the arrays.

At least, try to copy and paste it into Notepad with Font 'Lucida Console' or 'Courier'.

Can you do it?

Share this post


Link to post
Share on other sites

* sigh *

I have a solution that uses an array... have a look at getAmmoCounts.sqf ( if you follow the link below )

I want to know if anyone can read the values from the configs, in a similar way to how Karillion read the magazine types.

_mags = getArray (configFile >> "CfgWeapons" >> weapon >> "magazines")

Quote[/b] ]

Resupply using trucks!!

http://www.flashpoint1985.com/cgi-bin....1040772

I do currently use a 'hand rolled' script to detect when the helicopter is resupplied correctly.

Is there a way to tell what the 'maximum FIRABLE ammo capacity' of a vehicle for a particular weapon is from the configs. By firable I mean not cargo.

Also I have heard that reading the config files can cause performance issues, anyone like to comment ?

Barmy

Share this post


Link to post
Share on other sites
Quote[/b] ]I don't need to test if the vehicle needs ammo, I need to test for when it is FULL.

If the vehicle is not needing ammo... maybe is FULL?

Share this post


Link to post
Share on other sites

I have written a general-purpose magazine-refiller that will work with any vehicle sans any pre-configuration of the script. The only problem as of right now is that it can't handle secondary turrets properly, i.e the door gunner (right side) on the UH60 and the commander turrets for MBTs will not be refilled. In the case of the UH60, it will add all the configured magazines (two) to the crew-chief (left side) weapon.

As soon as someone (or I) figure out how to specify which weapon to get what ammo, I'll update the script.

It has been tried and it works with the following vehicles: AH6, AV8B, UH60 MG, M1A1, HMMWV M2, HMMWV TOW, BRDM ATGM and M113. It doesn't matter if you are completely dry or not, it refills from 0 magazines up to maximum as defined in the config.

It's sqf-based, so either you compile/loadFile it and use call, or you execVM it, and pass in a reference to the vehicle in question.

rearm.sqf:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_veh = (_this select 0);

_type = (typeOf _veh);

_hasTurrets = (count (configFile >> "CfgVehicles" >> _type >> "Turrets")) > 0;

{_veh removeMagazine _x;} forEach magazines _veh;

_magazines = if (_hasTurrets) then

{

_ms = [];

for "_i" from 0 to ((count (configFile >> "CfgVehicles" >> _type >> "Turrets")) - 1) do

{

_t = (configFile >> "CfgVehicles" >> _type >> "Turrets") select _i;

_ms = _ms + (getArray (_t >> "magazines"));

};

_ms

}

else

{

_ms = getArray (configFile >> "CfgVehicles" >> _type >> "magazines");

_ms

};

{_veh addMagazine _x} forEach _magazines;

Share this post


Link to post
Share on other sites

it works for any vehicle with one turret, or atleast its designed for it. (so the commander machinegun doesnt get rearmed on tanks).

Share this post


Link to post
Share on other sites
I have written a general-purpose magazine-refiller that will work with any vehicle sans any pre-configuration of the script. The only problem as of right now is that it can't handle secondary turrets properly, i.e the door gunner (right side) on the UH60 and the commander turrets for MBTs will not be refilled. In the case of the UH60, it will add all the configured magazines (two) to the crew-chief (left side) weapon.

As soon as someone (or I) figure out how to specify which weapon to get what ammo, I'll update the script.

It has been tried and it works with the following vehicles: AH6, AV8B, UH60 MG, M1A1, HMMWV M2, HMMWV TOW, BRDM ATGM and M113. It doesn't matter if you are completely dry or not, it refills from 0 magazines up to maximum as defined in the config.

It's sqf-based, so either you compile/loadFile it and use call, or you execVM it, and pass in a reference to the vehicle in question.

rearm.sqf:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_veh = (_this select 0);

_type = (typeOf _veh);

_hasTurrets = (count (configFile >> "CfgVehicles" >> _type >> "Turrets")) > 0;

{_veh removeMagazine _x;} forEach magazines _veh;

_magazines = if (_hasTurrets) then

{

   _ms = [];

   for "_i" from 0 to ((count (configFile >> "CfgVehicles" >> _type >> "Turrets")) - 1) do

   {

       _t = (configFile >> "CfgVehicles" >> _type >> "Turrets") select _i;

       _ms = _ms + (getArray (_t >> "magazines"));

   };

   _ms

}

else

{

   _ms = getArray (configFile >> "CfgVehicles" >> _type >> "magazines");

   _ms

};

{_veh addMagazine _x} forEach _magazines;

how do i get this one to run?

it's that part i have trouble with:

"It's sqf-based, so either you compile/loadFile it and use call, or you execVM it, and pass in a reference to the vehicle in question."

d i put the textpad file (.sqf) in my mission folder and execute it in the init line of a helipad?

Share this post


Link to post
Share on other sites

The vclRepairPad.sqs is great BUT when I rearm an AH-6, I get my 14 FFAR back, then after they have been used up, it pops up with another 38 FFAR mid air.

Removing the AH1W line in the reload doesnt prevent this.

Cheers

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×