magazinesAmmoFull: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Killzone Kid (talk | contribs) No edit summary |
||
(35 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{RV|type=command | ||
| arma3 |= | |game1= arma3 | ||
|version1= 0.76 | |||
| | |gr1= Unit Inventory | ||
| | |gr2= Vehicle Inventory | ||
|descr= Returns array of arrays of all unit's or vehicle's magazines with extended information about them. The magazines returned are for primary gunner. If you need magazines for all turrets, see [[magazinesAllTurrets]]. | |||
{{Feature | important | This command does not return empty magazines from containers, only from the weapon. Use [[magazinesAmmoCargo]] instead.}} | |||
|s1= [[magazinesAmmoFull]] entity | |||
|p1= entity: [[Object]] - unit or vehicle | |||
| [[ | |r1= [[Array]] of [[Array]]s in format: | ||
* [[String]]: magazine class name | |||
* [[Number]]: magazine ammo count | |||
* [[Boolean]]: is magazine loaded | |||
* [[Number]]: magazine type: | |||
** -1 = n/a (default if magazine is not loaded) | |||
** 0 - grenade | |||
** 1 - primary weapon mag | |||
** 2 - handgun mag | |||
** 4 - secondary weapon mag | |||
** 4096 - binocular weapon mag | |||
** 65536 - vehicle mag | |||
* [[String]]: magazine location: "Vest", "Uniform", "Backpack", "" or [[currentMuzzle]] if the magazine is loaded | |||
* [[Number]]: magazine id, starts with 10000000, use <tt>[[toFixed]] 0;</tt> to better see this number (Since Arma 3 v2.07.148196) | |||
* [[Number]]: magazine creator (Since Arma 3 v2.07.148196) | |||
| | |s2= [[magazinesAmmoFull]] [vehicle, includeEmpty] | ||
| [[ | |s2since= arma3 2.00 | ||
|p21= vehicle: [[Object]] - unit or vehicle | |||
|p22= includeEmpty: [[Boolean]] - (Optional, default [[false]]) [[true]] to include empty magazines | |||
|r2= same as [[#Syntax|Primary Syntax]] | |||
|x1=<code> | |x1= <code>[[toFixed]] 0; [[magazinesAmmoFull]] [[player]]; | ||
/* | {{codecomment|/* | ||
[ | [ | ||
["30Rnd_65x39_caseless_mag",30,false,-1,"Uniform"], | ["30Rnd_65x39_caseless_mag",30,false,-1,"Uniform",10000003,0], | ||
["30Rnd_65x39_caseless_mag",30,false,-1,"Vest"], | ["Chemlight_green",1,true,0,"ChemlightGreenMuzzle",10000016,0], | ||
[" | ["30Rnd_65x39_caseless_mag",30,false,-1,"Vest",10000008,0], | ||
[" | ["30Rnd_65x39_caseless_mag",30,false,-1,"Vest",10000009,0], | ||
[" | ["30Rnd_65x39_caseless_mag",30,false,-1,"Vest",10000010,0], | ||
["HandGrenade",1, | ["HandGrenade",1,true,0,"HandGrenadeMuzzle",10000018,0], | ||
["30Rnd_65x39_caseless_mag",30,true,1,"arifle_MX_ACO_pointer_F"], | ["HandGrenade",1,false,-1,"Vest",10000019,0], | ||
["16Rnd_9x21_Mag",16,true,2,"hgun_P07_F"] | ["30Rnd_65x39_caseless_mag",30,true,1,"arifle_MX_ACO_pointer_F",10000001,0], | ||
["16Rnd_9x21_Mag",16,true,2,"hgun_P07_F",10000011,0] | |||
] | ] | ||
<nowiki>*/ | <nowiki/>*/}}</code> | ||
|x2=<code> | |x2= <code>[[toFixed]] 0; [[magazinesAmmoFull]] Mi_48; | ||
/* | {{codecomment|/* | ||
[ | [ | ||
[" | ["250Rnd_30mm_HE_shells_Tracer_Green",250,true,65536,"HE",10000043,0], | ||
[" | ["250Rnd_30mm_APDS_shells_Tracer_Green",250,true,65536,"AP",10000044,0], | ||
[" | ["Laserbatteries",1,true,65536,"Laserdesignator_mounted",10000045,0], | ||
[" | ["PylonRack_4Rnd_LG_scalpel",4,false,-1,"",10000049,0], | ||
["PylonRack_19Rnd_Rocket_Skyfire",19,false,-1,"",10000051,0], | |||
["PylonRack_19Rnd_Rocket_Skyfire",19,false,-1,"",10000052,0], | |||
["PylonRack_4Rnd_LG_scalpel",4,false,-1,"",10000053,0] | |||
] | ] | ||
<nowiki>*/ | <nowiki/>*/}}</code> | ||
| | |seealso= [[magazinesAmmo]], [[magazinesAmmoCargo]], [[magazinesDetail]], [[magazines]], [[magazinesTurret]] | ||
}} | }} | ||
<dl class="command_description"> | |||
<dl class= | |||
< | <dt></dt> | ||
<dd class="notedate">Posted on December 20, 2014 - 14:40 (UTC)</dd> | <dd class="notedate">Posted on December 20, 2014 - 14:40 (UTC)</dd> | ||
<dt class="note">[[User:Actium|Actium]]</dt> | <dt class="note">[[User:Actium|Actium]]</dt> | ||
Line 79: | Line 82: | ||
--[[User:Actium|Actium]] ([[User talk:Actium|talk]]) 15:40, 20 December 2014 (CET) | --[[User:Actium|Actium]] ([[User talk:Actium|talk]]) 15:40, 20 December 2014 (CET) | ||
</dd> | </dd> | ||
< | <dt><dt> | ||
< | |||
<dd class="notedate">Posted on February 10, 2015 - 04:40 (UTC)</dd> | <dd class="notedate">Posted on February 10, 2015 - 04:40 (UTC)</dd> | ||
<dt class="note">[[User:Pierre MGI|Pierre MGI]]</dt> | <dt class="note">[[User:Pierre MGI|Pierre MGI]]</dt> | ||
Line 94: | Line 94: | ||
This is the case of WY-55 Hellcat. This function returns an empty array. | This is the case of WY-55 Hellcat. This function returns an empty array. | ||
</dd> | </dd> | ||
< | <dt><dt> | ||
< | <dd class="notedate">Posted on April 5, 2019 - 22:28 (UTC)</dd> | ||
<dd class="notedate">Posted on | <dt class="note">[[User:Yuval|Yuval]]</dt> | ||
<dt class="note">[[User: | <dd class="note"> | ||
<dd class="note"> | This command does not include magazines loaded into weapons stored inside player's backpack (or every other container). | ||
</dd> | </dd> | ||
</dl> | </dl> | ||
Revision as of 15:07, 14 September 2021
Description
- Description:
- Returns array of arrays of all unit's or vehicle's magazines with extended information about them. The magazines returned are for primary gunner. If you need magazines for all turrets, see magazinesAllTurrets.
- Groups:
- Unit InventoryVehicle Inventory
Syntax
- Syntax:
- magazinesAmmoFull entity
- Parameters:
- entity: Object - unit or vehicle
- Return Value:
- Array of Arrays in format:
- String: magazine class name
- Number: magazine ammo count
- Boolean: is magazine loaded
- Number: magazine type:
- -1 = n/a (default if magazine is not loaded)
- 0 - grenade
- 1 - primary weapon mag
- 2 - handgun mag
- 4 - secondary weapon mag
- 4096 - binocular weapon mag
- 65536 - vehicle mag
- String: magazine location: "Vest", "Uniform", "Backpack", "" or currentMuzzle if the magazine is loaded
- Number: magazine id, starts with 10000000, use toFixed 0; to better see this number (Since Arma 3 v2.07.148196)
- Number: magazine creator (Since Arma 3 v2.07.148196)
Alternative Syntax
- Syntax:
- magazinesAmmoFull [vehicle, includeEmpty]
- Parameters:
- vehicle: Object - unit or vehicle
- includeEmpty: Boolean - (Optional, default false) true to include empty magazines
- Return Value:
- same as Primary Syntax
Examples
- Example 1:
toFixed 0; magazinesAmmoFull player; /* [ ["30Rnd_65x39_caseless_mag",30,false,-1,"Uniform",10000003,0], ["Chemlight_green",1,true,0,"ChemlightGreenMuzzle",10000016,0], ["30Rnd_65x39_caseless_mag",30,false,-1,"Vest",10000008,0], ["30Rnd_65x39_caseless_mag",30,false,-1,"Vest",10000009,0], ["30Rnd_65x39_caseless_mag",30,false,-1,"Vest",10000010,0], ["HandGrenade",1,true,0,"HandGrenadeMuzzle",10000018,0], ["HandGrenade",1,false,-1,"Vest",10000019,0], ["30Rnd_65x39_caseless_mag",30,true,1,"arifle_MX_ACO_pointer_F",10000001,0], ["16Rnd_9x21_Mag",16,true,2,"hgun_P07_F",10000011,0] ] */
- Example 2:
toFixed 0; magazinesAmmoFull Mi_48; /* [ ["250Rnd_30mm_HE_shells_Tracer_Green",250,true,65536,"HE",10000043,0], ["250Rnd_30mm_APDS_shells_Tracer_Green",250,true,65536,"AP",10000044,0], ["Laserbatteries",1,true,65536,"Laserdesignator_mounted",10000045,0], ["PylonRack_4Rnd_LG_scalpel",4,false,-1,"",10000049,0], ["PylonRack_19Rnd_Rocket_Skyfire",19,false,-1,"",10000051,0], ["PylonRack_19Rnd_Rocket_Skyfire",19,false,-1,"",10000052,0], ["PylonRack_4Rnd_LG_scalpel",4,false,-1,"",10000053,0] ] */
Additional Information
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 December 20, 2014 - 14:40 (UTC)
- Actium
-
When used on vehicles this will only return all magazines associated with a single turretPath (which one depends on the actual armament of the vehicle, usually the first armed turretPath or alternatively turretPath [-1]).
If you want to get all turrets' magazines, use allTurrets and magazinesTurret. --Actium (talk) 15:40, 20 December 2014 (CET) - Posted on February 10, 2015 - 04:40 (UTC)
- Pierre MGI
- As Actium said, this function seems to extract data from: configfile >> "CfgVehicles" >> _the_vehicle_you_want >> "Turrets" >> "MainTurret">> "magazines". Some vehicles return an empty field {} because magazines are in straight in: configfile >> "CfgVehicles" >> _the_vehicle_you_want >> "magazines" (often dedicated to flares only). This is the case of WY-55 Hellcat. This function returns an empty array.
- Posted on April 5, 2019 - 22:28 (UTC)
- Yuval
- This command does not include magazines loaded into weapons stored inside player's backpack (or every other container).