• 0
DavieReid88

Cup Weapon Attachment's

Question

Hi was wondering if someone could help me, ive got Cup weapons in my server but i cant get any scopes on any of my guns, can use ammo but everything else doesnt work, and doesnt show in the traders meni when i hit the compatible gun bit. i run CBA but im not sure what im doing wrong, at the moment its only gun and ammo i can use nothing else.

Share this post


Link to post
Share on other sites

11 answers to this question

  • 0

Save those files, put them in your mission PBO and then in your mission PBO there is a file called config.cpp, in there is a class called CfgExileCustomCode. In that close, after the example, paste the following:

ExileClient_util_gear_getCompatibleWeaponItems = "ExileClient_util_gear_getCompatibleWeaponItems.sqf";
ExileClient_util_item_getCompatibleWeaponItems = "ExileClient_util_item_getCompatibleWeaponItems.sqf";

So the whole thing looks like this:

class CfgExileCustomCode 
{
	/*
		You can overwrite every single file of our code without touching it.
		To do that, add the function name you want to overwrite plus the 
		path to your custom file here. If you wonder how this works, have a
		look at our bootstrap/fn_preInit.sqf function.

		Simply add the following scheme here:

		<Function Name of Exile> = "<New File Name>";

		Example:

		ExileClient_util_fusRoDah = "myaddon\myfunction.sqf";
	*/
	
	// CBA Compatible Gear
	ExileClient_util_gear_getCompatibleWeaponItems = "ExileClient_util_gear_getCompatibleWeaponItems.sqf";
	ExileClient_util_item_getCompatibleWeaponItems = "ExileClient_util_item_getCompatibleWeaponItems.sqf";
	
}; 

 

Edited by kuplion
  • Like 1

Share this post


Link to post
Share on other sites
  • 0

ExileClient_util_gear_getCompatibleWeaponItems.sqf :

/**
 * ExileClient_util_gear_getCompatibleWeaponItems
 *
 * Exile Mod
 * exile.majormittens.co.uk
 * © 2015 Exile Mod Teamm
 *
 * Modified by [FPS]kuplion
 *
 * 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");

{
	_getcompatibleItems = [_weaponClassName] 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 :

/**
 * ExileClient_util_item_getCompatibleWeaponItems
 *
 * Exile Mod
 * exile.majormittens.co.uk
 * © 2015 Exile Mod Team
 *
 * Modified by [FPS]kuplion
 *
 * 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");

{
	_getcompatibleItems = [_weaponClassName] 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

Override them as normal in Exile.MapName/config.cpp .

Edited by kuplion

Share this post


Link to post
Share on other sites
Advertisement
  • 0

@Crazy Mike I have CBA_A3 running well at least I think I do, it's in my -mod= and in the mission I've changed it to 1, is that all I have to do for that to be running right on the server or is here more to it ? 

@kuplion I'm not sure where to put that script, I'm at work at the moment I'll check that out when I'm home.

Share this post


Link to post
Share on other sites
  • 0

///////////////////////////////////////////////////////////////////////
    // Community Base Addons
    ///////////////////////////////////////////////////////////////////////
    class CBA 
    {
        // Set this to 1 if you want to have CBA support
        useStackedEH = 1;

        // If you set this to 1 ...........................................
        iReallyWantToGetHackedAndImRetarded = 0;
    };

Yes thats my server config

Share this post


Link to post
Share on other sites
  • 0
3 minutes ago, DavieReid88 said:

what about NIArms? got the same problem with the attachments for that too

Yup, this will work for ANY weapons as long as they're programmes correctly.

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   1 member