weaponsItems: Difference between revisions
Jump to navigation
Jump to search
AgentRev01 (talk | contribs) m (Corrected note date.) |
Killzone Kid (talk | contribs) (crate/holder support added) |
||
Line 7: | Line 7: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| Returns an array with subarrays contains class names and also names of connected items of all the vehicle's weapons. | | Returns an array with subarrays contains class names and also names of connected items of all the vehicle's weapons.</br> | ||
Since Arma 3 v1.21.124406 it is possible to query weapon holders and ammo crates with this command. |= Description | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Revision as of 22:47, 21 May 2014
Description
- Description:
- Returns an array with subarrays contains class names and also names of connected items of all the vehicle's weapons.
Since Arma 3 v1.21.124406 it is possible to query weapon holders and ammo crates with this command. - Groups:
- Uncategorised
Syntax
Examples
- Example 1:
hint str weaponsItems player;
[ [ //=PRIMARY= "arifle_MX_ACO_pointer_F", //weapon "muzzle_snds_H", //suppressor "acc_pointer_IR", //laser "optic_Aco", //optics [ //loaded magazine "30Rnd_65x39_caseless_mag", //mag type 30 //mag ammo count ] ], [ //=SECONDARY= "launch_NLAW_F", "", "", "", [ "NLAW_F", 1 ] ], [ //=HANDGUN= "hgun_P07_F", "muzzle_snds_L", "", "", [ "16Rnd_9x21_Mag", 11 ] ] ]
- Example 2:
hint str weaponsItems vehicle player;
[ [ "gatling_30mm", "", "", "", [ "250Rnd_30mm_HE_shells", 250 ] ], [ "missiles_SCALPEL", "", "", "", [ "8Rnd_LG_scalpel", 8 ] ], [ "rockets_Skyfire", "", "", "", [ "38Rnd_80mm_rockets", 38 ] ] ]
Additional Information
- See also:
- primaryWeaponItemssecondaryWeaponItemshandgunItemsaddPrimaryWeaponItemaddSecondaryWeaponItemaddHandgunItemprimaryWeaponsecondaryWeaponhandgunWeapon
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Notes
- Posted on August 17, 2013
- AgentRev
-
Be careful with this function. The weapons are listed in the order they were taken by the unit, with the most recent at the bottom of the array. Therefore, do not assume the first one is always the primary weapon, and so on.
Also, here's how the primary weapon looks if it has a grenade launcher with a loaded grenade:
[ "arifle_MX_GL_F", "muzzle_snds_H", "acc_pointer_IR", "optic_Aco", [ "30Rnd_65x39_caseless_mag", 30 ], [ "1Rnd_HE_Grenade_shell", 1 ] ]