kuplion

[Release] Fix ASDG JR / CBA Attachment Compatibility at Traders

26 posts in this topic

5 minutes ago, kuplion said:

Try it with the trader set to all items instead of "Military Assault Rifles"?

It works , So i guess u have to select all In order for it to work. Maby becasue of custom traders?  I use community custom2  for our armory trader , And i use the Default exile one for the safe zone guy to sell lower end stuff.

http://images.akamai.steamusercontent.com/ugc/245836995517724449/4EE52A12EEF3AEBE0E25558789EFC78568932B44/

Edited by DIamond

Share this post


Link to post
Share on other sites
Advertisement
1 minute ago, DIamond said:

It works , So i guess u have to select all In order for it to work. Maby becasue of custom traders? 

http://images.akamai.steamusercontent.com/ugc/245836995517724449/4EE52A12EEF3AEBE0E25558789EFC78568932B44/

Possibly. I found it works first time with a weapon you already had on your person, but you have to exit the trader screen and go back in for a weapon you just bought (I can see in your first screenshot that you'd just purchased that rifle).

  • Like 1

Share this post


Link to post
Share on other sites

I use it a long time ago, and work fine for me.
 

ExileClient_util_gear_getCompatibleWeaponItems.sqf

Spoiler

/**
 * Exile Mod
 * www.exilemod.com
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */

private["_weaponClassName","_weaponConfig","_compatibleItems","_getcompatibleItems"];
_weaponClassName = _this;
_weaponConfig = configFile >> "CfgWeapons" >> _weaponClassName;
_compatibleItems = getArray (_weaponConfig >> "magazines");
/*
{
	if (isClass (_weaponConfig >> "WeaponSlotsInfo" >> _x)) then
	{
		_compatibleItems append getArray (_weaponConfig >> "WeaponSlotsInfo" >> _x >> "compatibleItems");
	};
}
forEach ["CowsSlot", "PointerSlot", "MuzzleSlot", "UnderBarrelSlot"];
*/

{
	_getcompatibleItems = [_weaponClassName, _x] call CBA_fnc_compatibleItems;
	_compatibleItems append _getcompatibleItems;

}forEach [101,201,301,302];

{
	if !(_x isEqualTo "this") then
	{
		_compatibleItems append getArray (_weaponConfig >> _x >> "magazines");
	};
}
forEach getArray (_weaponConfig >> "muzzles");
{
	_compatibleItems set [_forEachIndex, toLower _x];
}
forEach _compatibleItems;
_compatibleItems

 

 

ExileClient_util_item_getCompatibleWeaponItems.sqf

Spoiler

/**
 * Exile Mod
 * www.exilemod.com
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */

private["_weaponClassName","_weaponConfig","_compatibleItems","_getcompatibleItems"];
_weaponClassName = _this;
_weaponConfig = configFile >> "CfgWeapons" >> _weaponClassName;
_compatibleItems = getArray (_weaponConfig >> "magazines");
/*
{
	if (isClass (_weaponConfig >> "WeaponSlotsInfo" >> _x)) then
	{
		_compatibleItems append getArray (_weaponConfig >> "WeaponSlotsInfo" >> _x >> "compatibleItems");
	};
}
forEach ["CowsSlot", "PointerSlot", "MuzzleSlot", "UnderBarrelSlot"];
*/

{
	_getcompatibleItems = [_weaponClassName, _x] call CBA_fnc_compatibleItems;
	_compatibleItems append _getcompatibleItems;

}forEach [101,201,301,302];

{
	if !(_x isEqualTo "this") then
	{
		_compatibleItems append getArray (_weaponConfig >> _x >> "magazines");
	};
}
forEach getArray (_weaponConfig >> "muzzles");
_compatibleItems

 

And I got here:

 

Edited by marcelotk
  • Like 1

Share this post


Link to post
Share on other sites
6 minutes ago, kuplion said:

Possibly. I found it works first time with a weapon you already had on your person, but you have to exit the trader screen and go back in for a weapon you just bought (I can see in your first screenshot that you'd just purchased that rifle).

Yea i tried that next that works too. Thanks for the over Writes, and help boss =) 

Share this post


Link to post
Share on other sites
1 minute ago, DIamond said:

Yea i tried that next that works too. Thanks for the over Writes, and help boss =) 

Is it working with CUP Weapons now too?

  • Like 1

Share this post


Link to post
Share on other sites
Advertisement
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.