Jump to content

Add virtual item to loadouts


Recommended Posts

I haven't tested it but I don't see why it shouldn't work.

 

In Config_Loadouts.hpp add vItems like this:

{"item",amount}

class CIV {
	uniform[] = {
      {"U_C_Poloshirt_blue", "!life_is_arrested"},
      {"U_C_Poloshirt_burgundy", "!life_is_arrested"},
      {"U_C_Poloshirt_stripped", "!life_is_arrested"},
      {"U_C_Poloshirt_tricolour", "!life_is_arrested"},
      {"U_C_Poloshirt_salmon", "!life_is_arrested"},
      {"U_C_Poloshirt_redwhite", "!life_is_arrested"},
      {"U_C_Commoner1_1", "!life_is_arrested"}
        };
    vest[] = {};
    backpack[] = {};
    weapon[] = {};
    mags[] = {};
    items[] = {};
    linkedItems[] = {
      {"ItemMap", ""},
      {"ItemCompass", ""},
      {"ItemWatch", ""}
    };
    vItems[] = {
   	 {"waterBottle",5}
    };
};

and in core\functions\fn_startLoadout.sqf add

private _vItems = M_CONFIG(getArray,"Loadouts",str(playerSide),"vItems");

if !(_vItems isEqualTo []) then {
	{
		[true,(_x select 0),(_x select 1)] call life_fnc_handleInv;
	} forEach _vItems;
};

It's not perfect as I just came up with it on the fly but hope it lays a foundation.

Edited by gustavseitztestarma3
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.