Jump to content
  • 0

Need assistance plz - Give Unique items trader menu.


Ganja

Question

High all, I'm really new to scripting, I been searching all over the place trying to find a way to do this but all I found were a few more grey hairs.

 

I got my custom NPC traders working perfectly, that was the easy part. But I wanted to give our server the uniqueness it deserves. I'm starting a fresh server and would like to give our players the ability/illusion of ordering their items online. What I mean by this is I would like to make my custom traders into laptops/notebooks. This way all they have to do is go up to the laptop/notebook and scroll to get the trader option instead of on an NPC. How would I create a unique list of items and have them redefined from being "vehicles" to defined as "units" or "createAgent"s? I'm assuming I would have to make the item get called upon as a Skin instead of a Vehicle as it currently is.

 

This is what I have tried so far.

 

mission.sqf:

 

 

 _unit_1375 = objNull;

if (true) then
{
  _this = createAgent ["Notebook", [2464.0691, 7715.4404, 0.073021278], [], 0, "CAN_COLLIDE"];
  _unit_1375 = _this;
  _this setDir -149;
  _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_1375 = objNull;

if (true) then
{
  _this = createAgent ["Notebook", [2464.0691, 7715.4404, 0.073021278], [], 0, "CAN_COLLIDE"];
  _vehicle_1375 = _this;
  _this setDir -149;
  _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_1375 = objNull;
if (true) then
{
  _this = createAgent ["Notebook", [2464.0691, 7715.4404, 0.073021278], [], 0, "CAN_COLLIDE"];
 _vehicle_1375 = _this;
  _this setDir -149;
_this setPos [2464.0691, 7715.4404, 0.073021278];
};
 

 

 

 

 _vehicle_1375 = objNull;
if (true) then
{
  _this = createVehicle ["Notebook", [2464.0691, 7715.4404, 0.073021278], [], 0, "CAN_COLLIDE"];
  _vehicle_1375 = _this;
  _this setDir -149;
  _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_1375 = objNull;
if (true) then
{
  _this = createVehicle ["Notebook", [2464.0691, 7715.4404, 0.073021278], [], 0, "CAN_COLLIDE"];
 _vehicle_1375 = _this;
  _this setDir -149;
_this setPos [2464.0691, 7715.4404, 0.073021278];
};
 

 

 
_unit_1375 = objNull;
if (true) then
{
  _this = createAgent ["Notebook", [2464.0691, 7715.4404, 0.073021278], [], 0, "CAN_COLLIDE"];
  _unit_1375 = _this;
  _this setDir -149;
_this setPos [2464.0691, 7715.4404, 0.073021278];
}; 
 

 
Any assistance on this would be greatly appreciated, as I would like to use other items for traders as well.
 
Thx in advance.
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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

×
×
  • Create New...