Jump to content

Safe zone coordinates


BetterDeadThanZed

Recommended Posts

_safezones = [
[[11447.91,11364.536],100, "Klen"], // Klen
[[4064.2258,11665.938],100, "Bash"], // Bash
[[6325.6772,7807.7412],100, "Stary"] // Stary
];
Credit to Maca134 - code from this topic.

i doubt Napf uses the exact same trader cooirdinates as chernarus.. ;)

Voor napff these are all traders:

_safezones = [
	[[8246.3184,15485.867],50, "Lenz"], // Lenzburg
	[[15506.952,13229.368],100, "Emmen"], // Emmen
	[[12399.751,5074.5273],75, "Schratten"], // Schratten
	[[10398.626,8279.4619],50, "Bandit"], // Bandit camp
	[[5149.9814,4864.1191],50, "Hero"], // Hero vendor
	[[2122.7954,7807.9878],50, "Wholesaler"], // Wholesaler 1
	[[5379.0342,16103.187],50, "Wholesaler"], // Wholesaler 2
	[[6772.8877,16983.27],50, "Boatdealer"], // Boat dealer 1
	[[16839.973,5264.0566],50, "Boatdealer"] // Boat dealer 2
];

or if you just want the main traders to have godmode and not the others:

_safezones = [
	[[8246.3184,15485.867],50, "Lenz"], // Lenzburg
	[[15506.952,13229.368],100, "Emmen"], // Emmen
	[[12399.751,5074.5273],75, "Schratten"] // Schratten
//	[[10398.626,8279.4619],50, "Bandit"], // Bandit camp
//	[[5149.9814,4864.1191],50, "Hero"], // Hero vendor
//	[[2122.7954,7807.9878],50, "Wholesaler"], // Wholesaler 1
//	[[5379.0342,16103.187],50, "Wholesaler"], // Wholesaler 2
//	[[6772.8877,16983.27],50, "Boatdealer"], // Boat dealer 1
//	[[16839.973,5264.0566],50, "Boatdealer"] // Boat dealer 2
];
Link to comment
Share on other sites

I forgot to add the aircraftdealer, and i cant acces my servers atm.

But its quite easy to get the info from the mission sqm

in the mission.sqm near the end of the entries, they are positioned as:

 name="tradername"
 position={xxxx.xxxx, zzzz.zzzz, yyyy.yyyy}
 radius=rad
in the trader init you only need to add a line to the existing array

[[xxxx.xxxx, yyyy,yyyy],rad,"tradername"],  //comment about the trader can be added here
the last entry does not have a trailing comma
Link to comment
Share on other sites

  • 2 months later...

Just going to bump up an old topic here. I finally got around to trying to enable safe zones on my Napf server. I edited the mission.sqf and added the proper line to the init.sqf file.

 

In init.sqf, I added this line in the same place as it's in my Chernarus server, where safezones work fine:

 

//Run the player monitor
_id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
_playerMonitor =  [] execVM "\z\addons\dayz_code\system\player_monitor.sqf"; 
[] execVM "custom\safezone\safezone.sqf"; 

This was the original portion of the missions.sqf, sensors section:

class Item0
{
position[]={8246.3184,15.544708,15485.867};
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="Lenz";
expCond="(player distance Lenz) < 50;";
expActiv="TitleText[""Now Entering Trader City Lenzburg"",""PLAIN DOWN""]; canbuild = false;";
expDesactiv="TitleText[""Now Leaving Trader City Lenzburg"",""PLAIN DOWN""]; canbuild = true;";
class Effects
{
};
};
class Item1
{
position[]={15506.952,6.2226005,13229.368};
a=100;
b=100;
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="Emmen";
expCond="(player distance Emmen) < 100;";
expActiv="TitleText[""Now Entering Trader City Emmen"",""PLAIN DOWN""]; canbuild = false;";
expDesactiv="TitleText[""Now Leaving Trader City Emmen"",""PLAIN DOWN""]; canbuild = true;";
class Effects
{
};
};
class Item2
{
position[]={12399.751,216.42809,5074.5273};
a=75;
b=75;
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="Schratten";
expCond="(player distance Schratten) < 75;";
expActiv="TitleText[""Now Entering Trader City Schratten"",""PLAIN DOWN""]; canbuild = false;";
expDesactiv="TitleText[""Now Leaving Trader City Schratten"",""PLAIN DOWN""]; canbuild = true;";
class Effects
{
};
};

This is it modified for safezones:

class Item0
{
position[]={8246.3184,15.544708,15485.867};
activationBy="ANY";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="safezone_lenz";
expCond="(player distance safezone_lenz) < 50;";
expActiv="inSafeZone = true;";
expDesactiv="inSafeZone = false;"; 
class Effects
{
};
};
class Item1
{
position[]={15506.952,6.2226005,13229.368};
activationBy="ANY";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="safezone_emmen";
expCond="(player distance safezone_emmen) < 75;";
expActiv="inSafeZone = true;";
expDesactiv="inSafeZone = false;"; 
class Effects
{
};
};
class Item2
{
position[]={12399.751,216.42809,5074.5273};
activationBy="ANY";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="safezone_schratten";
expCond="(player distance safezone_schratten) < 75;";
expActiv="inSafeZone = true;";
expDesactiv="inSafeZone = false;"; 
class Effects
{
};
};

This is exactly as I have it in my Chernarus server but safezones simply aren't working. No errors in my RPT log either. What am I missing?

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...