Jump to content

Trying to make new trader


meanbeandk

Recommended Posts

Hi im trying to make a new trader.

In my dayz_server\missions\DayZ_Epoch_11.Chernarus/mission.sqf

i have added

 

 

_unit_666 = objNull;

  if (true) then
 
 _this = createAgent ["Dr_Hladik_EP1" [6439.92, 6550.2, 0.001] [] 0 "CAN_COLLIDE"];
 _unit_666 = _this;
 _this setDir  577.32629;
 _this setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0;";
 _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; ;
 
 _vehicle_667 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Heli_H_cross", [6433.9854, 6542.4971, -0.00012207031], [], 0, "CAN_COLLIDE"];
  _vehicle_667 = _this;
  _this setPos [6433.9854, 6542.4971, -0.00012207031];
};

 

but nothing happens ?  :wacko:

 

Link to comment
Share on other sites

Nothing happens in what way? The trader doesn't appear on the map? The trader doesn't work when you approach him?

 

To get the trader to work, assuming he is appearing on your server, you need to add him to your server_traders.sqf file.

Yes what BetterDeadThanZed says is right. You need to add the trader to your server_traders.sqf, like so:

 

------Example------

 

//Aircraft Dealer Balota
menu_Worker2 = [
[["Helicopter Unarmed",519],["Overwatch Camel",1014]],
[],
"neutral"
];
 
Makes sure you also create a new tid for the items he will be selling unless it is the same items another trader is using than you can piggy back off the same tid number. If you use a new tid, you must reflect that in your database via myphpadmin or what have you. Hope this helps. Lastly, if he doesn't appear on the map maybe recheck your grid/location.
Link to comment
Share on other sites

got it to work after 4 ½ hours of working Lol  :D Thanks for your help

Now looks as this

 

_unit_666 = objNull;

if (true) then
{
  _this = createAgent ["GUE_Woodlander2", [6439.92, 6550.2, 0.001], [], 0, "CAN_COLLIDE"];
  _unit_666 = _this;
  _this setDir 577.32629;
  _this setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0;";
  _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;};
 
Link to comment
Share on other sites

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
  • Discord

×
×
  • Create New...