server steve21k Posted August 28, 2016 Report Share Posted August 28, 2016 Looking for some advice Trying to add traders to my server, following this video but no traders are showing. https://www.youtube.com/watch?v=2HiFbHpJUqI Thanks in advance Link to comment Share on other sites More sharing options...
0 juandayz Posted August 28, 2016 Report Share Posted August 28, 2016 @server steve21kAre you talking about only AI traders or whole traders cities? with buildings and traders? ok see: thers 2 ways. 1- add traders by server side using mission.sqf (whers original traders are located) 2-add traders by client side. If u never add traders then pick more easy and clear option: add traders using a new sqf separated of the originals traders. ------------------------------- Well for example if u want to add only 1 trader AI in Stary then: 1.Open your game and in main menu press ALT+E this gonna open arma2oa editor 3d. 2-Create a Civilian Center/Create a group for this civilian center/ create a unit. 3-This unit must be diferent for the others AI traders. if ure not sure about Traders Ids used for the game open your server_traders.sqf or server_traders_cherno11.sqf and see this section: serverTraders =["name of all AI used for traders"]; then pick another diferent in your editor. /*******For example you can use "ValentinaVictim" this is not used by any other trader.**************/ 4-Choose a location for your AI and save the mission ass "tradertest" 5-Go to your C:\Users\user\Documents\ArmA 2 Other Profiles\yourNickName\missions\tradertest\ and open mission.sqf you will see something like this: Spoiler activateAddons [ ]; activateAddons []; initAmbientLife; _this = createCenter civilian; _center_0 = _this; _group_0 = createGroup _center_0; _unit_0 = objNull; if (true) then { _this = _group_0 createUnit ["ValentinaVictim", [6290.9736, 7827.728, 0.85280406], [], 0, "CAN_COLLIDE"]; _unit_0 = _this; _this setDir -169.92563; _this setUnitAbility 0.60000002; if (true) then {_group_0 selectLeader _this;}; if (true) then {selectPlayer _this;}; }; processInitCommands; runInitScript; finishMissionInit; 6-This need be changed in it: (delete lines not used, and add some line to give god mode to your trader and make it static) Spoiler if (isServer) then { _this = createCenter civilian; _center_0 = _this; _group_0 = createGroup _center_0; _unit_0 = objNull; if (true) then { _this = createAgent ["ValentinaVictim", [6290.9736, 7827.728, 0.85280406], [], 0, "CAN_COLLIDE"]; _unit_0 = _this; _this setDir -169.92563; _this setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0;"; _this addEventHandler ["handleDamage", {false}]; _this setUnitAbility 0.60000002; _this allowDammage false; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setBehaviour 'CARELESS'; _this forceSpeed 0;_this enableSimulation false;}; }; 7-save as tradertest.sqf and drop into mpmissions\custom\traders\ 8-now this file need be called, so go to your init.sqf and paste at bottom: [] execVM "custom\traders\tradertest.sqf"; 9-Server now can spawn this unit. but your need something more. Add this unit as Trader and give any item category to sell and bought. 10-If your using Coins system open server_traders_cherno_11.sqf but if u have gold system open server_traders.sqf In this case i use server_traders_cherno_11.sqf 11-at very top of this file you need find and add your new trader ID (in this case "ValentinaVictim") so see the lines in blue bellow: serverTraders = ["ValentinaVictim","RU_Functionary1","the others traders".......]; 12-Now its time to give a menu and item category to this trade. so into the same file but at very bottom add this structure: Spoiler //CUSTOM TRADER menu_//name of your trader = [ [["category name",number of category],["category name",number of category]], [],//here you can put a change item by item//this is optional ""// here is the humanity variable "neutral" is for all players // "hostile" trader only for bandits //"hero" only for heros ]; 13-In this step you need complete the structure for your trader so: Spoiler //CUSTOM TRADER menu_ValentinaVictim = [ [["Clothing",575",],["Toolbelt Items",510],["Light Machine Gun",638]], [["FoodBioMeat","ItemZombieParts",1,1,"buy","Zombie Parts","Bio Meat",101]], "neutral" ]; 14-and its done. you can add more categories in the structure or create a new. 15-To create a new categorie for exaple in coins locate: ¡MPMissions\DayZ_Epoch_11.Chernarus\ZSC\config\Category\ you will see a lot of hpp files. open for example "neutralToolbeltItems.hpp" and in very bottom but above of last bracket ( }; ) add: Spoiler class Category_3000 { class ItemShovel { type = "trade_weapons"; buy[] ={5200,"Coins"}; sell[] ={1000,"Coins"}; }; class ItemSledge { type = "trade_weapons"; buy[] ={5200,"Coins"}; sell[] ={1000,"Coins"}; }; };//THE LAST BRACKET so your new categorie id is "3000" and you sell and bought shovels and sledges (add any other item) then go to your custom Trader structure in server_traders.sqf or server_traders_Cherno_11.sqf and add it: //CUSTOM TRADER menu_ValentinaVictim = [ [["Toolbelt Items",3000]], [], "neutral" ]; **Note: if u wanna sell and bougth vehicles you need add an "emptyheliH" in the arma2oa editor (this emptyheli define the place where vehicle spawn) Link to comment Share on other sites More sharing options...
0 server steve21k Posted August 29, 2016 Author Report Share Posted August 29, 2016 9 hours ago, juandayz said: @server steve21kAre you talking about only AI traders or whole traders cities? with buildings and traders? I just want to add a few extra traders for now, aircraft at NWAF and Balota and black market trader at klen. Link to comment Share on other sites More sharing options...
0 server steve21k Posted August 29, 2016 Author Report Share Posted August 29, 2016 juandayz, Thanks for your help worked first time, witch is unusual for me juandayz 1 Link to comment Share on other sites More sharing options...
0 juandayz Posted August 29, 2016 Report Share Posted August 29, 2016 @server steve21k you welcome :) if u need something else about it and i can help you just ask here. Link to comment Share on other sites More sharing options...
Question
server steve21k
Looking for some advice
Trying to add traders to my server, following this video but no traders are showing.
https://www.youtube.com/watch?v=2HiFbHpJUqI
Thanks in advance
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now