Jump to navigation Jump to search
- Adds a weapon into the cargo space of a vehicle / box with given attachments / magazines. Ignores available cargo space. If the weapon class has any pre-attached items (LinkedItems), they are removed and new items, supplied via command arguments, are added.
- Vehicle Inventory
- container addWeaponWithAttachmentsCargoGlobal [weaponConfiguration, weaponsCount]
- container: Object - Container to add the weapon to. Might be a backpack, ammobox or vehicle.
- weaponConfiguration: Array in format [weapon, muzzle, flashlight, optics, primaryMuzzle, secondaryMuzzle, bipod]
- weapon: String - Weapon class name from CfgWeapons
- muzzle: String - Muzzle attachment class name. Use "" if not needed.
- flashlight: String - Side rail attachment class name. Use "" if not needed.
- optics: String - Top rail attachment class name. Use "" if not needed.
- primaryMuzzle: Array in format [primaryMuzzleMagazine, primaryAmmoCount] - Use  if not needed
- secondaryMuzzle: Array in format [secondaryMuzzleMagazine, secondaryAmmoCount] - Use  if not needed
- bipod: String - Underbarrel rail attachment class name. Use "" if not needed.
- weaponsCount: Number - Number of weapons to add
- Return Value:
- Example 1:
- Example 2:
- Add five MX GL rifles, each with flashlight side attachment, a full 30 rounds magazine loaded into the gun and a full 3Rnd HE grenade magazine loaded into the grenade launcher:
- Example 3:
- Add one MX rifle without any attachments or magazines event though the class has linked items:
- Example 4:
- Add all weapons on player with attachments:
- See also:
- addWeaponWithAttachmentsCargo weaponsItems addWeaponCargo addWeaponCargoGlobal clearWeaponCargo getWeaponCargo
- Posted on Oct 28, 2020 - 20:57 (UTC)
- This command also allows you to add a weapon with attachments directly to the players backpack.