[Release] Safezones

anyway to stop vehicle weapons from shooting in the safe zones also choppers are randomly blowing up out in the world when they hit other players like what would happen if u hit someone in the safe zone u will die or your vehicle will blow up so I dunno if a handler isn't getting deleted when a vehicles leaves the safe zone or what any help?
 
anyone got any of the safezone scripts that block weapons fire to work on 1.7.7.1? My bad if this has been answered, feel free to yell at me for not searching too hard I'm exhausted lol
 
anyone got any of the safezone scripts that block weapons fire to work on 1.7.7.1? My bad if this has been answered, feel free to yell at me for not searching too hard I'm exhausted lol

The one posted here works. I am using it now. It doesn't always display the message as desired but it works.
 
anyone here that has got this working willing to help a noob out? i have my server up and running with 1.0.1.4 and i cant seem to figure out what is wrong, i need a few things done, so be prepared lol, i have a ts3 server we can chat on and teamviewer installed on server.
 
a fix for the zombie issue:
Code:
Private ["_Basis","_EH_Fired","_EH_Hit","_EH_Killed"];
 
 
_Basis = _this select 0; //Basisname
 
while {true} do
  {
    //wait until Player is in base, then start Eventhandler
    waitUntil {vehicle player in list _Basis};
titleText ["Welcome to the Dome.", "PLAIN DOWN", 3];
sleep 2;
player setUnitRecoilCoefficient 0;
player_zombieCheck = {};
fnc_usec_damageHandler = {};
fnc_usec_unconscious  = {};
player allowDamage false;
    //wait until Player left base, then delete EventHandler
    waitUntil {! (vehicle player in list _Basis)};
titleText ["You have Left the dome.", "PLAIN DOWN", 3];
sleep 2;
player setUnitRecoilCoefficient 1;
player_zombieCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_zombieCheck.sqf";
fnc_usec_damageHandler = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandler.sqf";
fnc_usec_unconscious = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_unconscious.sqf";
player allowDamage true;
  }
 
Hi I have small problem with my script evrythings works fine, zombies dissapearing etc. however when you leave safezone, script is still working and you can`t kill zombies. After leaving safezone you have to relog.....

safezone.sqf
Code:
//Base protection for Players with Eventhandler
//
//requires Trigger with activation BLUEFOR and OPFOR with name Basis_West and Basis_East
//
// you can't fire out of your own Base
//
//Those who hit or kill Enemy in it's Base, will be killed
//
// Parameters: [name of the side trigger for the Base Area]
//
//Center_West:
//if (playerSide == WEST) then {[Basis_West] execVM "safezone.sqf"};
//
//Center_East:
//if (playerSide == EAST) then {[Basis_East] execVM "safezone.sqf"};
 
 
Private ["_Basis","_EH_Fired","_EH_Hit","_EH_Killed"];
 
 
_Basis = _this select 0; //Basisname
 
while {true} do
  {
    //wait until Player is in base, then start Eventhandler
    waitUntil {vehicle player in list _Basis};
    player groupchat "i am inside the SAFEZONE!";
    _EH_Fired  = vehicle player addEventHandler ["Fired", { NearestObject [_this select 0,_this select 4] setPos[0,0,0]}];
    _EH_Hit    = vehicle player addEventHandler ["Hit",  {_this select 1 setdammage 1; player setDammage 0; vehicle player setDammage 0}];
    _EH_Killed = vehicle player addEventHandler ["Killed",{_this select 1 setdammage 1}];
sleep 10;
 
killzombies=true;
 
while {killzombies} do {
sleep 10;
_pos = getPos Basis_West;
_zombies = _pos nearEntities ["zZombie_Base",150];
_count = count _zombies;
 
 
for "_i" from 0 to (_count -1) do
{
_zombie = _zombies select _i;
_zombie setpos [-3367.739,-120.84577,-8247.0625];
};
 
};
 
    //wait until Player left base, then delete EventHandler
    waitUntil {! (vehicle player in list _Basis)};
    player groupchat "I have left SAFEZONE";
    player removeEventHandler ["Fired", _EH_Fired];
    player removeEventHandler ["Hit",  _EH_Hit];
    player removeEventHandler ["Killed",_EH_Killed];
  };

I put radio in my equipment I see first info in groupchat, however when I`m leaving no info has pop up....
Can anyone can point me what i`m missing
 
We also had the same problem on chernarus.de after messing around with eventhandlers in a safezone. the only difference is that our vehicle weapons didnt do any damage after leavong the safezone, and we had to relog to enable them.

Like i Already posted here. There is no need to mess around with the eventhandler to disable weapons in a safezone, as there is already a safezone object called protectionzone_EP1 in Arma2. Within this zone Weapons can shoot but there is no damage.


Anyway i think the error is within this code
Code:
killzombies=true;
 
while {killzombies} do {
sleep 10;
_pos = getPos Basis_West;
_zombies = _pos nearEntities ["zZombie_Base",150];
_count = count _zombies;
 
 
for "_i" from 0 to (_count -1) do
{
_zombie = _zombies select _i;
_zombie setpos [-3367.739,-120.84577,-8247.0625];
};
 
};
I dont see any abort condition for the loop....
 
You could try to get rid of the wait until {! (vehicle player in list _Basis)}; and just change the mission.sqm to
Code:
class Sensors
    {
        items=1;
        class Item0
        {
            position[]={4984.51, 28.63, 6613.21};
            a=25;
            b=25;
            activationBy="ANY";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="Safezone";
            expCond="(vehicle player) in thislist";
            expActiv="Safezone = [] execVM ""filepath/Safezone.sqf"";";
            expDesactiv="terminate Safezone; titleText [""You have left the Safezone!"", ""PLAIN DOWN"", 3];";
            class Effects
            {
            };
        };
    };

With the added expDesactiv it should do the same thing that the wait until line is SUPPOSED to do...as in cancel the script.
 
You could try to get rid of the wait until {! (vehicle player in list _Basis)}; and just change the mission.sqm to
Code:
class Sensors
    {
        items=1;
        class Item0
        {
            position[]={4984.51, 28.63, 6613.21};
            a=25;
            b=25;
            activationBy="ANY";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="Safezone";
            expCond="(vehicle player) in thislist";
            expActiv="Safezone = [] execVM ""filepath/Safezone.sqf"";";
            expDesactiv="terminate Safezone; titleText [""You have left the Safezone!"", ""PLAIN DOWN"", 3];";
            class Effects
            {
            };
        };
    };

With the added expDesactiv it should do the same thing that the wait until line is SUPPOSED to do...as in cancel the script.

Thx Matt for the solution now evrything works fine..... you got my beanz ;)
 
Hello,

I would pay some money to the person that would help me set these up, I have no clue how to create a zone that will ONLY get rid of the zombies.
Add me on skype: Tayama. (include the dot for better search results).

Thanks again.

Syphron.
 
do i have this the right way as when i try log into server come's up loading carector data and take's ages to load then debug, any help would be great,init="this setPosASL [getposASL this select 0, getposASL this select 1, 0]; this setpos [13210.424, 3480.5696, 2.7];";
};
class Item15
{
position[]={13214.373,-3.8479133,3472.0823};
azimut=-213.28755;
id=18;
side="EMPTY";
vehicle="land_nav_pier_c";
skill=0.2;
init="this setPosASL [getposASL this select 0, getposASL this select 1, -2.5]; this setpos [13214.373, 3472.0823, -3.1];";
};
class Item16
{
position[]={2879.9539,271.03983,9725.2363};
azimut=37.950027;
id=102;
side="EMPTY";
vehicle="GraveCrossHelmet";
skill=0.60000002;
};
};
class Sensors
{
items=1;
class Item0
{
position[]={8077.0146,, 3357.3479};
a=25;
b=25;
activationBy="ANY";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="Safezone";
expCond="(vehicle player) in thislist";
expActiv="Safezone = [] execVM ""filepath/Safezone.sqf"";";
expDesactiv="terminate Safezone; titleText [""You have left the Safezone!"", ""PLAIN DOWN"", 3];";
class Effects
{
};
};
};
 
Back
Top