Jump to content
  • 0

infiSTAR Safezones


CoxyzHQ

Question

Recommended Posts

  • 0

I purchased Infistar via my host (Survival Servers) how can I get the update file for Infistar?  Need this urgently as players getting kicked when I'm using my safezone script.

 

Thanks

Hi I also used to have the version from SS, But when they want to charge you $40 for the COMPLETE AH, what's the point you just go directly to Infistar Himself and then you can use it on a different host if you leave SS and he has been brilliant at fixing any issue that come up.

 

Dump SS AH go direct (gets my vote)

MegaZ 

Link to comment
Share on other sites

  • 0

This might be a noob question, but the custom folder that you put this in.
 
Is that server or mission ?
 
EDIT: Never mind, I just went ini mini miny mo  :rolleyes: 
Apparently it is the mission folder

Edited by Luna
Link to comment
Share on other sites

  • 0

The aircraft dealer in Chernarus has no safe zone I have tried adding a trigger like the other safe zones no luck so I tried using the positions still nothing.

I am trying to use the position for the ACD and that is 

 

12060.471,158.85699,12638.533

 

Now the infiSTAR uses something that looks like this 

 

[[6325.6772,7807.7412],200,true], 

 

Its shorter so I tried to remove the 12638.533 and still no.

So how or ware are you guys getting the positions >.<

Link to comment
Share on other sites

  • 0

you have 2 options... either add the safezone via your mission.sqm using the canbuild = false, clearzeds=blah\script.sqf;

 

Example:

 

class Item36
{
position[]={11932.335, 0, 21026.756};
a=100;
b=100;
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="overwatch";
expCond="(player distance overwatch) < 100;";
expActiv="canbuild = false; clearzeds = [] execVM ""custom\clearzeds.sqf""; speedlimit = [] execVM ""custom\speedlimit.sqf"";  titleText [""\n\nEntering Pry's OTT Store - God Mode ON - Zed Shield ON - Speed Limiter ON"", ""PLAIN DOWN"", 1];";
            expDesactiv="canbuild = true; terminate clearzeds; terminate speedlimit; titleText [""\n\nLeaving Pry's OTT Store - God Mode OFF - Zed Shield OFF - Speed Limiter OFF"", ""PLAIN DOWN"", 1];";
class Effects
{
};
};

OR

 

Use positions: X,Y,Z format as Z is always 0 (zero) you only need X & Y

 

See below for example (this is origins Tavi map co-ords)

 

/*
   by: http://infiSTAR.de || http://DayzAntiHack.com
   *updated on 14.07.2014
*/
USE_CANBUILD = false;		// if you don't want to define your own positions
USE_TraderCity = false;	//	if you don't want to define your own positions (Epoch 1.0.5)
USE_POSITIONS = true;	// to use own positions and radius
USE_AI_REMOVER = true; // use this to remove Missionbots (AI) within 100m of a player if the player is in a SafeZone
USE_AntiSteal = true;	// use this to block opening gear if another player is within 3m!
USE_SIGNS = false;              // use this to build signs around the SafeZone
LOG_EnterLeave = true;	// This will log to your .rpt when a player enters or leaves a SafeZone! (only works with infiSTAR.de Admintools / AntiHack)
/* You can use USE_CANBUILD or/and (works together) the custom positions below (USE_POSITIONS) [position or zone,radius] */
_infiSZ =
[
	[[8042.2275,6496.458],200,false],// Novy
	[[3097.4031,2469.9319],200,false],// Knin
	[[15309.663,9278.4912],200,false],// Sabina
	[[11698.81,15210.121],200,false],// Lyep
	[[5538.7354,8762.2695],200,false],// Bilgrad
	[[7376.6084,4296.5879],200,false],// Branibor
	[[10948.426,654.90265],200,false],// Bandit Vendor
	[[15587.822,16394.049],200,false],// Hero Vendor
	[[16555.732,10159.68],200,false],// Aircraft Dealer 1
	[[6815.0776,8534.1504],200,false],// Aircraft Dealer
	[[4066.3528,7265.0024],200,false],// Misc. Vendor
	[[17497.631,7159.0879],200,false],// Misc. Vendor 1
	[[17332.115,12930.239],200,false],// Boat Dealer
	[[10570.494,16772.477],200,false],// Boat Dealer 1
	[[10698.463,5983.665],200,false],// Boat Dealer 2
	[[5419.2437,9503.5479],200,false],// Boat Dealer 3
	[[13342.758,8611.9932],200,false],// Wholesaler
	[[9859.4209,7471.5684],200,false],// Wholesaler 1
	[[1013.0505,18247.072],200,false],// Carl's Buildables
	[[11932.335,21026.756],200,false]// Pry's OTT Store	
];
if (isServer) exitWith
{
	if (USE_SIGNS) then
	{
		{
			_center = _x select 0;
			_radius = _x select 1;
			_lSign = _x select 2;
			if (_lSign) then
			{
				for '_i' from 0 to 360 step (270 / _radius)*2 do
				{
					_location = [(_center select 0) + ((cos _i) * _radius), (_center select 1) + ((sin _i) * _radius),0];
					_dir = ((_center select 0) - (_location select 0)) atan2 ((_center select 1) - (_location select 1));
					_object = createVehicle ['SignM_FARP_Winchester_EP1', _location, [], 0, 'CAN_COLLIDE'];
					_object setDir _dir;
					_object setVehicleInit 'this setObjectTexture [0, ''custom\sign.paa''];';
				};
			};
		} forEach _infiSZ;
	};
};
waitUntil { !isNil 'dayz_animalCheck' };
if (isNil 'inSafezone') then {inSafezone = false;};
[_infiSZ] spawn {
	_infiSZ = _this select 0;
	_startSafeZone =
	{
		if (isNil 'outNow') then
		{
			_msg = 'You entered a Safe Zone!';
			hint _msg;
			taskHint [_msg, [0,1,0,1], 'taskDone'];
			inNow = nil;
			outNow = true;
			
			if (LOG_EnterLeave) then
			{
				_obj = vehicle player;
				_pos = getPosATL _obj;
				PVDZE_send = [player,'SafeZoneState',[1]];
				publicVariableServer 'PVDZE_send';
			};
		};
		player_fired2 = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\player_fired.sqf';
		player_fired = {
		titleText ["All weapons are disabled while you are in a safe zone.","PLAIN DOWN"]; titleFadeOut 4;
		_this call player_fired2;deleteVehicle (nearestObject [_this select 0,_this select 4]);
		};
		player_zombieCheck = {};
		fnc_usec_damageHandler = {};
		fnc_usec_unconscious = {};
		object_monitorGear = {};
		player removeAllEventHandlers 'handleDamage';
		player addEventHandler ['handleDamage', {false}];
		player allowDamage false;
		_x = vehicle player;
		if ((_x isKindOf 'LandVehicle') || (_x isKindOf 'Air') || (_x isKindOf 'Ship')) then
		{
			_szs = _x getVariable ['inSafeZone',0];
			if (_szs == 0) then
			{
				_x removeAllEventHandlers 'Fired';
				_x addEventHandler ['Fired', {_this call player_fired;}];
				_x setVariable ['inSafeZone', 1, true];
				_x removeAllEventHandlers 'HandleDamage';
				_x addEventHandler ['HandleDamage', {false}];
				_x allowDamage false;
			};
		};
		
		_cwep = currentWeapon player;
		if (_cwep in ['MAAWS']) then
		{
			_swep = '';
			{
				if ((getNumber (configFile >> 'CfgWeapons' >> _x >> 'Type')) == 2) exitWith
				{
					_swep = _x;
				};
			} forEach (weapons player);
			if (_swep == '') then
			{
				player playActionNow 'PutDown';
				_iPos = getPosATL player;
				_radius = 1;
				_removed = ([player,_cwep,1] call BIS_fnc_invRemove);
				if (_removed == 1) then
				{
					_item = createVehicle ['WeaponHolder', _iPos, [], _radius, 'CAN_COLLIDE'];
					_item addWeaponCargoGlobal [_cwep,1];
				};
			}
			else
			{
				player selectweapon _swep;
			};
		};
	};
	_endSafeZone =
	{
		if (isNil 'inNow') then
		{
			if (str fnc_usec_damageHandler == '{}') then
			{
				_msg = 'You left the Safe Zone!';
				hint _msg;
				taskHint [_msg, [1,0,0.1,1], 'taskFailed'];
			};
			inNow = true;
			outNow = nil;
			
			if (LOG_EnterLeave) then
			{
				_obj = vehicle player;
				_pos = getPosATL _obj;
				PVDZE_send = [player,'SafeZoneState',[0]];
				publicVariableServer 'PVDZE_send';
			};
		};
		player_fired = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\player_fired.sqf';
		player_zombieCheck = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\player_zombieCheck.sqf';
		fnc_usec_unconscious = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\fn_unconscious.sqf';
		object_monitorGear = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\object_monitorGear.sqf';
		
		_x = vehicle player;
		if ((_x isKindOf 'LandVehicle') || (_x isKindOf 'Air') || (_x isKindOf 'Ship')) then
		{
			_szs = _x getVariable ['inSafeZone',0];
			if (_szs == 1) then
			{
				_x setVariable ['inSafeZone', 0, true];
				_x removeAllEventHandlers 'HandleDamage';
				_x addeventhandler ['HandleDamage',{ _this call vehicle_handleDamage } ];
				_x allowDamage true;
			};
		};
		
		_end = false;
		if (isNil 'gmadmin') then
		{
			_end = true;
		}
		else
		{
			if (gmadmin == 0) then
			{
				_end = true;
			};
		};
		if (_end) then
		{
			player allowDamage true;
			fnc_usec_damageHandler = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\fn_damageHandler.sqf';
			player removeAllEventHandlers 'HandleDamage';
			player addeventhandler ['HandleDamage',{_this call fnc_usec_damageHandler;} ];
		};
	};
	while {1 == 1} do
	{
		_state = false;
		_obj = vehicle player;
		
		if (isNil 'inSafeZone') then { inSafeZone = false; } else { if (typename inSafeZone != 'BOOL') then { inSafeZone = false; }; };
		if (isNil 'canbuild') then { canbuild = true; } else { if (typename canbuild != 'BOOL') then { canbuild = true; }; };
		if (isNil 'USE_POSITIONS') then { USE_POSITIONS = false; } else { if (typename USE_POSITIONS != 'BOOL') then { USE_POSITIONS = false; }; };
		if (isNil 'USE_CANBUILD') then { USE_CANBUILD = true; } else { if (typename USE_CANBUILD != 'BOOL') then { USE_CANBUILD = true; }; };
		if (isNil 'USE_TraderCity') then { USE_TraderCity = true; } else { if (typename USE_TraderCity != 'BOOL') then { USE_TraderCity = true; }; };
		if (USE_POSITIONS) then
		{
			{
				_z = _x select 0;
				_r = _x select 1;
				if (_obj distance _z < _r) exitWith {_state = true;};
			} forEach _infiSZ;
		};
		if (USE_CANBUILD) then
		{
			if (!canbuild) then {_state = true;};
		};
		if (USE_TraderCity) then
		{
			if (isInTraderCity) then {_state = true;};
		};
		if (_state) then
		{
			inSafeZone = true;
			call _startSafeZone;
			{
				if (!isNull _x) then
				{
					if !(isPlayer _x) then
					{
						deletevehicle _x;
					};
				};
			} forEach (_obj nearEntities ['zZombie_Base',15]);
			
			if (isNil 'USE_AI_REMOVER') then { USE_AI_REMOVER = false; } else { if (typename USE_AI_REMOVER != 'BOOL') then { USE_AI_REMOVER = false; }; };
			if (USE_AI_REMOVER) then
			{
				{
					if ((!isNull group _x) && (getPlayerUID _x == '')) then
					{
						deleteVehicle _x;
					};
				} forEach (player nearEntities ['Man',100]);
			};
		}
		else
		{
			inSafeZone = false;
		};
		uiSleep 2;
		if (!inSafeZone) then
		{
			call _endSafeZone;
		};
	};
};
if (USE_AntiSteal) then
{
	[] spawn {
		while {1 == 1} do
		{
			if (inSafezone) then
			{
				_cnt = {isPlayer _x && _x != player} count (player nearEntities [['CAManBase'], 3]);
				if ((_cnt > 0) && (!isNull (findDisplay 106))) then
				{
					(findDisplay 106) closedisplay 0;
					closeDialog 0;
					_log = format['%1 You are not allowed to open Gear while near another player!',name player];
					cutText [_log,'PLAIN'];
					hint _log;
				};
			}
			else
			{
				uiSleep 2;
			};
			uiSleep 0.1;
		};
	};
}; 

 

 

Breakdown: [[X,Y],RADIUS,SIGN = True/False],// Novy

 

Hope it helps,

 

Pry

Link to comment
Share on other sites

  • 0

Question about adding a safe zone: I Used the USE_TraderCity=true but the bandit dealer in Napf does not have a safe zone, So can I just add his cords in to the list below ? (one in red)

 

 

USE_CANBUILD = true;            // if you don't want to define your own positions
USE_TraderCity = true;  //      if you don't want to define your own positions (Epoch 1.0.5)
USE_POSITIONS = false;  // to use own positions and radius
USE_AI_REMOVER = true; // use this to remove Missionbots (AI) within 100m of a player if the player is in a SafeZone
USE_AntiSteal = true;   // use this to block opening gear if another player is within 3m!
USE_SPEEDLIMIT = true;  // very secret function, nobody is supposed to find out what it does.
        SPEEDLIMIT = 20;                // Only used if USE_SPEEDLIMIT is true.
USE_SIGNS = false;              // use this to build signs around the SafeZone
LOG_EnterLeave = true;  // This will log to your .rpt when a player enters or leaves a SafeZone! (only works with infiSTAR.de Admintools / AntiHack)
/* You can use USE_CANBUILD or/and (works together) the custom positions below (USE_POSITIONS) [position or zone,radius] */
_infiSZ =
[
        [[6325.6772,7807.7412],200,true],
        [[4063.4226,11664.19],200,true],
        [[11447.472,11364.504],200,true],
        [[1606.6443,7803.5156],150,true],
        [[12944.227,12766.889],150,true],
        [[5068.6636,9723.4248],100,true],

        [[4947.62,16373.4],100,true]#

];
if (isServer) exitWith

 

Of do I need to Turn - USE_TraderCity=true - and turn this to false and then turn all the above in Blue to false.

Thanks

MegaZ

Link to comment
Share on other sites

  • 0

Question about adding a safe zone: I Used the USE_TraderCity=true but the bandit dealer in Napf does not have a safe zone, So can I just add his cords in to the list below ? (one in red)

 

 

USE_CANBUILD = true;            // if you don't want to define your own positions

USE_TraderCity = true;  //      if you don't want to define your own positions (Epoch 1.0.5)

USE_POSITIONS = false;  // to use own positions and radius

USE_AI_REMOVER = true; // use this to remove Missionbots (AI) within 100m of a player if the player is in a SafeZone

USE_AntiSteal = true;   // use this to block opening gear if another player is within 3m!

USE_SPEEDLIMIT = true;  // very secret function, nobody is supposed to find out what it does.

        SPEEDLIMIT = 20;                // Only used if USE_SPEEDLIMIT is true.

USE_SIGNS = false;              // use this to build signs around the SafeZone

LOG_EnterLeave = true;  // This will log to your .rpt when a player enters or leaves a SafeZone! (only works with infiSTAR.de Admintools / AntiHack)

/* You can use USE_CANBUILD or/and (works together) the custom positions below (USE_POSITIONS) [position or zone,radius] */

_infiSZ =

[

        [[6325.6772,7807.7412],200,true],

        [[4063.4226,11664.19],200,true],

        [[11447.472,11364.504],200,true],

        [[1606.6443,7803.5156],150,true],

        [[12944.227,12766.889],150,true],

        [[5068.6636,9723.4248],100,true],

        [[4947.62,16373.4],100,true]#

];

if (isServer) exitWith

 

Of do I need to Turn - USE_TraderCity=true - and turn this to false and then turn all the above in Blue to false.

Thanks

MegaZ

Hi Megaz, I have all three types switched on (probably unecessarily) from where I used to use can build (pre105 I think 105 removed can build), then trader cities when 105 came out but aircraft trader still unsafe. Then after a poll on my website where players voted for safe aircraft trader, I set positions to true as well.

 

So, basically you can have all 3 switched on although there is no point... :)

 

However, for some reason in Chris's stock script, for Chernarus, he had the NWAF as safe not the NEAF. Maybe lots of other servers move their trader there, idk so, if you're using Napf, you should check and change all the coords where necessary.

 

Good luck! :)

Link to comment
Share on other sites

  • 0

you have 2 options... either add the safezone via your mission.sqm using the canbuild = false, clearzeds=blah\script.sqf;

 

Example:

 

class Item36
{
position[]={11932.335, 0, 21026.756};
a=100;
b=100;
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="overwatch";
expCond="(player distance overwatch) < 100;";
expActiv="canbuild = false; clearzeds = [] execVM ""custom\clearzeds.sqf""; speedlimit = [] execVM ""custom\speedlimit.sqf"";  titleText [""\n\nEntering Pry's OTT Store - God Mode ON - Zed Shield ON - Speed Limiter ON"", ""PLAIN DOWN"", 1];";
            expDesactiv="canbuild = true; terminate clearzeds; terminate speedlimit; titleText [""\n\nLeaving Pry's OTT Store - God Mode OFF - Zed Shield OFF - Speed Limiter OFF"", ""PLAIN DOWN"", 1];";
class Effects
{
};
};

OR

 

Use positions: X,Y,Z format as Z is always 0 (zero) you only need X & Y

 

See below for example (this is origins Tavi map co-ords)

 

/*
   by: http://infiSTAR.de || http://DayzAntiHack.com
   *updated on 14.07.2014
*/
USE_CANBUILD = false;		// if you don't want to define your own positions
USE_TraderCity = false;	//	if you don't want to define your own positions (Epoch 1.0.5)
USE_POSITIONS = true;	// to use own positions and radius
USE_AI_REMOVER = true; // use this to remove Missionbots (AI) within 100m of a player if the player is in a SafeZone
USE_AntiSteal = true;	// use this to block opening gear if another player is within 3m!
USE_SIGNS = false;              // use this to build signs around the SafeZone
LOG_EnterLeave = true;	// This will log to your .rpt when a player enters or leaves a SafeZone! (only works with infiSTAR.de Admintools / AntiHack)
/* You can use USE_CANBUILD or/and (works together) the custom positions below (USE_POSITIONS) [position or zone,radius] */
_infiSZ =
[
	[[8042.2275,6496.458],200,false],// Novy
	[[3097.4031,2469.9319],200,false],// Knin
	[[15309.663,9278.4912],200,false],// Sabina
	[[11698.81,15210.121],200,false],// Lyep
	[[5538.7354,8762.2695],200,false],// Bilgrad
	[[7376.6084,4296.5879],200,false],// Branibor
	[[10948.426,654.90265],200,false],// Bandit Vendor
	[[15587.822,16394.049],200,false],// Hero Vendor
	[[16555.732,10159.68],200,false],// Aircraft Dealer 1
	[[6815.0776,8534.1504],200,false],// Aircraft Dealer
	[[4066.3528,7265.0024],200,false],// Misc. Vendor
	[[17497.631,7159.0879],200,false],// Misc. Vendor 1
	[[17332.115,12930.239],200,false],// Boat Dealer
	[[10570.494,16772.477],200,false],// Boat Dealer 1
	[[10698.463,5983.665],200,false],// Boat Dealer 2
	[[5419.2437,9503.5479],200,false],// Boat Dealer 3
	[[13342.758,8611.9932],200,false],// Wholesaler
	[[9859.4209,7471.5684],200,false],// Wholesaler 1
	[[1013.0505,18247.072],200,false],// Carl's Buildables
	[[11932.335,21026.756],200,false]// Pry's OTT Store	
];
if (isServer) exitWith
{
	if (USE_SIGNS) then
	{
		{
			_center = _x select 0;
			_radius = _x select 1;
			_lSign = _x select 2;
			if (_lSign) then
			{
				for '_i' from 0 to 360 step (270 / _radius)*2 do
				{
					_location = [(_center select 0) + ((cos _i) * _radius), (_center select 1) + ((sin _i) * _radius),0];
					_dir = ((_center select 0) - (_location select 0)) atan2 ((_center select 1) - (_location select 1));
					_object = createVehicle ['SignM_FARP_Winchester_EP1', _location, [], 0, 'CAN_COLLIDE'];
					_object setDir _dir;
					_object setVehicleInit 'this setObjectTexture [0, ''custom\sign.paa''];';
				};
			};
		} forEach _infiSZ;
	};
};
waitUntil { !isNil 'dayz_animalCheck' };
if (isNil 'inSafezone') then {inSafezone = false;};
[_infiSZ] spawn {
	_infiSZ = _this select 0;
	_startSafeZone =
	{
		if (isNil 'outNow') then
		{
			_msg = 'You entered a Safe Zone!';
			hint _msg;
			taskHint [_msg, [0,1,0,1], 'taskDone'];
			inNow = nil;
			outNow = true;
			
			if (LOG_EnterLeave) then
			{
				_obj = vehicle player;
				_pos = getPosATL _obj;
				PVDZE_send = [player,'SafeZoneState',[1]];
				publicVariableServer 'PVDZE_send';
			};
		};
		player_fired2 = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\player_fired.sqf';
		player_fired = {
		titleText ["All weapons are disabled while you are in a safe zone.","PLAIN DOWN"]; titleFadeOut 4;
		_this call player_fired2;deleteVehicle (nearestObject [_this select 0,_this select 4]);
		};
		player_zombieCheck = {};
		fnc_usec_damageHandler = {};
		fnc_usec_unconscious = {};
		object_monitorGear = {};
		player removeAllEventHandlers 'handleDamage';
		player addEventHandler ['handleDamage', {false}];
		player allowDamage false;
		_x = vehicle player;
		if ((_x isKindOf 'LandVehicle') || (_x isKindOf 'Air') || (_x isKindOf 'Ship')) then
		{
			_szs = _x getVariable ['inSafeZone',0];
			if (_szs == 0) then
			{
				_x removeAllEventHandlers 'Fired';
				_x addEventHandler ['Fired', {_this call player_fired;}];
				_x setVariable ['inSafeZone', 1, true];
				_x removeAllEventHandlers 'HandleDamage';
				_x addEventHandler ['HandleDamage', {false}];
				_x allowDamage false;
			};
		};
		
		_cwep = currentWeapon player;
		if (_cwep in ['MAAWS']) then
		{
			_swep = '';
			{
				if ((getNumber (configFile >> 'CfgWeapons' >> _x >> 'Type')) == 2) exitWith
				{
					_swep = _x;
				};
			} forEach (weapons player);
			if (_swep == '') then
			{
				player playActionNow 'PutDown';
				_iPos = getPosATL player;
				_radius = 1;
				_removed = ([player,_cwep,1] call BIS_fnc_invRemove);
				if (_removed == 1) then
				{
					_item = createVehicle ['WeaponHolder', _iPos, [], _radius, 'CAN_COLLIDE'];
					_item addWeaponCargoGlobal [_cwep,1];
				};
			}
			else
			{
				player selectweapon _swep;
			};
		};
	};
	_endSafeZone =
	{
		if (isNil 'inNow') then
		{
			if (str fnc_usec_damageHandler == '{}') then
			{
				_msg = 'You left the Safe Zone!';
				hint _msg;
				taskHint [_msg, [1,0,0.1,1], 'taskFailed'];
			};
			inNow = true;
			outNow = nil;
			
			if (LOG_EnterLeave) then
			{
				_obj = vehicle player;
				_pos = getPosATL _obj;
				PVDZE_send = [player,'SafeZoneState',[0]];
				publicVariableServer 'PVDZE_send';
			};
		};
		player_fired = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\player_fired.sqf';
		player_zombieCheck = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\player_zombieCheck.sqf';
		fnc_usec_unconscious = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\fn_unconscious.sqf';
		object_monitorGear = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\object_monitorGear.sqf';
		
		_x = vehicle player;
		if ((_x isKindOf 'LandVehicle') || (_x isKindOf 'Air') || (_x isKindOf 'Ship')) then
		{
			_szs = _x getVariable ['inSafeZone',0];
			if (_szs == 1) then
			{
				_x setVariable ['inSafeZone', 0, true];
				_x removeAllEventHandlers 'HandleDamage';
				_x addeventhandler ['HandleDamage',{ _this call vehicle_handleDamage } ];
				_x allowDamage true;
			};
		};
		
		_end = false;
		if (isNil 'gmadmin') then
		{
			_end = true;
		}
		else
		{
			if (gmadmin == 0) then
			{
				_end = true;
			};
		};
		if (_end) then
		{
			player allowDamage true;
			fnc_usec_damageHandler = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\fn_damageHandler.sqf';
			player removeAllEventHandlers 'HandleDamage';
			player addeventhandler ['HandleDamage',{_this call fnc_usec_damageHandler;} ];
		};
	};
	while {1 == 1} do
	{
		_state = false;
		_obj = vehicle player;
		
		if (isNil 'inSafeZone') then { inSafeZone = false; } else { if (typename inSafeZone != 'BOOL') then { inSafeZone = false; }; };
		if (isNil 'canbuild') then { canbuild = true; } else { if (typename canbuild != 'BOOL') then { canbuild = true; }; };
		if (isNil 'USE_POSITIONS') then { USE_POSITIONS = false; } else { if (typename USE_POSITIONS != 'BOOL') then { USE_POSITIONS = false; }; };
		if (isNil 'USE_CANBUILD') then { USE_CANBUILD = true; } else { if (typename USE_CANBUILD != 'BOOL') then { USE_CANBUILD = true; }; };
		if (isNil 'USE_TraderCity') then { USE_TraderCity = true; } else { if (typename USE_TraderCity != 'BOOL') then { USE_TraderCity = true; }; };
		if (USE_POSITIONS) then
		{
			{
				_z = _x select 0;
				_r = _x select 1;
				if (_obj distance _z < _r) exitWith {_state = true;};
			} forEach _infiSZ;
		};
		if (USE_CANBUILD) then
		{
			if (!canbuild) then {_state = true;};
		};
		if (USE_TraderCity) then
		{
			if (isInTraderCity) then {_state = true;};
		};
		if (_state) then
		{
			inSafeZone = true;
			call _startSafeZone;
			{
				if (!isNull _x) then
				{
					if !(isPlayer _x) then
					{
						deletevehicle _x;
					};
				};
			} forEach (_obj nearEntities ['zZombie_Base',15]);
			
			if (isNil 'USE_AI_REMOVER') then { USE_AI_REMOVER = false; } else { if (typename USE_AI_REMOVER != 'BOOL') then { USE_AI_REMOVER = false; }; };
			if (USE_AI_REMOVER) then
			{
				{
					if ((!isNull group _x) && (getPlayerUID _x == '')) then
					{
						deleteVehicle _x;
					};
				} forEach (player nearEntities ['Man',100]);
			};
		}
		else
		{
			inSafeZone = false;
		};
		uiSleep 2;
		if (!inSafeZone) then
		{
			call _endSafeZone;
		};
	};
};
if (USE_AntiSteal) then
{
	[] spawn {
		while {1 == 1} do
		{
			if (inSafezone) then
			{
				_cnt = {isPlayer _x && _x != player} count (player nearEntities [['CAManBase'], 3]);
				if ((_cnt > 0) && (!isNull (findDisplay 106))) then
				{
					(findDisplay 106) closedisplay 0;
					closeDialog 0;
					_log = format['%1 You are not allowed to open Gear while near another player!',name player];
					cutText [_log,'PLAIN'];
					hint _log;
				};
			}
			else
			{
				uiSleep 2;
			};
			uiSleep 0.1;
		};
	};
}; 

 

 

Breakdown: [[X,Y],RADIUS,SIGN = True/False],// Novy

 

Hope it helps,

 

Pry

Thank you :D helps alot

Link to comment
Share on other sites

  • 0

Hi all!

 

build signs around the SafeZone is not worked.. How to do that worked?

P.S. How to add color marker?

/*
   by: http://infiSTAR.de || http://DayzAntiHack.com
   *updated on 21.07.2014
*/
USE_CANBUILD = true;            // if you don't want to define your own positions
USE_TraderCity = true;  //      if you don't want to define your own positions (Epoch 1.0.5)
USE_POSITIONS = false;  // to use own positions and radius
USE_AI_REMOVER = false; // use this to remove Missionbots (AI) within 100m of a player if the player is in a SafeZone
USE_AntiSteal = true;   // use this to block opening gear if another player is within 3m!
USE_SPEEDLIMIT = true;  // very secret function, nobody is supposed to find out what it does.
SPEEDLIMIT = 20;                // Only used if USE_SPEEDLIMIT is true.
USE_SIGNS = true;              // use this to build signs around the SafeZone
LOG_EnterLeave = true;  // This will log to your .rpt when a player enters or leaves a SafeZone! (only works with infiSTAR.de Admintools / AntiHack)
/* You can use USE_CANBUILD or/and (works together) the custom positions below (USE_POSITIONS) [position or zone,radius] */
_infiSZ =
[
        [[15520.298,13225.447],120,true],
        [[8246.7275,15490.344],80,true],
        [[12397.357,5068.0298],80,true],
        [[15128.379,16421.879],80,true],
        [[6776.3237,16955.648],80,true],
        [[5372.1465,16091.704],80,true],
		[[2125.5425,7807.833],80,true], 
	    [[5150.6099,4862.3594],80,true],
	    [[10404.296,8282.8232],50,true],
	    [[16835.688,5268.064],80,true]
        //[[12085.315,9220.8955],90,true]
        //[[1757.86,12866.8],40,true]
		
		
		
];
if (isServer) exitWith
{
        if (USE_SIGNS) then
        {
                {
                        _center = _x select 0;
                        _radius = _x select 1;
                        _lSign = _x select 2;
                        if (_lSign) then
                        {
                                for '_i' from 0 to 360 step (270 / _radius)*2 do
                                {
                                        _location = [(_center select 0) + ((cos _i) * _radius), (_center select 1) + ((sin _i) * _radius),0];
                                        _dir = ((_center select 0) - (_location select 0)) atan2 ((_center select 1) - (_location select 1));
                                        _object = createVehicle ['SignM_FARP_Winchester_EP1', _location, [], 0, 'CAN_COLLIDE'];
                                        _object setDir _dir;
                                        _object setVehicleInit 'this setObjectTexture [0, ''safezone\sign.paa''];';
                                };
                        };
                } forEach _infiSZ;
        };
};
waitUntil { !isNil 'dayz_animalCheck' };
if (isNil 'inSafezone') then {inSafezone = false;};
[_infiSZ] spawn {
        _infiSZ = _this select 0;
        _startSafeZone =
        {
                if (isNil 'outNow') then
                {
                        _msg = 'Вы вошли в безопасную зону!';
                        hint _msg;
                        taskHint [_msg, [0,1,0,1], 'taskDone'];
                        inNow = nil;
                        outNow = true;
                       
                        if (LOG_EnterLeave) then
                        {
                                _obj = vehicle player;
                                _pos = getPosATL _obj;
                                PVDZE_send = [player,'SafeZoneState',[1]];
                                publicVariableServer 'PVDZE_send';
                        };
                };
                player_fired2 = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\player_fired.sqf';
                player_fired = {_this call player_fired2;deleteVehicle (nearestObject [_this select 0,_this select 4]);};
                fnc_usec_damageHandler = {};
                player removeAllEventHandlers 'handleDamage';
                player addEventHandler ['handleDamage', {false}];
                player allowDamage false;
                _veh = vehicle player;
                if (player != _veh) then
                {
                        _szs = _veh getVariable ['inSafeZone',0];
                        if (_szs == 0) then
                        {
                                _veh removeAllEventHandlers 'Fired';
                                _veh addEventHandler ['Fired', {_this call player_fired;}];
                                {
                                        _x removeAllEventHandlers 'Fired';
                                        _x addEventHandler ['Fired', {_this call player_fired;}];
                                } forEach (crew _veh);
                                _veh setVariable ['inSafeZone', 1, true];
                                _veh removeAllEventHandlers 'HandleDamage';
                                _veh addEventHandler ['HandleDamage', {false}];
                                _veh allowDamage false;
                        };
                };
               
                _cwep = currentWeapon player;
                if (_cwep in ['MAAWS']) then
                {
                        _swep = '';
                        {
                                if ((getNumber (configFile >> 'CfgWeapons' >> _x >> 'Type')) == 2) exitWith
                                {
                                        _swep = _x;
                                };
                        } forEach (weapons player);
                        if (_swep == '') then
                        {
                                player playActionNow 'PutDown';
                                _iPos = getPosATL player;
                                _radius = 1;
                                _removed = ([player,_cwep,1] call BIS_fnc_invRemove);
                                if (_removed == 1) then
                                {
                                        _item = createVehicle ['WeaponHolder', _iPos, [], _radius, 'CAN_COLLIDE'];
                                        _item addWeaponCargoGlobal [_cwep,1];
                                };
                        }
                        else
                        {
                                player selectweapon _swep;
                        };
                };
        };
        _endSafeZone =
        {
                if (isNil 'inNow') then
                {
                        if (str fnc_usec_damageHandler == '{}') then
                        {
                                _msg = 'Вы покинули безопасную зону!';
                                hint _msg;
                                taskHint [_msg, [1,0,0.1,1], 'taskFailed'];
                        };
                        inNow = true;
                        outNow = nil;
                       
                        if (LOG_EnterLeave) then
                        {
                                _obj = vehicle player;
                                _pos = getPosATL _obj;
                                PVDZE_send = [player,'SafeZoneState',[0]];
                                publicVariableServer 'PVDZE_send';
                        };
                };
                player_fired = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\player_fired.sqf';
                player_zombieCheck = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\player_zombieCheck.sqf';
                fnc_usec_unconscious = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\fn_unconscious.sqf';
                object_monitorGear = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\object_monitorGear.sqf';
               
                _veh = vehicle player;
                if (player != _veh) then
                {
                        _szs = _veh getVariable ['inSafeZone',0];
                        if (_szs == 1) then
                        {
                                _veh setVariable ['inSafeZone', 0, true];
                                _veh removeAllEventHandlers 'HandleDamage';
                                _veh addeventhandler ['HandleDamage',{ _this call vehicle_handleDamage } ];
                                _veh allowDamage true;
                        };
                };
               
                _end = false;
                if (isNil 'gmadmin') then
                {
                        _end = true;
                }
                else
                {
                        if (gmadmin == 0) then
                        {
                                _end = true;
                        };
                };
                if (_end) then
                {
                        player allowDamage true;
                        fnc_usec_damageHandler = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\fn_damageHandler.sqf';
                        player removeAllEventHandlers 'HandleDamage';
                        player addeventhandler ['HandleDamage',{_this call fnc_usec_damageHandler;} ];
                };
        };
        while {1 == 1} do
        {
                _state = false;
                _obj = vehicle player;
               
                if (isNil 'inSafeZone') then { inSafeZone = false; } else { if (typename inSafeZone != 'BOOL') then { inSafeZone = false; }; };
                if (isNil 'canbuild') then { canbuild = true; } else { if (typename canbuild != 'BOOL') then { canbuild = true; }; };
                if (isNil 'USE_POSITIONS') then { USE_POSITIONS = false; } else { if (typename USE_POSITIONS != 'BOOL') then { USE_POSITIONS = false; }; };
                if (isNil 'USE_CANBUILD') then { USE_CANBUILD = true; } else { if (typename USE_CANBUILD != 'BOOL') then { USE_CANBUILD = true; }; };
                if (isNil 'USE_TraderCity') then { USE_TraderCity = true; } else { if (typename USE_TraderCity != 'BOOL') then { USE_TraderCity = true; }; };
                if (USE_POSITIONS) then
                {
                        {
                                _z = _x select 0;
                                _r = _x select 1;
                                if (_obj distance _z < _r) exitWith {_state = true;};
                        } forEach _infiSZ;
                };
                if (USE_CANBUILD) then
                {
                        if (!canbuild) then {_state = true;};
                };
                if (USE_TraderCity) then
                {
                        if (isInTraderCity) then {_state = true;};
                };
                if (_state) then
                {
                        inSafeZone = true;
                        call _startSafeZone;
                        {
                                if (!isNull _x) then
                                {
                                        if !(isPlayer _x) then
                                        {
                                                deletevehicle _x;
                                        };
                                };
                        } forEach (_obj nearEntities ['zZombie_Base',15]);
                       
                        if (isNil 'USE_AI_REMOVER') then { USE_AI_REMOVER = false; } else { if (typename USE_AI_REMOVER != 'BOOL') then { USE_AI_REMOVER = false; }; };
                        if (USE_AI_REMOVER) then
                        {
                                {
                                        if ((!isNull group _x) && (getPlayerUID _x == '')) then
                                        {
                                                deleteVehicle _x;
                                        };
                                } forEach (player nearEntities ['Man',100]);
                        };
                }
                else
                {
                        inSafeZone = false;
                };
                uiSleep 2;
                if (!inSafeZone) then
                {
                        call _endSafeZone;
                };
        };
};
if ((USE_AntiSteal) || (USE_SPEEDLIMIT)) then
{
        [] spawn {
                _USE_AntiSteal = USE_AntiSteal;
                _USE_SPEEDLIMIT = USE_SPEEDLIMIT;
                _speedlimit = SPEEDLIMIT;
                while {1 == 1} do
                {
                        if (inSafezone) then
                        {
                                if (_USE_AntiSteal) then
                                {
                                        _cnt = {isPlayer _x && _x != player} count (player nearEntities [['CAManBase'], 3]);
                                        if ((_cnt > 0) && (!isNull (findDisplay 106))) then
                                        {
                                                (findDisplay 106) closedisplay 0;
                                                closeDialog 0;
                                                _log = format['%1 You are not allowed to open Gear while near another player!',name player];
                                                cutText [_log,'PLAIN'];
                                                hint _log;
                                        };
                                };
                                if (_USE_SPEEDLIMIT) then
                                {
                                        _obj = vehicle player;
                                        if !(_obj isKindOf 'Plane') then
                                        {
                                                _speed = abs speed _obj;
                                                if ((_obj != player) && (_speed > _speedlimit)) then
                                                {
                                                        _vel = velocity _obj;
                                                        _x = 0.8;
                                                        if (_speed > 50) then {_x = 0.1;};
                                                        _velNew = [(_vel select 0) * _x, (_vel select 1) * _x,(_vel select 2) * _x];
                                                        _obj SetVelocity _velNew;
                                                };
                                        };
                                };
                        }
                        else
                        {
                                uiSleep 2;
                        };
                        uiSleep 0.1;
                };
        };
}; 

thanks

Link to comment
Share on other sites

  • 0

Set the following:

USE_CANBUILD = false;    // if you don't want to define your own positions
USE_TraderCity = false;  // if you don't want to define your own positions (Epoch 1.0.5)
USE_POSITIONS = true;    // to use own positions and radius

Then the sign will be there.

 

EDIT: Colour markers would be set in the mission.sqm :)

 

Hope this helps :)

Link to comment
Share on other sites

  • 0

Set the following:

USE_CANBUILD = false;    // if you don't want to define your own positions
USE_TraderCity = false;  // if you don't want to define your own positions (Epoch 1.0.5)
USE_POSITIONS = true;    // to use own positions and radius

Then the sign will be there.

 

EDIT: Colour markers would be set in the mission.sqm :)

 

Hope this helps :)

Thank you for your answer!

 

But I meant a bit different markers.. Code like this:

if (isServer) then {
		_trigger spawn _safezoneZonePerm;
	} else {
		_trigger setTriggerStatements ["(vehicle player) in thisList", "call SafeZoneEnable", "call SafeZoneDisable"];

		_marker = createMarkerLocal [format["Safezone%1", _name], _pos];
		_marker setMarkerTextLocal format["Safezone%1", _name];
		_marker setMarkerShapeLocal "ELLIPSE";
		_marker setMarkerTypeLocal "Empty";
		_marker setMarkerColorLocal "ColorGreen";
		_marker setMarkerBrushLocal "Grid";
		_marker setMarkerSizeLocal [_radius, _radius];
	};

But where to put it I don't know :( 

 

Please explain by example :) 

Link to comment
Share on other sites

  • 0

Chris, I don't know if there's an official release thread for this but if not could you make one? Would make it easier for tracking of bugs.

 

There's still the problem where you can't see the inventory slots of a vehicle in a safezone.

Link to comment
Share on other sites

  • 0

Hi I have a problem with the InfiStar Safezone – I want the safe Zone OFF at Hero and Bandit.

 

I am almost 100% sure that they were off at some point – but now they are on……so maybe I am wrong.

 

I have removed these two lines from safezone.cfg so I don’t understand why there is safe zones those to places …… please help

 

[[1606.6443,7803.5156],150,true],

[[12944.227,12766.889],150,true], 

Link to comment
Share on other sites

  • 0

Hi I have a problem with the InfiStar Safezone – I want the safe Zone OFF at Hero and Bandit.

 

I am almost 100% sure that they were off at some point – but now they are on……so maybe I am wrong.

 

I have removed these two lines from safezone.cfg so I don’t understand why there is safe zones those to places …… please help

 

[[1606.6443,7803.5156],150,true],

[[12944.227,12766.889],150,true], 

 

If you have the latest version of the safezone script, then you have two ways of using it....  

1.) Use the default tradercity info = no need to use the list of worldpositions

2.) Use the custom location list = not going to listen to tradercity info and instead use your defined list of positions. 

If you want to remove the Hero/Bandit protection, switch your defined variables at the top to be FALSE for the "Use Tradercity" options and then make sure you dont have the Hero/Bandit locations defined in the position list. 

Link to comment
Share on other sites

  • 0

Hi I have a problem with the InfiStar Safezone – I want the safe Zone OFF at Hero and Bandit.

 

I am almost 100% sure that they were off at some point – but now they are on……so maybe I am wrong.

 

I have removed these two lines from safezone.cfg so I don’t understand why there is safe zones those to places …… please help

 

[[1606.6443,7803.5156],150,true],

[[12944.227,12766.889],150,true], 

you need to change the switches to false for canbuild and trader city and turn positions on like below:

USE_CANBUILD = false;            // if you don't want to define your own positions

USE_TraderCity = false;  //      if you don't want to define your own positions (Epoch 1.0.5)

USE_POSITIONS = true;  // to use own positions and radius

 

Then it will only initiate safezones against the listed coordinates.

Link to comment
Share on other sites

  • 0

If you have the latest version of the safezone script, then you have two ways of using it....  

1.) Use the default tradercity info = no need to use the list of worldpositions

2.) Use the custom location list = not going to listen to tradercity info and instead use your defined list of positions. 

If you want to remove the Hero/Bandit protection, switch your defined variables at the top to be FALSE for the "Use Tradercity" options and then make sure you dont have the Hero/Bandit locations defined in the position list. 

Glen, you beat me to it! :)

Link to comment
Share on other sites

  • 0

Having a time getting the signs to show, anyone else have any tips?
 

USE_CANBUILD = false;	// if you don't want to define your own positions
USE_TraderCity = false;	// if you don't want to define your own positions (Epoch 1.0.5)
USE_POSITIONS = true;	// to use own positions and radius
...
USE_SIGNS = true; // use this to build signs around the SafeZone

_infiSZ =
[
	[[6325.6772,7807.7412],75,true],  	//"Trader City Stary"
	[[4063.4226,11664.19],75,true],   	//"Trader City Bash"
	[[11447.472,11364.504],75,true],  	//"Trader City Klen"
	[[1606.6443,7803.5156],30,true],  	//"Bandit Camp"
	[[12944.227,12766.889],30,true]  	//"Hero Camp"
];
Link to comment
Share on other sites

  • 0

My signs show on my Cherno Server but aren't showing up on my Napf server. I can't figure out why they won't work on Napf. I have done all the combinations possible.

 

Is the positions set up correctly? 

 

In the default Chernarus list, there are no comments added for the positions, so your signs are being shown.

 

 

 

Having a time getting the signs to show, anyone else have any tips?

 

USE_CANBUILD = false;	// if you don't want to define your own positions
USE_TraderCity = false;	// if you don't want to define your own positions (Epoch 1.0.5)
USE_POSITIONS = true;	// to use own positions and radius
...
USE_SIGNS = true; // use this to build signs around the SafeZone

_infiSZ =
[
	[[6325.6772,7807.7412],75,true],  	//"Trader City Stary"
	[[4063.4226,11664.19],75,true],   	//"Trader City Bash"
	[[11447.472,11364.504],75,true],  	//"Trader City Klen"
	[[1606.6443,7803.5156],30,true],  	//"Bandit Camp"
	[[12944.227,12766.889],30,true]  	//"Hero Camp"
];

 

In your case, you have added comments to a closed array, likely confusing things. 

Remove the // lines and you will see that it works. 

If you still want to keep a list to make it easy to remember, simply copy the one you have before you removed the comment, and do like this: 

 

[
	[[6325.6772,7807.7412],75,true],
	[[4063.4226,11664.19],75,true],
	[[11447.472,11364.504],75,true],
	[[1606.6443,7803.5156],30,true],
	[[12944.227,12766.889],30,true]
];

/*
[[6325.6772,7807.7412],75,true],  	//"Trader City Stary"
[[4063.4226,11664.19],75,true],   	//"Trader City Bash"
[[11447.472,11364.504],75,true],  	//"Trader City Klen"
[[1606.6443,7803.5156],30,true],  	//"Bandit Camp"
[[12944.227,12766.889],30,true]  	//"Hero Camp"
*/
Link to comment
Share on other sites

  • 0

In your case, you have added comments to a closed array, likely confusing things. 

Remove the // lines and you will see that it works.

Hrm, well the safe zones are working so I assumed the comments in the array was not the problem, but I will give that a try and see.

Thanks Glenn.

Link to comment
Share on other sites

  • 0

Please note - InfiSTAR has released an updated version of hte safezone script including proper installation instructions.

 

Grab it from his pastebin here: 

 

http://pastebin.com/ht7djVGH

 

Besides from the installation instructions - due you know how this differs from the old one ? Anything new ?

I don’t read code :huh:  – so I don’t have a clue what to look for :( 

 

Well I can see this is new: USE_SPEEDLIMIT = true;

Edited by Luna
Link to comment
Share on other sites

  • 0

Besides from the installation instructions - due you know how this differs from the old one ? Anything new ?

I don’t read code :huh:  – so I don’t have a clue what to look for :( 

 

Well I can see this is new: USE_SPEEDLIMIT = true;

 

Looks like it is the default object used for the signposts and the installation instructions. 

Link to comment
Share on other sites

  • 0

Also I wonder if its possible to use AGN's Anti backpack steal as Infistar is somewhat buggy.

Its still possible for players to take items out of other players backpacks if they are fast enough.

Also i have a lot of players in stary making this really hard for users to open their backpack.

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
×
×
  • Create New...