Crunch™

[SOLVED] Custom Vehicle Trader

15 posts in this topic

I am updating our testserver and most is working now, but since we have used the boat trader as our custom vehicle trader I want to revert this and create a true custom vehicle trader. But I cannot find out how to do this, custom trader is no problem, but then it show the vehicles as items. Who can help me out?

Share this post


Link to post
Share on other sites

First, in your mission config.cpp create a new trader in class cfgTraders that has the categories you want that trader to have, then create a vehicle trader in the initPlayerLocal and setVariable on it the name of the class from the mission config.

config.cpp:
class Exile_Trader_MyCustomTrader
 {
        name = "My Custom Trader";
        showWeaponFilter = 0;
        categories[] = 
        {
            "Cars"
        };
 };

initPlayerLocal.sqf:
  _trader setVariable ["ExileTraderType", "Exile_Trader_MyCustomTrader"];

I hope that helps.

<3 Vish

1 person likes this

Share this post


Link to post
Share on other sites
Advertisement

For me the Vehicles appear as items in the list, this what I use.

config.cpp:

    class Exile_Trader_CommunityCustoms4
    {
        name = "BlackMarket";
        showWeaponFilter = 0;
        categories[] = 
        {
            "Community3"
        };
    };

InitPlayerLocal.sqf:

_trader = [
        "Exile_Trader_CommunityCustoms4",
        "AfricanHead_02",
        ["HubBriefing_scratch", "HubBriefing_stretch", "HubBriefing_think", "HubBriefing_lookAround1", "HubBriefing_lookAround2"],
        [12059.5,12641.8,0.0571289]
        ,48
        ]    
call ExileClient_object_trader_create;
_trader setVariable ["ExileTraderType", "Exile_Trader_CommunityCustoms4"];

Category in config.cpp:

    class Community3
    {
        name = "BMVehicles";
        icon = "a3\ui_f\data\gui\Rsc\RscDisplayArsenal\itemacc_ca.paa";
        items[] = 
        {
            "Exile_Car_Offroad_Armed_Guerilla01",
            "CUP_I_SUV_Armored_ION",
            "CUP_B_BRDM2_HQ_CDF",
            "CUP_O_BTR90_HQ_RU",
            "CUP_B_HMMWV_M2_USMC",
            "CUP_B_HMMWV_M1114_USMC",
            "CUP_B_HMMWV_SOV_USA",
            "CUP_B_Jackal2_GMG_GB_W",
            "CUP_B_LR_MG_GB_W",
            "CUP_B_LR_Special_CZ_W",
            "CUP_B_UAZ_AGS30_CDF",
            "CUP_B_UAZ_MG_CDF",
            "CUP_I_UH1H_TK_GUE",
            "CUP_O_Mi8_CHDKZ",
            "CUP_B_UH60M_US",
            "CUP_B_UH60L_FFV_US",
            "B_Heli_Transport_01_F",
            "B_Heli_Transport_01_camo_F",
            "B_Heli_Transport_03_F"
        };
    };

Like I said, it is showing the trader + the list. It only appears as items not vehicles.

2016-03-07_00001.thumb.jpg.1eeb6f17ac773

Share this post


Link to post
Share on other sites

Does someone actually got it to work? I cant find the clothing settings they are talking about in the Changelog

Share this post


Link to post
Share on other sites

It's 4am so may be crazy, but try changing this just this part:

_trader = [
        "Exile_Trader_Vehicle",

Share this post


Link to post
Share on other sites

Already tried that, spawns the normal vehicle trader, it seems to ignore the:

_trader setVariable ["ExileTraderType", "Exile_Trader_CommunityCustoms4"];

When scrolling I should get the purchase option instead of trade, where is that defined? I am using my boat trader so at least I can update my Live server, but I was hoping to use a custom vehicle trader now.

Share this post


Link to post
Share on other sites
8 hours ago, gmctyphoon92 said:

Works like a charm

Did you try to buy anything? It is showing as items for me, could you paste the code you used?

Share this post


Link to post
Share on other sites
1 hour ago, Vishpala said:

It's 4am so may be crazy, but try changing this just this part:

_trader = [
        "Exile_Trader_Vehicle",

I now tried this:

_trader = [
        "Exile_Trader_Vehicle",
        "AfricanHead_02",
        ["HubBriefing_scratch", "HubBriefing_stretch", "HubBriefing_think", "HubBriefing_lookAround1", "HubBriefing_lookAround2"],
        [12059.5,12641.8,0.0571289],48]    
call ExileClient_object_trader_create;
_trader setVariable ["ExileTraderType", "Exile_BlackMarket_Vehicle"];

And it partially works, first it is showing the original vehicle traders, But when I select the Category is shows the vehicles that it is supposed to show!

Share this post


Link to post
Share on other sites

By "

2 hours ago, Crunch™ said:

And it partially works, first it is showing the original vehicle traders,

Do you mean the trader physically looks like the regular vehicle trader? If so, that is easy to fix.

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.