magazinesDetail command does not return anything (empty array) if i'm inside a vehicle (tested on kajman attack helicopter east side).
if I use it on a soldier it returns something like this:
["6.5mm 30Rnd Caseless Mag(30/30)[id:10924]","6.5mm 30Rnd Caseless Mag(30/30)[id:10925]","6.5mm 30Rnd Caseless Mag(30/30)[id:10926]","Smoke Grenade (Red)(1/1)[id:10927]","Smoke Grenade (Purple)(1/1)[id:10928]","Chemlight (Red)(1/1)[id:10929]","Chemlight (Red)(1/1)[id:10930]"]
This command is interesting for me because I can use it to manage magazines in vehicles. This is my use case:
I make players pay with a points based system for dangerous magazines like AT missiles/rockets in attack helicopters and the rest of the magazines is free to take anytime (cannon, countermeasures).
When players want to rearm their vehicle with "non-dangerous" magazines I use the "vehicle setvehicleammodef 1" command that completely rearms a vehicle including what I call "dangerous magazines". Then I remove the dangerous magazines from the vehicle.
This way of doing is problematic at the moment because if the players want to rearm their vehicle only with the non-dangerous magazines they will lose any dangerous magazines they havent used yet.
But if I have a command that tells me what are the current magazines in the vehicle with the number of rounds in each of it then I can do:
- store the dangerous magazines state with the "magazinesDetail" command
- use "vehicle setvehicleammodef 1"
- remove dangerous magazines (added by the previous command)
- restore the dangerous magazines state that was stored in first step
So the magazinesDetail command should also work for vehicles but also return the data in a more easily exploitable format:
- this is what it does at the moment
["6.5mm 30Rnd Caseless Mag(30/30)[id:10924]","6.5mm 30Rnd Caseless Mag(30/30)[id:10925]","6.5mm 30Rnd Caseless Mag(30/30)[id:10926]","Smoke Grenade (Red)(1/1)[id:10927]","Smoke Grenade (Purple)(1/1)[id:10928]","Chemlight (Red)(1/1)[id:10929]","Chemlight (Red)(1/1)[id:10930]"]
- this is what would be more easy to use
[["30Rnd_65x39_caseless_mag", 30, 30, 10924], ["30Rnd_65x39_caseless_mag", 30, 30, 10925], ... ]