Vehicles Disappearing using .sqf

bajaboy1972

Well-Known Member
I use a vehicle.sqf to place vehicles on my Nimalsk map that i add through the 3d editor. The prrob im having iss wheni join the server and approach aany of these vehicles annd try to use them they disappear. Current code i use is below.

In my init file i use
Code:
[] ExecVM "mapaddons\vehicles.sqf";

And the vehiclee.sqf is as follows....

Code:
if (isServer) then {
 
_vehicle_0 = objNull;
if (true) then
{
  _this = createVehicle ["HMMWV_TOW", [4548.4199, 7218.4717], [], 0, "CAN_COLLIDE"];
  _vehicle_0 = _this;
  _this setDir -75.827202;
  _this setPos [4548.4199, 7218.4717];
};
 
_vehicle_1 = objNull;
if (true) then
{
  _this = createVehicle ["UralCivil", [3873.9312, 7510.0435, 1.9073486e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_1 = _this;
  _this setDir 31.555809;
  _this setPos [3873.9312, 7510.0435, 1.9073486e-005];
};
 
_vehicle_2 = objNull;
if (true) then
{
  _this = createVehicle ["AH6X_DZ", [2665.2146, 7002.7817, 7.1525574e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_2 = _this;
  _this setDir 120.23324;
  _this setPos [2665.2146, 7002.7817, 7.1525574e-006];
};
 
_vehicle_3 = objNull;
if (true) then
{
  _this = createVehicle ["SUV_TK_EP1", [2315.6387, 5746.6196, 6.7710876e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_3 = _this;
  _this setDir 77.019417;
  _this setPos [2315.6387, 5746.6196, 6.7710876e-005];
};
 
_vehicle_4 = objNull;
if (true) then
{
  _this = createVehicle ["ATV_US_EP1", [3454.9626, 6149.2544, 0.00012302399], [], 0, "CAN_COLLIDE"];
  _vehicle_4 = _this;
  _this setPos [3454.9626, 6149.2544, 0.00012302399];
};
 
_vehicle_5 = objNull;
if (true) then
{
  _this = createVehicle ["PBX", [4303.3555, 4735.8242, -0.20826399], [], 0, "CAN_COLLIDE"];
  _vehicle_5 = _this;
  _this setPos [4303.3555, 4735.8242, -0.20826399];
};
 
_vehicle_6 = objNull;
if (true) then
{
  _this = createVehicle ["HMMWV_DZ", [4333.0874, 4787.5605, -6.5326691e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_6 = _this;
  _this setDir 183.24544;
  _this setPos [4333.0874, 4787.5605, -6.5326691e-005];
};
 
_vehicle_8 = objNull;
if (true) then
{
  _this = createVehicle ["UH1H_DZ", [4146.4644, 6578.5479, 2.7450874], [], 0, "CAN_COLLIDE"];
  _vehicle_8 = _this;
  _this setDir 37.149975;
  _this setPos [4146.4644, 6578.5479, 2.7450874];
};
 
_vehicle_9 = objNull;
if (true) then
{
  _this = createVehicle ["BAF_Offroad_W", [4181.0166, 6642.2617, 9.1552734e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_9 = _this;
  _this setDir 174.7072;
  _this setPos [4181.0166, 6642.2617, 9.1552734e-005];
};
 
_vehicle_10 = objNull;
if (true) then
{
  _this = createVehicle ["MH6J_DZ", [4083.8271, 9212.8145, 9.1552734e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_10 = _this;
  _this setPos [4083.8271, 9212.8145, 9.1552734e-005];
};
 
_vehicle_11 = objNull;
if (true) then
{
  _this = createVehicle ["MTVR", [4479.2607, 9314.335, 1.5258789e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_11 = _this;
  _this setDir 60.516624;
  _this setPos [4479.2607, 9314.335, 1.5258789e-005];
};
 
_vehicle_12 = objNull;
if (true) then
{
  _this = createVehicle ["AH6X_DZ", [5741.5459, 9883.6797, 8.9645386e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_12 = _this;
  _this setDir -99.791702;
  _this setPos [5741.5459, 9883.6797, 8.9645386e-005];
};
 
_vehicle_13 = objNull;
if (true) then
{
  _this = createVehicle ["HMMWV_DZ", [5765.1738, 10770.323, 1.9073486e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_13 = _this;
  _this setDir -71.563438;
  _this setPos [5765.1738, 10770.323, 1.9073486e-005];
};
};

Any help would be greatly appreciated.
 
Back
Top