Sign in to follow this  
Followers 0
DavieReid88

Custom Vehicle Trader Problem

4 posts in this topic

Hello guys in the middle of making a black market traders for one of my servers, I thought everything was finished until i realised this when i go to the aircraft or vehicle black market (customtraders) men

Spoiler

20170213224935_1.jpg20170213224920_1.jpg

Now usually when your at they sort of traders you get the black screen and the vehicle you have clicked on spinning around in preview, This is 2 of the scripts i put together

Black Market Helicopters:

Spoiler

class BlackMarketHelis
    {
        name = "Black Market Helicopters";
        icon = "a3\ui_f\data\gui\Rsc\RscDisplayArsenal\itemacc_ca.paa";
        items[] = 
        {
            "Exile_Chopper_Hellcat_Green",
            "Exile_Chopper_Orca_BlackCustom",
            "Exile_Chopper_Mohawk_FIA",
            "Exile_Chopper_Huey_Green",
            "Exile_Chopper_Huey_Armed_Green",
            "CUP_B_CH53E_USMC",
            "CUP_B_UH1Y_UNA_F",
            "CUP_C_Mi17_Civilian_RU",
            "CUP_O_Mi17_TK",
            "CUP_B_Mi171Sh_Unarmed_ACR",
            "CUP_O_Mi8_medevac_CHDKZ",
            "CUP_Merlin_HC3",
            "CUP_B_MH60S_USMC",
            "CUP_B_AW159_Unarmed_BAF",
            "CUP_B_CH47F_GB",
            "CUP_B_UH60M_FFV_US",
            "CUP_B_UH60M_Unarmed_US",
            "CUP_B_AH1Z_NoWeapons"
        };
    };

Normal Military Helicopters

Spoiler

class Helicopter
    {
        name = "Helicopters";
        icon = "a3\ui_f\data\gui\Rsc\RscDisplayArsenal\itemacc_ca.paa";
        items[] = 
        {
            "Exile_Chopper_Hummingbird_Green",
            "Exile_Chopper_Hummingbird_Civillian_Wasp",
            "Exile_Chopper_Taru_Black",
            "Exile_Chopper_Taru_Covered_Black",
            "Exile_Chopper_Taru_Transport_Black",
            "Exile_Chopper_Huron_Black"
        };
    };

I just cant get the custom traders (aircraft + vehcile) to show as a vehicle trader (black screen with vehicle preview), Its like its trying to sell items as in guns or food, Is there somethong wrong in what im doing? or in editor is there a custom vehicle trader i should be using? Any help would be appreciated.

EDIT: I should really look more before opening a new post lol. Come across this post which sorted my issue, in case anyone else has this problem and comes to this post first here the link to the fix, This post can now be closed.

 

Edited by DavieReid88
1 person likes this

Share this post


Link to post
Share on other sites

@DavieReid88 Hehe, i have an override for it, let me see if can find it...

here it is: anything with the name "BlackMarket" will be a vehicle trader 

can be modified by changing: 

if ((_traderType find "BlackMarket") != -1) exitWith 

the override:

/**
 * ExileClient_gui_traderDialog_show
 *
 * 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["_dialog","_traderName","_primaryWeaponCheckbox","_handgunCheckbox","_storeDropdown","_storeDropdownSize","_quantityDropdown","_purchaseButton","_sellButton"];
disableSerialization;
private _traderType = _this getVariable "ExileTraderType";

if ((_traderType find "BlackMarket") != -1) exitWith 
{
	_this call ExileClient_gui_vehicleTraderDialog_show;
};

ExileClientCurrentTrader = +_traderType;

createDialog "RscExileTraderDialog";
waitUntil { !isNull findDisplay 24007 };
_dialog = uiNameSpace getVariable ["RscExileTraderDialog", displayNull];
uiNameSpace setVariable ["RscExileTraderDialogIsInitialized", false];
_traderName = _dialog displayCtrl 4001;
_traderName ctrlSetText getText(missionConfigFile >> "CfgTraders" >> ExileClientCurrentTrader >> "name");
ctrlSetFocus _traderName;
_primaryWeaponCheckbox = _dialog displayCtrl 4044;
_handgunCheckbox = _dialog displayCtrl 4045;
_storeDropdown = _dialog displayCtrl 4008;
_storeDropdownSize = ctrlPosition _storeDropdown; 
if (getNumber (missionConfigFile >> "CfgTraders" >> ExileClientCurrentTrader >> "showWeaponFilter") isEqualTo 1) then
{
	_primaryWeaponCheckbox ctrlShow true;
	_handgunCheckbox ctrlShow true;
	_storeDropdownSize set [2, 13.2 * (0.025)];
}
else 
{
	_primaryWeaponCheckbox ctrlShow false;
	_handgunCheckbox ctrlShow false;
	_storeDropdownSize set [2, 16.5 * (0.025)];
};
_storeDropdown ctrlSetPosition _storeDropdownSize;
_storeDropdown ctrlCommit 0;
_quantityDropdown = _dialog displayCtrl 4011;
lbClear _quantityDropdown;
_quantityDropdown lbAdd "1x";
_quantityDropdown lbSetCurSel 0;
_quantityDropdown ctrlEnable false;
_purchaseButton = _dialog displayCtrl 4010;
_purchaseButton ctrlEnable false;
_sellButton = _dialog displayCtrl 4007;
_sellButton ctrlEnable false;
true call ExileClient_gui_postProcessing_toggleDialogBackgroundBlur;
call ExileClient_gui_traderDialog_updatePlayerControls;
call ExileClient_gui_traderDialog_updateInventoryDropdown;
call ExileClient_gui_traderDialog_updateInventoryListBox;
call ExileClient_gui_traderDialog_updateStoreDropdown;
call ExileClient_gui_traderDialog_updateStoreListBox;
"" call ExileClient_gui_traderDialog_updateItemStats;
uiNameSpace setVariable ["RscExileTraderDialogIsInitialized", true];
true

NOTE: this override is just another way of doing it, but it's better to do the way he mentioned in the OP, i made this override, way before that post was even a thing, when i was a bambi, and before that way of doing traders was even a thing, when i did it, i didn't look much into it, i just quickly whipped something up, and the override is what it was.

Edited by StokesMagee

Share this post


Link to post
Share on other sites
Advertisement

@StokesMagee "I just quickly whipped something up" its mad how you guys manage all this coding and so on so easily, I wish one day I'll have the knowledge the likes of yourself and others in this forum have in coding..... probably NOT though lol, thanks for your quick response 

Share this post


Link to post
Share on other sites

Hey guys I have just started trying to do this and I am really confused how to setup a "Black Market trader" could someone walk me through  it PLEASE!!!

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
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.