Jump to content

Adding custom buildings and areas to my serevr


mattblackraven

Recommended Posts

So you should have a mission.sqf file with all the items. Rename this to something else.

Delete all the lines in red, and just leave the _vehicle parts.

If on a 1.0.6 server, you can put this file into dayz_code/system/mission/chernarus/poi and then edit the init inside that file to call your new file name. You will also need to put

dayz_POIs = true;

in your normal init.sqf

 

Or on 1.0.5.1you can run them from the server_fucntions.sqf. Might work with 1.0.6 too, havent tried.

 _nil = [] execVM "\z\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\YOURFILE.sqf";

of course the files need to be in \dayz_server\missions\ folder for that path

Quote

activateAddons [
];

activateAddons [];
initAmbientLife;

_this = createCenter west;
_center_0 = _this;

_group_0 = createGroup _center_0;

_unit_0 = objNull;
if (true) then
{
  _this = _group_0 createUnit ["USMC_Soldier_AA", [5257.3804, 5494.4741, 0], [], 0, "CAN_COLLIDE"];
  _unit_0 = _this;
  _this setUnitAbility 0.60000002;
  if (true) then {_group_0 selectLeader _this;};
  if (true) then {selectPlayer _this;};
};

_vehicle_5 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Mil_Barracks_i", [5406.7739, 5604.4819, 9.1552734e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_5 = _this;
  _this setDir -75.016281;
  _this setPos [5406.7739, 5604.4819, 9.1552734e-005];
};

 

_vehicle_238 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_garbage_misc", [5424.7002, 5610.0776, 0.00037795759], [], 0, "CAN_COLLIDE"];
  _vehicle_238 = _this;
  _this setDir 170.20624;
  _this setPos [5424.7002, 5610.0776, 0.00037795759];
};

processInitCommands;
runInitScript;
finishMissionInit;

 

 

Link to comment
Share on other sites

You can run from server_monitor.sqf

At the bottom of server_monitor.sqf just use something like:

[] execVM "\z\addons\dayz_server\buildings\adminbase.sqf";

then place your additions in buildings folder or whatever you name it.

Make sure they a formatted correctly and remove your unit as that will cause a black screen. Example:

if (isServer) then {

_vehicle_0 = objNull;
if (true) then
{
  _this = createVehicle ["FlagCarrierUSA_EP1", [14238.571, 14178.717, -1.5258789e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_0 = _this;
  _this setPos [14238.571, 14178.717, -1.5258789e-005];
};

_vehicle_1 = objNull;
if (true) then
{
  _this = createVehicle ["HeliH", [14236.032, 14159.746, -1.5258789e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_1 = _this;
  _this setPos [14236.032, 14159.746, -1.5258789e-005];
};

_vehicle_2 = objNull;
if (true) then
{
  _this = createVehicle ["HeliH", [14236.905, 14125.144, -1.5258789e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_2 = _this;
  _this setPos [14236.905, 14125.144, -1.5258789e-005];
};

_vehicle_3 = objNull;
if (true) then
{
  _this = createVehicle ["HeliH", [14237.799, 14099.687, 0], [], 0, "CAN_COLLIDE"];
  _vehicle_3 = _this;
  _this setPos [14237.799, 14099.687, 0];
};

_vehicle_4 = objNull;
if (true) then
{
  _this = createVehicle ["FuelPump_DZ", [14237.784, 14108.386], [], 0, "CAN_COLLIDE"];
  _vehicle_4 = _this;
  _this setPos [14237.784, 14108.386];
};
};

 

Link to comment
Share on other sites

6 hours ago, insertcoins said:

just a question. Is there a difference preformance wise from calling them in the server monitor as show above compared to calling them from the init.sqf? In both ways the files would be in the server.pbo

I feel like you would need to test this, but either way, the server_monitor is called from the client init.sqf anyway, so I don't know how much of a difference it would make if any.

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

×
×
  • Create New...