Hi Voltan, I use this this script made by BigEgg...it works fine, if you use the admin tools that he made, I have disabled safe zones and use this script...
/*
File: safe_zones.sqf
Creates safe zones in predefined areas (DZE_SafeZonePosArray)
/**************************************************** Config ****************************************************/
_bubbles = false; // Creates a circle of bubbles marking the circumference of the safe zone.
_removeZ = true; // Remove zombies in safe zone.
_removeAI = true; // Remove AI in safe zone.
_speedLimit = 0; // Speed limit in safe zones. Set to 0 to disable speed limit.
_preventTheft = true; // Prevent vehicles from being stolen by assigning them an owner (this includes gear).
_timer = 10; // Delay ending safe zone protection for this many seconds upon leaving. Set to 0 to disable timer.
_disableWeps = true; // Drops any weapons in _badWeps array.
_badWeps = [ // Will remove these weapons from the player if they try to select them. Only used if _disableWeps = true.
"Vil_RPG29", "Vil_RPO_A", "Vil_RPG16", "Vil_RPG7V_PGO", "Vil_Panzerfaust3", "M136", "RPG7V", "vil_CG84T", "vilas_rpg22", "vilas_rpg26", "MAAWS", "Vil_RPG7d_PGO",
"RPG18", "MeleeHatchet", "MeleeCrowbar","MeleeMachete", "MeleeFishingPole", "MeleeSledge", "MeleeBaseBallBatNails", "MeleeBaseBallBatBarbed", "MeleeBaseBallBat"
];
/****************************************************************************************************************/
// Needed on both client and server for vehicle protection
fnc_veh_handleDam2 = fnc_veh_handleDam;
fnc_veh_handleDam = {
if ({(_this select 0) distance (_x select 0) <= (_x select 1)} count DZE_SafeZonePosArray > 0 || {(_this select 0) getVariable ["sz_immunity", false]}) exitWith {0};
_this call fnc_veh_handleDam2;
};
if (isServer && {_bubbles}) then {
private "_count";
_count = 0;
{
private ["_pos", "_rad"];
_pos = _x select 0;
_rad = _x select 1;
for "_i" from 0 to 360 step (360 / _rad) do
{
private ["_loc", "_obj"];
{
if ((vehicle player distance (_x select 0)) < (_x select 1)) then {
szpos = _x select 0; // Get the position of the safe zone in which the player is currently in
szrad = _x select 1; // Get the radius of this safe zone
};
} count DZE_SafeZonePosArray;
if (_preventTheft) then {
private "_vehicle";
_vehicle = vehicle player;
if (isNil "fn_gearMenuChecks1") then { // Make sure vehicle gear checks aren't already disabled
fn_gearMenuChecks1 = fn_gearMenuChecks;
};
if (_vehicle != player) then { // Reset owner when entering
if (driver _vehicle == player) then {
private "_owner";
_owner = [];
_owner set [count _owner, getPlayerUID player];
{
if !(getPlayerUID _x in _owner) then {
_owner set [count _owner, getPlayerUID _x];
};
} count (crew _vehicle);
fn_gearMenuChecks = { // Prevent player from accessing gear of vehicles that aren't their's
if (vehicle player == player) then {
private ["_cursorTarget", "_dis"];
disableSerialization;
// Allow group members of the owner to access gear
_deny = true;
{
if (getPlayerUID _x == (_owner select 0)) exitWith {_deny = false;};
} count (units group player);
if (getPlayerUID player in _owner) then {_deny = false};
if (_deny) then {
_display closeDisplay 2;
localize "STR_CL_SZ_GEAR" call dayz_rollingMessages;
};
};
};
// Pass array on to normal gearMenuChecks
_this call fn_gearMenuChecks1;
};
};
if (isNil "fnc_usec_damageHandler1") then {
fnc_usec_damageHandler1 = fnc_usec_damageHandler;
};
fnc_usec_damageHandler = {0}; // God mode
if (isNil "player_zombieCheck1") then {
player_zombieCheck1 = player_zombieCheck;
};
player_zombieCheck = {false}; // No zombie aggro
if (isNil "player_fired1") then {
player_fired1 = player_fired;
};
player_fired = { // Block firing in safe zone
deleteVehicle (_this select 6);
cutText [localize "STR_CL_SZ_FIRE", "WHITE IN"];
};
[_speedLimit, _disableWeps, _badWeps, _preventTheft, _removeZ, _removeAI] spawn {
while {safezone_enabled} do
{
private "_vehicle";
_vehicle = vehicle player;
if (_this select 1) then {
private "_currentWeapon";
_currentWeapon = currentWeapon player;
if (_currentWeapon in (_this select 2)) then {
player action ["dropWeapon", player, _currentWeapon]; // Drops the weapon and the ammo for it
};
};
if (_vehicle != player) then {
// Speed Limit
if ((_this select 0) > 0) then {
if !(_vehicle isKindOf "Air") then {
private "_speed";
_speed = abs(speed _vehicle);
if (_speed > (_this select 0)) then {
private ["_velocity", "_mod"];
_velocity = velocity _vehicle;
_mod = if (_speed > 50) then {0.1} else {0.8};
_vehicle setVelocity [(_velocity select 0) * _mod, (_velocity select 1) * _mod, (_velocity select 2) * _mod];
};
};
};
// Remove player from vehicle if they lack ownership or aren't in owner's group
if (_this select 3) then {
private ["_owner", "_deny"];
_owner = _vehicle getVariable ["Owner", []];
if (driver _vehicle == player && {count _owner == 0}) then { // Set an owner if one doesn't exist
_owner set [count _owner, getPlayerUID player];
_vehicle setVariable ["Owner", _owner, true];
// localize "STR_CL_SZ_OWNER" call dayz_rollingMessages;
};
if (count _owner > 0) then {
_deny = true;
{
if (getPlayerUID _x == (_owner select 0)) exitWith {_deny = false;};
} count (units group player);
if (getPlayerUID player in _owner) then {_deny = false;};
if (_deny) then {
player action ["Eject", _vehicle];
};
};
};
// Prevent player from firing vehicle guns in safe zone
if !(_vehicle getVariable ["safezoneEH", false]) then {
_vehicle setVariable ["safezoneEH", true];
_vehicle addEventHandler ["Fired", {_this call player_fired}];
};
};
// Remove zombies from safe zone
if (_this select 4) then {{deleteVehicle _x;} count (szpos nearEntities ["zZombie_Base", szrad]);};
// Remove AI from safe zone
if (_this select 5) then {
{
if ((!isNull group _x) && (getPlayerUID _x == '')) then {deleteVehicle _x;};
} count (szpos nearEntities ["Man", szrad]);
};
// Prevent player from being unconscious in safe zone
{
player setVariable [_x, false, false];
} count ["NORRN_unconscious", "USEC_isCardiac"];