OlderRetro

Trying to add my traders

4 posts in this topic

Hello,

 

So I have managed to figure out how to add objects to my initserver.sqf.

 

I am puzzled with how to add my traders to the other sqf. I placed them where I want them I copied the script..and now what do I do? Do i place the script directly into the initplayerlocal.sqf and if so where. An example would be appreciated.

This is the script I copied from the editor.

 

Spoiler

 

Private_traders = [
    ["Exile_Trader_Hardware",[5028.63,8237.41,0.332928],103.961,"Exile_Trader_Hardware","GreekHead_A3_09"],
    ["Exile_Trader_Equipment",[5028.29,8228.31,0.655838],0,"Exile_Trader_Equipment","WhiteHead_16"],
    ["Exile_Trader_Armory",[5031.3,8232.38,0.64299],200.912,"Exile_Trader_Armory","GreekHead_A3_07"]
];
{
    private _trader = [
        _x select 0,
        _x select 4,
        ["HubStanding_idle1"],
        _x select 1,
        _x select 2
    ] call ExileClient_object_trader_create;
    _trader setVariable ["ExileTraderType", _x select 3];
} forEach _traders;

Private_traders = [
    ["Exile_Trader_Office",[4326.59,4773.96,0.00143886],190.565,"Exile_Trader_Office","GreekHead_A3_05"],
    ["Exile_Trader_Vehicle",[4296.6,4755.8,0.00143909],36.2705,"Exile_Trader_Vehicle","WhiteHead_11"],
    ["Exile_Trader_WasteDump",[4334.92,4744.77,0.0015986],300.982,"Exile_Trader_WasteDump","WhiteHead_16"],
    ["Exile_Trader_Food",[4311.65,4773.71,0.00143886],172.225,"Exile_Trader_Food","WhiteHead_09"],
    ["Exile_Trader_Equipment",[4315.42,4771.56,0.00143886],162.977,"Exile_Trader_Equipment","WhiteHead_01"],
    ["Exile_Trader_Armory",[4311.64,4765.52,0.00143886],0,"Exile_Trader_Armory","WhiteHead_09"]
];
{
    private _trader = [
        _x select 0,
        _x select 4,
        ["HubStanding_idle1"],
        _x select 1,
        _x select 2
    ] call ExileClient_object_trader_create;
    _trader setVariable ["ExileTraderType", _x select 3];
} forEach _traders;

private _traders = [
    ["Exile_Trader_Food",[9085.34,10097.8,0.293442],232.053,"Exile_Trader_Food","WhiteHead_11"],
    ["Exile_Trader_Armory",[9083.71,10105.7,0.317756],0,"Exile_Trader_Armory","WhiteHead_16"],
    ["Exile_Trader_Hardware",[9080.84,10105.2,0.00143862],0,"Exile_Trader_Hardware","WhiteHead_12"],
    ["Exile_Trader_Vehicle",[9067.79,10089.6,-0.00173473],0,"Exile_Trader_Vehicle","WhiteHead_18"]
];
{
    private _trader = [
        _x select 0,
        _x select 4,
        ["HubStanding_idle1"],
        _x select 1,
        _x select 2
    ] call ExileClient_object_trader_create;
    _trader setVariable ["ExileTraderType", _x select 3];
} forEach _traders;
 

 

Okay. I changed a few things around and made sure to get the code entered at the very top of the initlocalplayer.sqf I must have missed that piece of information, I am assuming if and when I want to add additional traders. I have to simply add the additional traders below this one?

Edited by OlderRetro

Share this post


Link to post
Share on other sites

I would highly advise you to add "//TraderNameArea" without the "" above each trader so you know which one is what etc...  

For example,

Quote

//TraderKotomoEquipment

{
    private _trader = [
        _x select 0,
        _x select 4,
        ["HubStanding_idle1"],
        _x select 1,
        _x select 2
    ] call ExileClient_object_trader_create;
    _trader setVariable ["ExileTraderType", _x select 3];
} forEach _traders;

Private_traders = [
    ["Exile_Trader_Office",[4326.59,4773.96,0.00143886],190.565,"Exile_Trader_Office","GreekHead_A3_05"],
    ["Exile_Trader_Vehicle",[4296.6,4755.8,0.00143909],36.2705,"Exile_Trader_Vehicle","WhiteHead_11"],
    ["Exile_Trader_WasteDump",[4334.92,4744.77,0.0015986],300.982,"Exile_Trader_WasteDump","WhiteHead_16"],
    ["Exile_Trader_Food",[4311.65,4773.71,0.00143886],172.225,"Exile_Trader_Food","WhiteHead_09"],
    ["Exile_Trader_Equipment",[4315.42,4771.56,0.00143886],162.977,"Exile_Trader_Equipment","WhiteHead_01"],
    ["Exile_Trader_Armory",[4311.64,4765.52,0.00143886],0,"Exile_Trader_Armory","WhiteHead_09"]
];

//TraderKotomoArmory
{
    private _trader = [
        _x select 0,
        _x select 4,
        ["HubStanding_idle1"],
        _x select 1,
        _x select 2
    ] call ExileClient_object_trader_create;
    _trader setVariable ["ExileTraderType", _x select 3];
} forEach _traders;

private _traders = [
    ["Exile_Trader_Food",[9085.34,10097.8,0.293442],232.053,"Exile_Trader_Food","WhiteHead_11"],
    ["Exile_Trader_Armory",[9083.71,10105.7,0.317756],0,"Exile_Trader_Armory","WhiteHead_16"],
    ["Exile_Trader_Hardware",[9080.84,10105.2,0.00143862],0,"Exile_Trader_Hardware","WhiteHead_12"],
    ["Exile_Trader_Vehicle",[9067.79,10089.6,-0.00173473],0,"Exile_Trader_Vehicle","WhiteHead_18"]
];

Also unsure if it's my monitor or not but the "];" should actually be "};" Same key just hold shift and press it to get the wiggley one instead of the block one. (Ignore my incompetence of the actual name)

 

To acatully add this to your map you will need to edit the mission.sqf i believe to place the actual trader in that location. I've not done it just yet but i'm sure someone will be along to help a bit more.

Share this post


Link to post
Share on other sites
Advertisement
10 minutes ago, James Trendall said:

I would highly advise you to add "//TraderNameArea" without the "" above each trader so you know which one is what etc...  

For example,

Also unsure if it's my monitor or not but the "];" should actually be "};" Same key just hold shift and press it to get the wiggley one instead of the block one. (Ignore my incompetence of the actual name)

 

To acatully add this to your map you will need to edit the mission.sqf i believe to place the actual trader in that location. I've not done it just yet but i'm sure someone will be along to help a bit more.

Thanks for replying, I am using the 3den plugin and it creates the information you need to add to each file, I will definitely add the trader location, thanks for the info. 

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   0 members

    No registered users viewing this page.