addWeaponWithAttachmentsCargoGlobal: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "{{Command " to "{{RV|type=command ") |
Lou Montana (talk | contribs) m (Text replacement - " " to " ") |
||
Line 56: | Line 56: | ||
This command also allows you to add a weapon with attachments directly to the players backpack. | This command also allows you to add a weapon with attachments directly to the players backpack. | ||
<code>(backpackContainer player) addWeaponWithAttachmentsCargoGlobal [ ["arifle_MX_F","muzzle_snds_H","acc_pointer_IR","optic_Hamr",["30Rnd_65x39_caseless_mag",30],[],"bipod_03_F_blk"], 1];</code> | <code>(backpackContainer player) addWeaponWithAttachmentsCargoGlobal [ ["arifle_MX_F","muzzle_snds_H","acc_pointer_IR","optic_Hamr",["30Rnd_65x39_caseless_mag",30],[],"bipod_03_F_blk"], 1];</code> | ||
Revision as of 20:57, 31 January 2021
Description
- Description:
- Description needed
- Groups:
- Vehicle Inventory
Syntax
- Syntax:
- Syntax needed
- Parameters:
- container: Object - Container to add the weapon to, might be backpack, ammobox or vehicle
- [[weapon, muzzle, flashlight, optics, [primaryMuzzleMagazine, ammoCount], [secondaryMuzzleMagazine, ammoCount], bipod], weaponsCount]: Array
- [weapon, muzzle, flashlight, optics, [primaryMuzzleMagazine, ammoCount], [secondaryMuzzleMagazine, ammoCount], bipod]: Array in format weaponsItems
- weapon: String - Weapon class name. See the topic Category:Weapons for reference about possible values
- muzzle: String - Muzzle attachment class name or "" if not needed
- flashlight: String - Side rail attachment class name or "" if not needed
- optics: String - Top rail attachment class name or "" if not needed
- [primaryMuzzleMagazine, ammoCount]: Array - Primary muzzle magazine info or [] if not needed
- primaryMuzzleMagazine: String - Magazine class name
- ammoCount: Number - Ammo count in magazine (will be clipped in 0 and max mag capacity range)
- [secondaryMuzzleMagazine, ammoCount]: Array - Secondary muzzle magazine info or [] if not needed
- secondaryMuzzleMagazine: String - Magazine class name
- ammoCount: Number - Ammo count in magazine (will be clipped in 0 and max mag capacity range)
- bipod: String - Underbarrel rail attachment class name or "" if not needed
- weaponsCount: Number - Number of weapons to add
- Return Value:
- Return value needed
Examples
- Example 1:
cursorObject addWeaponWithAttachmentsCargoGlobal [["arifle_MX_GL_F", "muzzle_snds_H", "", "optic_aco", ["30Rnd_65x39_caseless_mag", 15], ["3Rnd_HE_Grenade_shell", 2], ""], 2];
- Example 2:
- Add five MX GL rifles with flashlight side attachment and a full 30 round magazine loaded into the gun, and full 3Rnd HE grenade magazine loaded into the grenade launcher:
cursorObject addWeaponWithAttachmentsCargoGlobal [["arifle_MX_GL_F", "", "acc_flashlight", "", ["30Rnd_65x39_caseless_mag", 30], ["3Rnd_HE_Grenade_shell", 2], ""], 5]
- Example 3:
- Add one MX rifle without any attachments or magazines event though the class has linked items:
cursorObject addWeaponWithAttachmentsCargoGlobal [["arifle_MX_Holo_pointer_F", "", "", "", [], [], ""], 1];
- Example 4:
- Add all weapons on player with attachments:
{ cursorObject addWeaponWithAttachmentsCargoGlobal [_x, 1] } forEach weaponsItems player;
Additional Information
- See also:
- See also needed
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
- Posted on October 28, 2020 - 20:57 (UTC)
- Andrew_S90
-
This command also allows you to add a weapon with attachments directly to the players backpack.
(backpackContainer player) addWeaponWithAttachmentsCargoGlobal [ ["arifle_MX_F","muzzle_snds_H","acc_pointer_IR","optic_Hamr",["30Rnd_65x39_caseless_mag",30],[],"bipod_03_F_blk"], 1];