PDA

View Full Version : TU-Weapon Ammo Crate Script



the unknown
Dec 11 2006, 12:18
Well first of all if this is in the wrong section I am sorry, feel free to move it.

Ok I got bored and tought why not make a weapon/ammo crate script with all the weapons of ArmA in it.

The script is started by putting the following in the crates initfield.
[This,#] exec "TU-WeaponAmmoDump.sqs"
You will have to change the # to the Type number of what crate you want.

The Types are,
1 = Weapons and Ammo West
2 = Ammo West
3 = Weapons West
4 = Weapons and Ammo East
5 = Ammo East
6 = Weapons East
7 = Other Universal

The Independed weapons are in the west crates.

Copy Past the following code into a text editor and name it TU-WeaponAmmoDump.sqs
Then put it in the folder of your mission.
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">; *****************************************************
; ** Armed Assault Script File
; *****************************************************
; Armed Assault Weapons Crate
; Made By The Unknown
; Features
; 7 types of crates.
; Type 1 = Weapons and Ammo West
; Type 2 = Ammo West
; Type 3 = Weapons West
; Type 4 = Weapons and Ammo East
; Type 5 = Ammo East
; Type 6 = Weapons East
; Type 7 = Other Universal
; How To use&#58;
; Place Crate put the Run Code in the Initline.
; Run Code&#58; &#91;This,#&#93; exec &#34;TU-WeaponAmmoDump.sqs&#34;
; # = Type Number

_Dump = _this select 0
_Type = _this select 1

ClearMagazineCargo _Dump
ClearWeaponCargo _Dump

?_Type == 1 &#58; goto &#34;Type 1&#34;
?_Type == 2 &#58; goto &#34;Type 2&#34;
?_Type == 3 &#58; goto &#34;Type 3&#34;
?_Type == 4 &#58; goto &#34;Type 4&#34;
?_Type == 5 &#58; goto &#34;Type 5&#34;
?_Type == 6 &#58; goto &#34;Type 6&#34;
?_Type == 7 &#58; goto &#34;Type 7&#34;

Exit

#Type 1

;Weapons
;AssaultRifles
_Dump AddWeaponCargo &#91;&#34;M16A2&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;M16A2GL&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;M4&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;M4GL&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;M4AIM&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;M4A1&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;M4A1GL&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;G36K&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;G36C&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;G36A&#34;,20&#93;
;SubMachinguns
_Dump AddWeaponCargo &#91;&#34;MP5A5&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;MP5SD&#34;,20&#93;
;Machineguns
_Dump AddWeaponCargo &#91;&#34;M249&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;M240&#34;,20&#93;
;SniperRifles
_Dump AddWeaponCargo &#91;&#34;M24&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;M4SPR&#34;,20&#93;
;Pistols
_Dump AddWeaponCargo &#91;&#34;M9&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;M9SD&#34;,20&#93;
;Rockets
_Dump AddWeaponCargo &#91;&#34;M136&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;JAVELIN&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;STINGER&#34;,20&#93;

;Ammo
;AssaultRifles
_Dump AddMagazineCargo &#91;&#34;30Rnd_556x45_Stanag&#34;,700&#93;
_Dump AddMagazineCargo &#91;&#34;30Rnd_556x45_G36&#34;,300&#93;
;GrenadeLauncher
_Dump AddMagazineCargo &#91;&#34;FlareWhite_M203&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;FlareGreen_M203&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;FlareRed_M203&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;FlareYellow_M203&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;1Rnd_HE_M203&#34;,100&#93;
;SubMachineguns
_Dump AddMagazineCargo &#91;&#34;30Rnd_9x19_MP5&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;30Rnd_9x19_MP5SD&#34;,100&#93;
;Machineguns
_Dump AddMagazineCargo &#91;&#34;200Rnd_556x45_M249&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;100Rnd_762x51_M240&#34;,100&#93;
;SniperRifles
_Dump AddMagazineCargo &#91;&#34;5Rnd_762x51_M24&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;20Rnd_556x45_Stanag&#34;,100&#93;
;Pistols
_Dump AddMagazineCargo &#91;&#34;15Rnd_9x19_M9&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;15Rnd_9x19_M9SD&#34;,100&#93;
;Rockets
_Dump AddMagazineCargo &#91;&#34;M136&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;JAVELIN&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;STINGER&#34;,100&#93;
Exit

#Type 2

;Ammo
;AssaultRifles
_Dump AddMagazineCargo &#91;&#34;30Rnd_556x45_Stanag&#34;,700&#93;
_Dump AddMagazineCargo &#91;&#34;30Rnd_556x45_G36&#34;,300&#93;
;GrenadeLauncher
_Dump AddMagazineCargo &#91;&#34;FlareWhite_M203&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;FlareGreen_M203&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;FlareRed_M203&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;FlareYellow_M203&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;1Rnd_HE_M203&#34;,100&#93;
;SubMachineguns
_Dump AddMagazineCargo &#91;&#34;30Rnd_9x19_MP5&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;30Rnd_9x19_MP5SD&#34;,100&#93;
;Machineguns
_Dump AddMagazineCargo &#91;&#34;200Rnd_556x45_M249&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;100Rnd_762x51_M240&#34;,100&#93;
;SniperRifles
_Dump AddMagazineCargo &#91;&#34;5Rnd_762x51_M24&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;20Rnd_556x45_Stanag&#34;,100&#93;
;Pistols
_Dump AddMagazineCargo &#91;&#34;15Rnd_9x19_M9&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;15Rnd_9x19_M9SD&#34;,100&#93;
;Rockets
_Dump AddMagazineCargo &#91;&#34;M136&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;JAVELIN&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;STINGER&#34;,100&#93;
Exit

#Type 3

;Weapons
;AssaultRifles
_Dump AddWeaponCargo &#91;&#34;M16A2&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;M16A2GL&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;M4&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;M4GL&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;M4AIM&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;M4A1&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;M4A1GL&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;G36K&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;G36C&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;G36A&#34;,20&#93;
;SubMachinguns
_Dump AddWeaponCargo &#91;&#34;MP5A5&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;MP5SD&#34;,20&#93;
;Machineguns
_Dump AddWeaponCargo &#91;&#34;M249&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;M240&#34;,20&#93;
;SniperRifles
_Dump AddWeaponCargo &#91;&#34;M24&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;M4SPR&#34;,20&#93;
;Pistols
_Dump AddWeaponCargo &#91;&#34;M9&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;M9SD&#34;,20&#93;
;Rockets
_Dump AddWeaponCargo &#91;&#34;M136&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;JAVELIN&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;STINGER&#34;,20&#93;
Exit

#Type 4

;Weapons
;AssaultRifles
_Dump AddWeaponCargo &#91;&#34;AK74&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;AK74GL&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;AKS74U&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;AKS74UN&#34;,20&#93;
;MachineGuns
_Dump AddWeaponCargo &#91;&#34;PK&#34;,20&#93;
;SniperRifles
_Dump AddWeaponCargo &#91;&#34;SVD&#34;,20&#93;
;Rockets
_Dump AddWeaponCargo &#91;&#34;RPG7V&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;STRELA&#34;,20&#93;

;Ammo
;AssaultRifles
_Dump AddMagazineCargo &#91;&#34;30Rnd_545x39_AK&#34;,300&#93;
_Dump AddMagazineCargo &#91;&#34;30Rnd_545x39_AKSD&#34;,100&#93;
;GrenadeLaunchers
_Dump AddMagazineCargo &#91;&#34;FlareWhite_GP25&#34;,50&#93;
_Dump AddMagazineCargo &#91;&#34;FlareGreen_GP25&#34;,50&#93;
_Dump AddMagazineCargo &#91;&#34;FlareRed_GP25&#34;,50&#93;
_Dump AddMagazineCargo &#91;&#34;FlareYellow_GP25&#34;,50&#93;
_Dump AddMagazineCargo &#91;&#34;1Rnd_HE_GP25&#34;,50&#93;
;MachineGuns
_Dump AddMagazineCargo &#91;&#34;100Rnd_762x54_PK&#34;,100&#93;
;SniperRifles
_Dump AddMagazineCargo &#91;&#34;10Rnd_762x54_SVD&#34;,100&#93;
;Rockets
_Dump AddMagazineCargo &#91;&#34;PG7V&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;PG7VR&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;STRELA&#34;,100&#93;
Exit

#Type 5

;Ammo
;AssaultRifles
_Dump AddMagazineCargo &#91;&#34;30Rnd_545x39_AK&#34;,300&#93;
_Dump AddMagazineCargo &#91;&#34;30Rnd_545x39_AKSD&#34;,100&#93;
;GrenadeLaunchers
_Dump AddMagazineCargo &#91;&#34;FlareWhite_GP25&#34;,50&#93;
_Dump AddMagazineCargo &#91;&#34;FlareGreen_GP25&#34;,50&#93;
_Dump AddMagazineCargo &#91;&#34;FlareRed_GP25&#34;,50&#93;
_Dump AddMagazineCargo &#91;&#34;FlareYellow_GP25&#34;,50&#93;
_Dump AddMagazineCargo &#91;&#34;1Rnd_HE_GP25&#34;,50&#93;
;MachineGuns
_Dump AddMagazineCargo &#91;&#34;100Rnd_762x54_PK&#34;,100&#93;
;SniperRifles
_Dump AddMagazineCargo &#91;&#34;10Rnd_762x54_SVD&#34;,100&#93;
;Rockets
_Dump AddMagazineCargo &#91;&#34;PG7V&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;PG7VR&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;STRELA&#34;,100&#93;
Exit

#Type 6

;Weapons
;AssaultRifles
_Dump AddWeaponCargo &#91;&#34;AK74&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;AK74GL&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;AKS74U&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;AKS74UN&#34;,20&#93;
;MachineGuns
_Dump AddWeaponCargo &#91;&#34;PK&#34;,20&#93;
;SniperRifles
_Dump AddWeaponCargo &#91;&#34;SVD&#34;,20&#93;
;Rockets
_Dump AddWeaponCargo &#91;&#34;RPG7V&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;STRELA&#34;,20&#93;
Exit

#Type 7

;Ammo
;Put
_Dump AddMagazineCargo &#91;&#34;PipeBomb&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;TimeBomb&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;Mine&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;MineE&#34;,100&#93;
;Trow
_Dump AddMagazineCargo &#91;&#34;SmokeShellRed&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;SmokeShellGreen&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;SmokeShell&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;HandGrenadeTimed&#34;,100&#93;
_Dump AddMagazineCargo &#91;&#34;HandGrenade&#34;,100&#93;

;Equipment
;Weapons
_Dump AddWeaponCargo &#91;&#34;Laserdesignator&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;NVGoggles&#34;,20&#93;
_Dump AddWeaponCargo &#91;&#34;Binocular&#34;,20&#93;
;Ammo
_Dump AddMagazineCargo &#91;&#34;Laserbatteries&#34;,100&#93;
Exit[/QUOTE]

If you use this it would be nice if you would give me some credit for the work I put into it.

The Unknown