Jump to content

1.6 Safezone


juandayz

Recommended Posts

@juandayz Thanks for sharing this script,I have adapted it for Sauerland, but I am having issues with DZAI patrolling helicopters attacking players and their vehicles inside a safe zone, sometimes resulting in people's vehicles being blown up if they aren't in it. Is there any way I can fix this? 

Maybe if I can despawn Ai vehicles within a certain range from traders? Not sure best method for avoiding this problem?

Link to comment
Share on other sites

  On 5/3/2017 at 12:34 AM, Voltan said:

@juandayz Thanks for sharing this script,I have adapted it for Sauerland, but I am having issues with DZAI patrolling helicopters attacking players and their vehicles inside a safe zone, sometimes resulting in people's vehicles being blown up if they aren't in it. Is there any way I can fix this? 

Maybe if I can despawn Ai vehicles within a certain range from traders? Not sure best method for avoiding this problem?

Expand  

try set it

USE_AI_REMOVER = false; 

as true. to remove any ai in safezones.

Link to comment
Share on other sites

  On 5/3/2017 at 12:37 AM, Voltan said:

I already have that set, but I don't think it works if the AI is in a vehicle, only if they are on foot?

Expand  
 if (USE_AI_REMOVER) then
            {
                {
                    if ((!isNull group _x) && (getPlayerUID _x == '')) then
                    {
                        deleteVehicle _x;
                    };
                } forEach (player nearEntities ['Man',100]);
            };

heres the code, i think iy gonna delete the ai, and the helicopter gonna getdown.. anyway you can try change the distance amount.

 ['Man',100]

by

 ['Man',250]

to see what happend

Link to comment
Share on other sites

  On 5/3/2017 at 12:40 AM, juandayz said:
 if (USE_AI_REMOVER) then
            {
                {
                    if ((!isNull group _x) && (getPlayerUID _x == '')) then
                    {
                        deleteVehicle _x;
                    };
                } forEach (player nearEntities ['Man',100]);
            };

heres the code, i think iy gonna delete the ai, and the helicopter gonna getdown.. anyway you can try change the distance amount.

 ['Man',100]

by

 ['Man',250]

to see what happend

Expand  

Thanks, will test it out!

Link to comment
Share on other sites

@Voltan I had this problem in 1051, this is what i did to stop the DZAI being dicks. And good fun watching the AI fall from the sky lol

This just deletes the specified vehicles when they come within 1km from traders.

You can use any vehicles just make sure you don't allow players to use them. That's why I used the Taki Huey and one of the Unarmed SUV variants.

In DZAI

DZAI_heliList = [
	["UH1H_TK_EP1",2]
	];
DZAI_vehList = [
	["SUV_UN_EP1",5]
];

 

Then in safezones.sqf

Under

USE_AI_REMOVER = true;	

Paste

USE_HUEY_REMOVER = true; 
USE_SUV_REMOVER = true; 

Find

} forEach ((vehicle player) nearEntities ['zZombie_Base',100]);

Paste below that

  Reveal hidden contents

 

Link to comment
Share on other sites

  On 5/9/2017 at 3:48 AM, oldmatechoc said:

@Voltan I had this problem in 1051, this is what i did to stop the DZAI being dicks. And good fun watching the AI fall from the sky lol

This just deletes the specified vehicles when they come within 1km from traders.

You can use any vehicles just make sure you don't allow players to use them. That's why I used the Taki Huey and one of the Unarmed SUV variants.

 

Expand  

My Heli list and vehicle list is pretty big, is there an easy way to just include the whole array instead of individually naming each vehicle in the safezone.sqf?

Link to comment
Share on other sites

@Voltan not really. I used just the two different types so players could spot ai from players easily. all my ai wore stalker skins and could only drive those two vehicles. so players figured that out pretty fast. stopped them always having to ask if the heli was friendly and having to ask if it was a player or not lol

Link to comment
Share on other sites

  On 5/9/2017 at 4:30 AM, Voltan said:

My Heli list and vehicle list is pretty big, is there an easy way to just include the whole array instead of individually naming each vehicle in the safezone.sqf?

Expand  

Sure you can. Make two global arrays, for example in your variables.sqf and add all choppers and vehicles you have on your server and then whenever you need that list you can set this to the array.
Example:

globalVehArray = ["Some_cars","Some_cars"];

And then in your script:

_myScriptVehArray = globalVehArray;

Link to comment
Share on other sites

  On 5/9/2017 at 5:03 AM, DAmNRelentless said:

Sure you can. Make two global arrays, for example in your variables.sqf and add all choppers and vehicles you have on your server and then whenever you need that list you can set this to the array.
Example:

globalVehArray = ["Some_cars","Some_cars"];

And then in your script:

_myScriptVehArray = globalVehArray;

Expand  

He still has to list all the vehicles in his mission file though. which is what i think he is trying to avoid. Not sure. Be easier to add it in the safezone script though.

Link to comment
Share on other sites

  On 5/3/2017 at 12:34 AM, Voltan said:

@juandayz Thanks for sharing this script,I have adapted it for Sauerland, but I am having issues with DZAI patrolling helicopters attacking players and their vehicles inside a safe zone, sometimes resulting in people's vehicles being blown up if they aren't in it. Is there any way I can fix this? 

Maybe if I can despawn Ai vehicles within a certain range from traders? Not sure best method for avoiding this problem?

Expand  

@Voltan ... as I remember, you can set blacklist area in your config. This prevents patrols attacking player at all. Default blacklist range around traders is 200m (I gues) which is not enough for heli patrols - you need adjust it.

Link to comment
Share on other sites

Napf coordinates: 

 

[
    [[8246,15,15490],150,true],//Trader City Lenzburg
    [[12397,216,5068],150,true],//Trader City Schratten
    [[15520,5,13225],150,true],//Trader city Emmen
    [[10404,106,8282],150,true],//Bandit Vendor
    [[5150,71,4862],150,true],//Hero Vendor
    [[2125,13,7807],150,true],//West Wholesaler
    [[15128,19,16421],150,true],//AWOLs Airfield
	[[5372,5,16091],150,true],//NorthWholesaler
	[[6776,0,16955],150,true],//NorthBoatVendor
	[[16835,-2,5268],150,true]//Pauls Boats
];
How to mark the radius?
Example: 
Red balls
Thanks info

@juandayz

Link to comment
Share on other sites

@harcosgoogle if u have the red balls then just

USE_SIGNS = true; 

 

and if u want custom signs .. then uncoment the lines below and comment the first line.

_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''];';

Link to comment
Share on other sites

@juandayz

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 = 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 = 50;        // 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)

It is activated but I can not see it

Link to comment
Share on other sites

i can confirm the spheres works well @harcosgoogle .

this is my code:

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 = 25;        // 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],//stary
    [[4063.4226,11664.19,0],150,true],//bash
    [[11447.472,11364.504,0],150,true],//klen
    [[1606.6443,7803.5156,0],150,true],//bandit
    [[12944.227,12766.889,0],150,true],//hero
    [[4361.4937,2259.9526,0],50,true],//wholesalerSouth
    [[12060,12640,0],200,true]//air dealear
];

and my call in init.sqf

	waitUntil {scriptDone progress_monitor};
	cutText ["","BLACK IN", 3];
	3 fadeSound 1;
	3 fadeMusic 1;
	endLoadingScreen;
};
//default init above
//call safezone below

 [] execVM "safezones.sqf";// i use this call because i have placed the safezones.sqf in the root of mpmissions\my instance\

 

Link to comment
Share on other sites

  • 1 month later...

I do not know how important it is, but just noticed:

waitUntil {((!isNil 'dayz_animalCheck') || (!isNil 'dayz_medicalH') || (!isNil 'dayz_slowCheck') || (!isNil 'dayz_gui'))};

but

- Duplicate functions have been renamed:
	- dayz_gui --> sched_gui

 

Link to comment
Share on other sites

  • 1 month later...

This is how I got my spheres.

In my custom buildings folder server side file name safezone.sqf

  Reveal hidden contents

at bottom of server_functions.sqf

  Reveal hidden contents

last in my configVariables add

  Reveal hidden contents

Fix to match your traders.

Link to comment
Share on other sites

  • 2 weeks later...

Hey there!

How can I reduce the radius for leaving the safezone? I changed 

[[6325.6772,7807.7412,0],150,true],//stary
[[4063.4226,11664.19,0],150,true],//bash
[[11447.472,11364.504,0],150,true],//klen
[[1606.6443,7803.5156,0],150,true],//bandit
[[12944.227,12766.889,0],150,true],//hero
[[12060,12640,0],200,true]//air dealear

into

[[6325.6772,7807.7412,0],100,true],//stary
[[4063.4226,11664.19,0],100,true],//bash
[[11447.472,11364.504,0],100,true],//klen
[[1606.6443,7803.5156,0],100,true],//bandit
[[12944.227,12766.889,0],100,true],//hero
[[12060,12640,0],100,true]//air dealear

and I enter the safe zones when getting in a radius of 100 but leaving it after way more then 100...

Link to comment
Share on other sites

  On 9/2/2017 at 9:08 PM, Aelenia said:

Hey there!

How can I reduce the radius for leaving the safezone? I changed 

[[6325.6772,7807.7412,0],150,true],//stary
[[4063.4226,11664.19,0],150,true],//bash
[[11447.472,11364.504,0],150,true],//klen
[[1606.6443,7803.5156,0],150,true],//bandit
[[12944.227,12766.889,0],150,true],//hero
[[12060,12640,0],200,true]//air dealear

into

[[6325.6772,7807.7412,0],100,true],//stary
[[4063.4226,11664.19,0],100,true],//bash
[[11447.472,11364.504,0],100,true],//klen
[[1606.6443,7803.5156,0],100,true],//bandit
[[12944.227,12766.889,0],100,true],//hero
[[12060,12640,0],100,true]//air dealear

and I enter the safe zones when getting in a radius of 100 but leaving it after way more then 100...

Expand  

is it the actual safe zone, or just the message

class Item0
        {
            position[]={4063,365,11664};
            TRGDEF
            name="zonebash";
            expCond="(player distance zonebash) < 300;";
            expActiv="[""trader city Bash"",true,""enter""] call player_traderCity;";
            expDesactiv="[""trader city Bash"",true,""leave""] call player_traderCity;";
        };

located in mission.sqm--- could be what your seeing?

Link to comment
Share on other sites

@DieTanx In mission.sqm it's also set to 100 (didn't change anything in there though)

 

class Item0
        {
            position[]={6325,304,7807};
            TRGDEF
            name="zonestary";
            expCond="(player distance zonestary) < 100;";
            expActiv="[""trader city Stary"",true,""enter""] call player_traderCity;";
            expDesactiv="[""trader city Stary"",true,""leave""] call player_traderCity;";
        };
        class Item1
        {
            position[]={4063,365,11664};
            TRGDEF
            name="zonebash";
            expCond="(player distance zonebash) < 100;";
            expActiv="[""trader city Bash"",true,""enter""] call player_traderCity;";
            expDesactiv="[""trader city Bash"",true,""leave""] call player_traderCity;";
        };
        class Item2
        {
            position[]={11447,317,11364};
            TRGDEF
            name="zoneklen";
            expCond="(player distance zoneklen) < 100;";
            expActiv="[""trader city Klen"",true,""enter""] call player_traderCity;";
            expDesactiv="[""trader city Klen"",true,""leave""] call player_traderCity;";
        };
        class Item3
        {
            position[]={1606,289,7803};
            TRGDEF
            name="zonebandit";
            expCond="(player distance zonebandit) < 100;";
            expActiv="[""Bandit Trader"",false,""enter""] call player_traderCity;";
            expDesactiv="[""Bandit Trader"",false,""leave""] call player_traderCity;";
        };
        class Item4
        {
            position[]={12944,210,12766};
            TRGDEF
            name="zonehero";
            expCond="(player distance zonehero) < 100;";
            expActiv="[""Hero Trader"",false,""enter""] call player_traderCity;";
            expDesactiv="[""Hero Trader"",false,""leave""] call player_traderCity;";
        };
        class Item5
        {
            position[]={12060,158,12638}; 
            TRGDEF
            name="zoneaircraft";
            expCond="(player distance zoneaircraft) < 100;";
            expActiv="[""Aircraft Trader"",false,""enter""] call player_traderCity;";
            expDesactiv="[""Aircraft Trader"",false,""leave""] call player_traderCity;";
        };

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...