weaponsItems: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) No edit summary |
Killzone Kid (talk | contribs) No edit summary |
||
Line 20: | Line 20: | ||
|p1= vehicle: [[Object]] - unit or vehicle | |p1= vehicle: [[Object]] - unit or vehicle | ||
|r1= [[Array]] of [[Array]]s of weapon items, format [weapon, muzzle, flashlight, optics, | |r1= [[Array]] of [[Array]]s of weapon items, format [weapon, muzzle, flashlight, optics, muzzleMagazine, muzzleMagazine, bipod]: | ||
* weapon: [[String]] | * weapon: [[String]] | ||
* muzzle: [[String]] | * muzzle: [[String]] |
Revision as of 19:11, 20 July 2023
Description
- Description:
- Returns an array with subarrays contains class names and also names of connected items of all the vehicle's weapons.
- 1.22 it is possible to query weapon holders and ammo crates with this command.
If the argument is a vehicle, the command will return vehicle's weapons.
If the argument is a container, the command will act identical to weaponsItemsCargo. - 1.96 the returned array always contains secondary muzzle magazine info and consistent with getUnitLoadout format for weapon items.
- 2.02 the returned array can contains binocular weapon items.
- 1.22 it is possible to query weapon holders and ammo crates with this command.
- Groups:
- Unit InventoryVehicle Inventory
Syntax
- Syntax:
- weaponsItems vehicle
- Parameters:
- vehicle: Object - unit or vehicle
- Return Value:
- Array of Arrays of weapon items, format [weapon, muzzle, flashlight, optics, muzzleMagazine, muzzleMagazine, bipod]:
- weapon: String
- muzzle: String
- flashlight: String
- optics: String
- muzzleMagazine: Often primary muzzle magazine, unless primary muzzle is empty then it will be secondary muzzle magazine - Array format [magazineName, ammoCount] or empty array if no magazine:
- muzzleMagazine: Normally secondary muzzle magazine unless primary muzzle is empty - Array format [magazineName, ammoCount] or empty array if no magazine:
- bipod: String
Examples
- Example 1:
- hint str weaponsItems player; // returns e.g /* [ ["arifle_MX_ACO_pointer_F", "muzzle_snds_H", "acc_pointer_IR", "optic_Aco", ["30Rnd_65x39_caseless_mag", 30], [], "bipod_01_F_blk"], ["launch_NLAW_F", "", "", "", ["NLAW_F", 1], [], ""], ["hgun_P07_F", "muzzle_snds_L", "", "", ["16Rnd_9x21_Mag", 11], [], ""] ] // a loaded underbarrel grenade launcher can look like this: [ ["arifle_MX_GL_F", "muzzle_snds_H", "acc_pointer_IR", "optic_Aco", ["30Rnd_65x39_caseless_mag", 30], ["1Rnd_HE_Grenade_shell", 1], ""] ] */
- Example 2:
Additional Information
- See also:
- weaponsItemsCargo primaryWeaponItems secondaryWeaponItems handgunItems addPrimaryWeaponItem addSecondaryWeaponItem addHandgunItem primaryWeapon secondaryWeapon handgunWeapon binocular weaponAccessories addWeaponWithAttachmentsCargoGlobal BIS_fnc_weaponComponents weaponState
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