Jump to content
Sign in to follow this  
galzohar

Getting a list of ALL equipment

Recommended Posts

I'm trying to make a script that checks whether you still have the original gear you have spawned with, including all magazines, weapons, and anything else that might be relevant.

So far I have a big problem with the magazines, as the magazines command doesn't return the magazine that is already loaded into the weapon.

Of course I haven't even started working on testing for vest/cloths/helmet/attachments...

Share this post


Link to post
Share on other sites

Well for that there's currentMagazine command.

And for all items I think

_mags = (vestitems player + uniformitems player + backpackitems player);

Should return most of it. Maybe not assignedItems, not sure.

Share this post


Link to post
Share on other sites

Well, currentMagazine only returns one magazine, and there can be multiple magazines loaded into multiple weapons/muzzles, so that won't cut it. Even a single missing magazine will make the whole script not do what it's designed for.

As for weapons, it seems like they have a different class name for every attachment combination, which means I probably only need to check the weapon class name rather than the attachment class names and compare that with the original weapon class name. However, I have no idea what each suffix in the class name means (in terms of attachments). I remember seeing a post on armaholic that explained the meaning of the suffixes, but now I can't find it.

Share this post


Link to post
Share on other sites

_mags = (vestitems player + uniformitems player + backpackitems player);

For the sake of magazines, that seems to be the same as just:

_mags = magazines player;

Or is there a difference? Other than potentially including non-magazine equipment stored in vest/uniform/backpack, but my problem is checking that there is no gear missing. I don't really mind if the list I get has some extra non-magazine items. I just really need to get a list of all magazines the player has to be able to check if he has what he started out with (as I only allow kit change if you are still carrying the full kit, so that kit limitations have a meaning).

If this really is impossible, it might justify a ticket on the tracker... But is it?

Share this post


Link to post
Share on other sites

Well I'm not sure, rifle ammo might work.

I had some issues using (magazines player), it didn't return stuff like launcher ammo, grenades and maybe something more.

Share this post


Link to post
Share on other sites

It seems to return grenades just fine. Only magazines loaded into weapons (and items that don't count as magazines, such as FAKs or NVGs) are not returned.

Share this post


Link to post
Share on other sites

This seems to contain everything

headgear="H_HelmetB"
goggles="G_Tactical_Clear"
assignedItems="["ItemMap","ItemCompass","ItemWatch","ItemRadio","G_Tactical_Clear","NVGoggles","H_HelmetB","Binocular"]"
uniform="U_B_CombatUniform_mcam"
uniformItems="["FirstAidKit"]"
vest="V_PlateCarrier1_rgr"
vestItems="["30Rnd_65x39_caseless_mag"]"
backpack=""
backpackItems="[]"
weapons="["Binocular","arifle_MX_Hamr_point_grip_F"]"
magazines="["30Rnd_65x39_caseless_mag"]"
primaryWeaponItems="["","acc_pointer_IR","optic_Hamr"]"
secondaryWeaponItems="[]"
handgunItems="[]"

You can combine them or whatever, I guess. (x)weaponItems return attachments, assigneditems seem to include headgear and goggles and various things.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×