Jump to content
  • 0

infiSTAR Safezones


CoxyzHQ

Question

Recommended Posts

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

 

I dont know if you should run two parallel safezone scripts. 

 

Fast enough getting in to your backpack? You cant even open the backpack dialogue if a player is too close.   :)  If you are running a recent version of the safezones script from Infistar, I would be very curious on how you manage to open the gear with a player within 3 meters from you - provided  you have the antibackpack system turned on. 

Link to comment
Share on other sites

  • 0

I dont know if you should run two parallel safezone scripts. 

 

Fast enough getting in to your backpack? You cant even open the backpack dialogue if a player is too close.   :)  If you are running a recent version of the safezones script from Infistar, I would be very curious on how you manage to open the gear with a player within 3 meters from you - provided  you have the antibackpack system turned on. 

No, just recode Infistars with AGN's.

Its really hard for all my players to open their gear.

Link to comment
Share on other sites

  • 0

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.

Removing the comments from the array had no effect; still no signs at any safe zone. The safe zones work just fine, I just get no signs. Very odd.

Link to comment
Share on other sites

  • 0

Removing the comments from the array had no effect; still no signs at any safe zone. The safe zones work just fine, I just get no signs. Very odd.

Have you managed to get this working? I'm working on the same and having the same issue.

Removed comments from the script file in Trader City coordinates section (of course) didn't make any difference.

Link to comment
Share on other sites

  • 0

Removing the comments from the array had no effect; still no signs at any safe zone. The safe zones work just fine, I just get no signs. Very odd.

 

 

i've seen on some servers that there are little red orbs on the perimeter of their safezones. is there a way to get infistar to do this?

 

 

Have you managed to get this working? I'm working on the same and having the same issue.

Removed comments from the script file in Trader City coordinates section (of course) didn't make any difference.

 

I had this working before but removed them again as it became a trader camping nightmare but, any way....

 

I seem to remember that you need to use:

USE_POSITIONS = true;

have these set to false:

USE_CANBUILD = false; 
USE_TraderCity = false;

This, obviously set to true:

USE_SIGNS = true;

Then fill in the coords of your safezones e.g.:

_infiSZ =
[
[[6325.6772,7807.7412],175,true], 
[[4063.4226,11664.19],175,true],
[[11447.472,11364.504],175,true],
[[1606.6443,7803.5156],150,true],
[[12944.227,12766.889],150,true],
[[12062.9,12636],100,true]
];

//(or in mgm's case [[6325.6772,7807.7412],150000,true].......... lol :D (please don't add this line anyone...))

 

Well that worked for me last time I had it switched on anyway....haven't tried it on the latest update (in case that may be the problem...)

 

good luck! :)

Link to comment
Share on other sites

  • 0

I had this working before but removed them again as it became a trader camping nightmare but, any way....

 

I seem to remember that you need to use:

USE_POSITIONS = true;
have these set to false:

USE_CANBUILD = false; 
USE_TraderCity = false;
This, obviously set to true:

USE_SIGNS = true;
Then fill in the coords of your safezones e.g.:

_infiSZ =
[
[[6325.6772,7807.7412],175,true], 
[[4063.4226,11664.19],175,true],
[[11447.472,11364.504],175,true],
[[1606.6443,7803.5156],150,true],
[[12944.227,12766.889],150,true],
[[12062.9,12636],100,true]
];
//(or in mgm's case [[6325.6772,7807.7412],150000,true].......... lol :D (please don't add this line anyone...))

 

Well that worked for me last time I had it switched on anyway....haven't tried it on the latest update (in case that may be the problem...)

 

good luck! :)

lol it was only 1500 (meters) and it DID resolve the stary clustering issue :)

There are at least three editions of the same file. I tried with each (the exact setup above). None worked.

If you still have the working script file in your backups, do you mind sharing?

Do you have the full blown infiSTAR - is it somehow required? (Because I have nothing from infiSTAR but this script)

Link to comment
Share on other sites

  • 0

lol it was only 1500 (meters) and it DID resolve the stary clustering issue :)

There are at least three editions of the same file. I tried with each (the exact setup above). None worked.

If you still have the working script file in your backups, do you mind sharing?

Do you have the full blown infiSTAR - is it somehow required? (Because I have nothing from infiSTAR but this script)

Sorry mgm, was only pulling your leg! :)

 

Haven't got the old files, sorry, had a purge of old stuff I didn't need anymore to save SSD space!

 

I am using infiSTAR as well....not sure whether it leans off that as I can't read code, sorry.

 

I'm sure Chris of infistar would help.....if he has time with all the recent hackers!

Link to comment
Share on other sites

  • 0

No you dont need infistar to use the safezone script. I just tested it. If you're still having problems you can use my safezone.sqf as example and just edit as requred.

 

Max

 

 

/*


by: http://infiSTAR.de || http://DayzAntiHack.com
*updated on 08.08.2014

Instructions:
1. Copy paste this pastebin code into a file called SafeZone.sqf - save the file.
2. Now extract your mpmission pbo and put the SafeZone.sqf into the extracted folder.
3. Open the init.sqf of the mpmission.
4. At the bottom of the file add
[] execVM 'SafeZone.sqf';
5. Save the init.sqf, repack your mpmission, upload it to your gameserver and restart your server
*/
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 = true; // 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 = false; // 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 =
[
[[6325.6772,7807.7412],150,true],
[[4063.4226,11664.19],150,true],
[[11447.472,11364.504],150,true],
[[1606.6443,7803.5156],100,true],
[[12944.227,12766.889],100,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 ['Sign_sphere100cm_EP1', _location, [], 0, 'CAN_COLLIDE'];
// _object = createVehicle ['SignM_FARP_Winchester_EP1', _location, [], 0, 'CAN_COLLIDE'];
// _object setVehicleInit 'this setObjectTexture [0,''Addons\SafeZones\sign.paa''];';
_object setDir _dir;
};
};
} 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! No Ramming or stealing! Read rules at www.mercsgaming.com';
hint _msg;
taskHint [_msg, [0,1,0,1], 'taskDone'];
inNow = nil;
outNow = true;

if (LOG_EnterLeave) then
{
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]);
cutText ['You can not fire in a SafeZone!','WHITE IN'];
};
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;
};
};
if (isNil 'oR3F_TIRED_FNCT_Voile_Noir') then {oR3F_TIRED_FNCT_Voile_Noir = R3F_TIRED_FNCT_Voile_Noir;};
if (isNil 'oR3F_TIRED_FNCT_DoBlackVanish') then {oR3F_TIRED_FNCT_DoBlackVanish = R3F_TIRED_FNCT_DoBlackVanish;};
R3F_TIRED_FNCT_Voile_Noir = {};
R3F_TIRED_FNCT_DoBlackVanish = {};
};
_endSafeZone =
{
if (isNil 'inNow') then
{
if (str fnc_usec_damageHandler == '{}') then
{
_msg = 'You left the Safe Zone. Have a nice day!';
hint _msg;
taskHint [_msg, [1,0,0.1,1], 'taskFailed'];
};
inNow = true;
outNow = nil;

if (LOG_EnterLeave) then
{
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;} ];
};
if (!isNil 'oR3F_TIRED_FNCT_Voile_Noir') then {R3F_TIRED_FNCT_Voile_Noir = oR3F_TIRED_FNCT_Voile_Noir;};
if (!isNil 'oR3F_TIRED_FNCT_DoBlackVanish') then {R3F_TIRED_FNCT_DoBlackVanish = oR3F_TIRED_FNCT_DoBlackVanish;};
};
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;
};
};
};

Link to comment
Share on other sites

  • 0

By looking at the script it seems you just need to create a new file (name it anything safezone.sqf with the info from the pastebin, paste it into whatever directory you want then call it with

 

[] execVM "custom\safezone\safezone.sqf";

 

 

Speaking of this safezone, does anyone have cords for it for Napf or does it autodetect?

This is for ALL napf traders;

_infiSZ =
[
	[[8246.3184,15.544708,15485.867],100,true],
	[[15506.952,6.2226005,13229.368],100,true],
	[[12399.751,216.42809,5074.5273],100,true],
	[[10398.626,105.61282,8279.4619],100,true],
	[[5149.9814,71.601753,4864.1191],100,true],
	[[2122.7954,13.000834,7807.9878],100,true],
	[[5379.0342,4.9903588,16103.187],100,true],
	[[6772.8877,0.45900518,16983.27],100,true],
	[[16839.973,0.43266046,5264.0566],100,true],
	[[15128.379,19.974716,16421.879],100,true]
];
Link to comment
Share on other sites

  • 0

No you dont need infistar to use the safezone script. I just tested it. If you're still having problems you can use my safezone.sqf as example and just edit as requred.

 

Max

<snip>

 

Max,

 

I tried the code you provided above and also tried the 28th August code from infiSTAR Chris's pastebin repo.

None of them work with my scripts so something is getting in the way I suppose.

 

I will see if I can find another "safe zone boundary marker/bubble" script...

 

Thanks  for the help!

Link to comment
Share on other sites

  • 0

Tried this safezone but i cant get it to work.

Placed a map safezones in my mission folder, put the safezone.sqf in there (i used the USE_TraderCity = true; option) and called it in my init.sqf

 

Maybe i don't understand what this script actually does but zombies can still kill me inside (so no god mode) and i can fire my weapon at other players and kill them.

My server is a Taviana Overpoch (PvE) one.

 

Any help appreciated

Link to comment
Share on other sites

  • 0

Tried this safezone but i cant get it to work.

Placed a map safezones in my mission folder, put the safezone.sqf in there (i used the USE_TraderCity = true; option) and called it in my init.sqf

 

Maybe i don't understand what this script actually does but zombies can still kill me inside (so no god mode) and i can fire my weapon at other players and kill them.

My server is a Taviana Overpoch (PvE) one.

 

Any help appreciated

Yes, try it using coordinates. That works for me.

Link to comment
Share on other sites

  • 0

See as I've told you, the blinking reward window isn't your only issue :P

I know how to fix this, UKMartin should know this too. So how about a little apology to those people and be a nice member of this community ;)

Then I will tell you how to fix this or you can try it on your own :)

Link to comment
Share on other sites

  • 0

See as I've told you, the blinking reward window isn't your only issue :P

I know how to fix this, UKMartin should know this too. So how about a little apology to those people and be a nice member of this community ;)

Then I will tell you how to fix this or you can try it on your own :)

 

 

Blank

Link to comment
Share on other sites

  • 0

I have installed this and its working great but there is a downfall, I did have walking dead GTX Mod rather than running dead and they have stopped walking and are now running, can anyone help me fix the problem?

 

thanks in advance

Judith

The problem is infiSTAR's safe zone script calls the wild_spawnZombies and zombie_generate so no zombies are spawned by a player in a safe zone. While this is good it does mess with any script that uses custom zombie sqf's.

 

What you need to do is find these 4 lines and remove them

 

wild_spawnZombies = {};

zombie_generate = {};

 

wild_spawnZombies = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\wild_spawnZombies.sqf';

zombie_generate = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\zombie_generate.sqf';

 

This will fix your problem.

 

It will look like this

/*
   by: http://infiSTAR.de || http://DayzAntiHack.com
   *updated on 24.12.2014
       
        Instructions:
        1. Copy paste this pastebin code into a file called SafeZone.sqf - save the file.
        2. Now extract your mpmission pbo and put the SafeZone.sqf into the extracted folder.
        3. Open the init.sqf of the mpmission.
        4. At the bottom of the file add
        [] execVM 'SafeZone.sqf';
        5. Save the init.sqf, repack your mpmission, upload it to your gameserver and restart your server
*/
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 = 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 =
[
        [[6325.6772,7807.7412,0],150,true],
        [[4063.4226,11664.19,0],150,true],
        [[11447.472,11364.504,0],150,true],
        [[1606.6443,7803.5156,0],150,true],
        [[12944.227,12766.889,0],150,true],
        [[5068.6636,9723.4248,0],100,true],
        [[12060,12640,0],200,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 ['Sign_sphere100cm_EP1', _location, [], 0, 'CAN_COLLIDE'];
                                        //      _object = createVehicle ['SignM_FARP_Winchester_EP1', _location, [], 0, 'CAN_COLLIDE'];
                                        //      _object setVehicleInit 'this setObjectTexture [0,''Addons\SafeZones\sign.paa''];';
                                        _object setDir _dir;
                                };
                        };
                } forEach _infiSZ;
        };
};
waitUntil {((!isNil 'dayz_animalCheck') || (!isNil 'dayz_medicalH') || (!isNil 'dayz_slowCheck') || (!isNil 'dayz_gui'))};
if (isNil 'inSafeZone') then { inSafeZone = false; } else { if (typename inSafeZone != 'BOOL') 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
                        {
                                PVDZE_send = [player,'SafeZoneState',[1]];
                                publicVariableServer 'PVDZE_send';
                        };
                };
                player_fired = {
                        deleteVehicle (nearestObject [_this select 0,_this select 4]);
                        cutText ['You can not fire in a SafeZone!','WHITE IN'];
                };
               
                fnc_usec_damageHandler = {};
                player removeAllEventHandlers 'handleDamage';
                player addEventHandler ['handleDamage', {false}];
                player allowDamage false;
                _veh = vehicle player;
                _szs = _veh getVariable ['inSafeZone',0];
                if (_szs == 0) then
                {
                        _veh setVariable ['inSafeZone',1,true];
                        if (player != _veh) then
                        {
                                _veh removeAllEventHandlers 'Fired';
                                _veh addEventHandler ['Fired', {_this call player_fired;}];
                                {
                                        _x removeAllEventHandlers 'Fired';
                                        _x addEventHandler ['Fired', {_this call player_fired;}];
                                } forEach (crew _veh);
                                vehicle_handleDamage = {false};
                                _veh removeAllEventHandlers 'HandleDamage';
                                _veh addeventhandler ['HandleDamage',{ _this call vehicle_handleDamage } ];
                                _veh allowDamage false;
                        };
                };
                _notInSafeZone =
                [
                        'MAAWS','RPG7V','M136','RPG18','STINGER',
                        'MeleeHatchet_DZE','MeleeHatchet','MeleeCrowbar','MeleeMachete','MeleeFishingPole','MeleeSledge',
                        'MeleeBaseBallBatNails','MeleeBaseBallBatBarbed','MeleeBaseBallBat'
                ];
                _cwep = currentWeapon player;
                if (_cwep in _notInSafeZone) 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
                        {
                                PVDZE_send = [player,'SafeZoneState',[0]];
                                publicVariableServer 'PVDZE_send';
                        };
                };
               
               
                player_fired = {
                        _this call compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\player_fired.sqf';
                        _unit = _this select 0;
                        _weapon = _this select 1;
                        _muzzle = _this select 2;
                        _mode = _this select 3;
                        _ammo = _this select 4;
                        _magazine = _this select 5;
                        _projectile = _this select 6;
                        _screenToWorld = screenToWorld [0.5,0.5];
                        _near = _screenToWorld nearEntities ['AllVehicles',100];
                        {
                                if (isPlayer _x) then
                                {
                                        _szs = _x getVariable ['inSafeZone',0];
                                        if (_szs == 1) then
                                        {
                                                deleteVehicle (nearestObject [_unit,_ammo]);
                                        };
                                };
                        } forEach _near;
                };
               
                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';
                vehicle_handleDamage = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\vehicle_handleDamage.sqf';
               
                _veh = vehicle player;
                _szs = _veh getVariable ['inSafeZone',0];
                if (_szs == 1) then
                {
                        _veh setVariable ['inSafeZone',0,true];
                        if (player != _veh) then
                        {
                                _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
        {
                if (isNil 'inSafeZone') then { inSafeZone = false; } else { if (typename inSafeZone != 'BOOL') then { inSafeZone = false; }; };
                _state = false;
                if (isNil 'USE_POSITIONS') then { USE_POSITIONS = false; } else { if (typename USE_POSITIONS != 'BOOL') then { USE_POSITIONS = false; }; };
                if (USE_POSITIONS) then
                {
                        {
                                _z = _x select 0;
                                _r = _x select 1;
                                if ((vehicle player) distance _z < _r) then {_state = true;};
                        } forEach _infiSZ;
                };
                if (isNil 'USE_CANBUILD') then { USE_CANBUILD = true; } else { if (typename USE_CANBUILD != 'BOOL') then { USE_CANBUILD = true; }; };
                if (USE_CANBUILD) then
                {
                        if (isNil 'canbuild') then { canbuild = true; } else { if (typename canbuild != 'BOOL') then { canbuild = true; }; };
                        if (!canbuild) then {_state = true;};
                };
                if (isNil 'USE_TraderCity') then { USE_TraderCity = true; } else { if (typename USE_TraderCity != 'BOOL') then { USE_TraderCity = true; }; };
                if (USE_TraderCity) then
                {
                        if (isNil 'isInTraderCity') then { isInTraderCity = false; } else { if (typename isInTraderCity != 'BOOL') then { isInTraderCity = false; }; };
                        if (isInTraderCity) then {_state = true;};
                };
                if (_state) then
                {
                        inSafeZone = true;
                        call _startSafeZone;
                        {
                                if (!isNull _x) then
                                {
                                        if !(isPlayer _x) then
                                        {
                                                deletevehicle _x;
                                        };
                                };
                        } forEach ((vehicle player) nearEntities ['zZombie_Base',50]);
                       
                        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'],4]);
                                        if ((_cnt > 0) && (!isNull (findDisplay 106))) then
                                        {
                                                (findDisplay 106) closedisplay 0;
                                                closeDialog 0;closeDialog 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 .01;
                };
        };
}; 

Link to comment
Share on other sites

  • 0

The problem is infiSTAR's safe zone script calls the wild_spawnZombies and zombie_generate so no zombies are spawned by a player in a safe zone. While this is good it does mess with any script that uses custom zombie sqf's.

 

What you need to do is find these 4 lines and remove them

 

wild_spawnZombies = {};

zombie_generate = {};

 

wild_spawnZombies = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\wild_spawnZombies.sqf';

zombie_generate = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\zombie_generate.sqf';

 

This will fix your problem.

 

It will look like this

/*
   by: http://infiSTAR.de || http://DayzAntiHack.com
   *updated on 24.12.2014
       
        Instructions:
        1. Copy paste this pastebin code into a file called SafeZone.sqf - save the file.
        2. Now extract your mpmission pbo and put the SafeZone.sqf into the extracted folder.
        3. Open the init.sqf of the mpmission.
        4. At the bottom of the file add
        [] execVM 'SafeZone.sqf';
        5. Save the init.sqf, repack your mpmission, upload it to your gameserver and restart your server
*/
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 = 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 =
[
        [[6325.6772,7807.7412,0],150,true],
        [[4063.4226,11664.19,0],150,true],
        [[11447.472,11364.504,0],150,true],
        [[1606.6443,7803.5156,0],150,true],
        [[12944.227,12766.889,0],150,true],
        [[5068.6636,9723.4248,0],100,true],
        [[12060,12640,0],200,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 ['Sign_sphere100cm_EP1', _location, [], 0, 'CAN_COLLIDE'];
                                        //      _object = createVehicle ['SignM_FARP_Winchester_EP1', _location, [], 0, 'CAN_COLLIDE'];
                                        //      _object setVehicleInit 'this setObjectTexture [0,''Addons\SafeZones\sign.paa''];';
                                        _object setDir _dir;
                                };
                        };
                } forEach _infiSZ;
        };
};
waitUntil {((!isNil 'dayz_animalCheck') || (!isNil 'dayz_medicalH') || (!isNil 'dayz_slowCheck') || (!isNil 'dayz_gui'))};
if (isNil 'inSafeZone') then { inSafeZone = false; } else { if (typename inSafeZone != 'BOOL') 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
                        {
                                PVDZE_send = [player,'SafeZoneState',[1]];
                                publicVariableServer 'PVDZE_send';
                        };
                };
                player_fired = {
                        deleteVehicle (nearestObject [_this select 0,_this select 4]);
                        cutText ['You can not fire in a SafeZone!','WHITE IN'];
                };
               
                fnc_usec_damageHandler = {};
                player removeAllEventHandlers 'handleDamage';
                player addEventHandler ['handleDamage', {false}];
                player allowDamage false;
                _veh = vehicle player;
                _szs = _veh getVariable ['inSafeZone',0];
                if (_szs == 0) then
                {
                        _veh setVariable ['inSafeZone',1,true];
                        if (player != _veh) then
                        {
                                _veh removeAllEventHandlers 'Fired';
                                _veh addEventHandler ['Fired', {_this call player_fired;}];
                                {
                                        _x removeAllEventHandlers 'Fired';
                                        _x addEventHandler ['Fired', {_this call player_fired;}];
                                } forEach (crew _veh);
                                vehicle_handleDamage = {false};
                                _veh removeAllEventHandlers 'HandleDamage';
                                _veh addeventhandler ['HandleDamage',{ _this call vehicle_handleDamage } ];
                                _veh allowDamage false;
                        };
                };
                _notInSafeZone =
                [
                        'MAAWS','RPG7V','M136','RPG18','STINGER',
                        'MeleeHatchet_DZE','MeleeHatchet','MeleeCrowbar','MeleeMachete','MeleeFishingPole','MeleeSledge',
                        'MeleeBaseBallBatNails','MeleeBaseBallBatBarbed','MeleeBaseBallBat'
                ];
                _cwep = currentWeapon player;
                if (_cwep in _notInSafeZone) 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
                        {
                                PVDZE_send = [player,'SafeZoneState',[0]];
                                publicVariableServer 'PVDZE_send';
                        };
                };
               
               
                player_fired = {
                        _this call compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\player_fired.sqf';
                        _unit = _this select 0;
                        _weapon = _this select 1;
                        _muzzle = _this select 2;
                        _mode = _this select 3;
                        _ammo = _this select 4;
                        _magazine = _this select 5;
                        _projectile = _this select 6;
                        _screenToWorld = screenToWorld [0.5,0.5];
                        _near = _screenToWorld nearEntities ['AllVehicles',100];
                        {
                                if (isPlayer _x) then
                                {
                                        _szs = _x getVariable ['inSafeZone',0];
                                        if (_szs == 1) then
                                        {
                                                deleteVehicle (nearestObject [_unit,_ammo]);
                                        };
                                };
                        } forEach _near;
                };
               
                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';
                vehicle_handleDamage = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\vehicle_handleDamage.sqf';
               
                _veh = vehicle player;
                _szs = _veh getVariable ['inSafeZone',0];
                if (_szs == 1) then
                {
                        _veh setVariable ['inSafeZone',0,true];
                        if (player != _veh) then
                        {
                                _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
        {
                if (isNil 'inSafeZone') then { inSafeZone = false; } else { if (typename inSafeZone != 'BOOL') then { inSafeZone = false; }; };
                _state = false;
                if (isNil 'USE_POSITIONS') then { USE_POSITIONS = false; } else { if (typename USE_POSITIONS != 'BOOL') then { USE_POSITIONS = false; }; };
                if (USE_POSITIONS) then
                {
                        {
                                _z = _x select 0;
                                _r = _x select 1;
                                if ((vehicle player) distance _z < _r) then {_state = true;};
                        } forEach _infiSZ;
                };
                if (isNil 'USE_CANBUILD') then { USE_CANBUILD = true; } else { if (typename USE_CANBUILD != 'BOOL') then { USE_CANBUILD = true; }; };
                if (USE_CANBUILD) then
                {
                        if (isNil 'canbuild') then { canbuild = true; } else { if (typename canbuild != 'BOOL') then { canbuild = true; }; };
                        if (!canbuild) then {_state = true;};
                };
                if (isNil 'USE_TraderCity') then { USE_TraderCity = true; } else { if (typename USE_TraderCity != 'BOOL') then { USE_TraderCity = true; }; };
                if (USE_TraderCity) then
                {
                        if (isNil 'isInTraderCity') then { isInTraderCity = false; } else { if (typename isInTraderCity != 'BOOL') then { isInTraderCity = false; }; };
                        if (isInTraderCity) then {_state = true;};
                };
                if (_state) then
                {
                        inSafeZone = true;
                        call _startSafeZone;
                        {
                                if (!isNull _x) then
                                {
                                        if !(isPlayer _x) then
                                        {
                                                deletevehicle _x;
                                        };
                                };
                        } forEach ((vehicle player) nearEntities ['zZombie_Base',50]);
                       
                        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'],4]);
                                        if ((_cnt > 0) && (!isNull (findDisplay 106))) then
                                        {
                                                (findDisplay 106) closedisplay 0;
                                                closeDialog 0;closeDialog 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 .01;
                };
        };
}; 

 

Blank

Link to comment
Share on other sites

  • 0

It's hard to tell, what the actual Problem is now, because people post different Problems, sometimes find a solution and not share it, etc.. This is Topic is messy.

However, removing those Lines:

wild_spawnZombies = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\wild_spawnZombies.sqf';

zombie_generate = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\zombie_generate.sqf';

will cause your server / player to malfunction, as those Lines are used to recompile these Functions, so that if you leave the Safezone the Zombies will continue spawn.

 

The Part that actually deleted Zombies is this:

if (_state) then
                {
                        inSafeZone = true;
                        call _startSafeZone;
                        {
                                if (!isNull _x) then
                                {
                                        if !(isPlayer _x) then
                                        {
                                                deletevehicle _x;
                                        };
                                };
                        } forEach ((vehicle player) nearEntities ['zZombie_Base',50]);

If that is not working for you, you might want to:

 

  • Check your BattleEye Filters
  • Check your AntiHack Configurations
  • Make sure the script is in the Right Position and being called
Link to comment
Share on other sites

  • 0

It is not hard to tell what his problem was at all. He had slow zeds installed and after installing infiSTAR safe zone the zeds started to run.

 

His slow zeds script uses wild_spawnZombies.sqf and zombie_generate.sqf and his script was getting overwritten by the safe zone.

 

Removing those 4 lines causes no harm as all it does is removes zeds from spawning when you enter the safe zone and then recompile so they start spawning again after leaving the safe zone.

 

If he wanted to keep this setup in he would change the file path to his wild_spawnZombies.sqf and zombie_generate.sqf so after leaving the safe zone the zeds continue to walk slow.

 

Enter safe zone and no zeds will spawn off that player

 

wild_spawnZombies = {};
zombie_generate = {};

 

Exit safe zone and now they start spawning off that player

 

wild_spawnZombies = compile preprocessFileLineNumbers 'path\wild_spawnZombies.sqf';
zombie_generate = compile preprocessFileLineNumbers 'path\zombie_generate.sqf';

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