Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
We already have working solutions for this found in these two threads:
http://opendayz.net/index.php?threa...striction-and-humanity-restriction-zone.8526/
http://opendayz.net/index.php?threads/safezone.8190/
We already have working solutions for this found in these two threads:
http://opendayz.net/index.php?threa...striction-and-humanity-restriction-zone.8526/
http://opendayz.net/index.php?threads/safezone.8190/
if(isServer) then {
"triggerDamageOff" addPublicVariableEventHandler {
private ["_args"];
_args = _this; //_this = the val of "triggerDamageOff"
if(!isNull _args) then {
_args setVehicleInit "this allowDamage true";
processInitCommands;
};
};
};
// Camp
if ((getPlayerUID player) in ["ids here"]) exitWith {
titleText ["You are cleared to stay... Welcome back.", "PLAIN DOWN", 3];
};
// Everyone Else
triggerDamageOff= vehicle player;
publicVariable "triggerDamageOff";
titleText ["This base is protected leave now or die in 10 seconds", "PLAIN DOWN", 3];
sleep 5;
titleText ["You were warned", "PLAIN DOWN", 3];
sleep 5;
player setDamage 1;
my code ports players out that enter the zonehi all!
sry forgot to ask : is it possible to not hurt them ,jsut port them after 30 seconds if they dont leave the protected area?
cheers fox
_directionto = [_unit, vehicle player] call BIS_fnc_dirTo; //BIS Function to get the direction to the Object entering the Zone
if(_directionto < 0) then {_directionto = _directionto + 360}; //negative direction to positive
_positionPlayer = getposATL vehicle player;
_setNewPos = [getposATL _unit,_directionto,(_radius + 1),true] call FindPosition; //Custom Script to find the Position outside the Zone in direction of the entering Object
_setNewPos set [2,(_positionPlayer select 2)]; //adding height
//cutText ["Enemy Base: " + str(_ShieldID) + " PlayerBaseID: " + str(_playerbaseID) + " DirectionTo: " + str(_directionto) + " NewPos: " +str(_setNewPos), "PLAIN DOWN"];
cutText ["The Baseshield of this Enemy Base is stronger then you! >_<", "PLAIN DOWN"]; //Info to player
vehicle player setPos _setNewPos; //kick out not allowed player or vehicle the player is in
anyone got this working? got players dive bombing camps now. need a way to protect them better. tried a few pieces of leolilu code in my camps.sqf files but no joy.
here is what i did
put this in the inti file:
Code:if(isServer) then { "triggerDamageOff" addPublicVariableEventHandler { private ["_args"]; ... ... };
and this in my camps file:
Code:// Camp if ((getPlayerUID player) in ["ids here"]) exitWith { titleText ["You are cleared to stay... Welcome back.", "PLAIN DOWN", 3]; }; ... ...
how you are executing your camp file ? do you see any titletext messages ?
class Item19
{
position[]={1352.1855,152.44626,5808.2549};
a=50;
b=50;
activationBy="ANY";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="Garias Camp";
expCond="(vehicle player) in thislist;";
expActiv="adminbase = [] execVM ""camp4.sqf"";";
expDesactiv="terminate adminbase; titleText [""You have left the danger zone!"", ""PLAIN DOWN"", 3];";
class Effects
{
};
};
btw what is the lhm-mod
!
It is executed in the mission file.
Code:class Item19 { position[]={1352.1855,152.44626,5808.2549}; a=50; b=50; activationBy="ANY"; repeating=1; interruptable=1; age="UNKNOWN"; name="Garias Camp"; expCond="(vehicle player) in thislist;"; expActiv="adminbase = [] execVM ""camp4.sqf"";"; expDesactiv="terminate adminbase; titleText [""You have left the danger zone!"", ""PLAIN DOWN"", 3];"; class Effects { }; };
if ((getPlayerUID player) in ["XXXXXXX"]) then {
titleText ["You are entering a restricted zone....identity confirmed. Welcome back.", "PLAIN DOWN", 3];
} else {
titleText ["You are entering a restricted zone, please turn back now or face certain death...", "PLAIN DOWN", 3];
sleep 5;
titleText ["You have less than 5 seconds to leave (you're about to die!)...", "PLAIN DOWN", 3];
sleep 5;
titleText ["You were warned..!", "PLAIN DOWN", 3];
sleep 1;
player setDamage 1;
};
class Item0
{
position[]={5482.666,366.10864,13319.332};
a=75;
b=75;
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="smrbase";
expCond="(vehicle player) in thislist;";
expActiv="smrbase = [] execVM ""Scripts\smr.sqf"";";
expDesactiv="terminate smrbase; titleText [""You have left the restricted zone!"", ""PLAIN DOWN"", 3];";
class Effects
{
titleType="TEXT";
titleEffect="PLAIN DOWN";
title="You are entering a restricted zone.";
};
};
type="SWITCH";
class Sensors
{
items=1;
class Item0
{
position[]={4546.0439,339,10242.657};
rectangular=1;
activationBy="ANY";
repeating=1;
interruptable=1;
type="SWITCH";
age="UNKNOWN";
text="MyTrigger";
name="MyTrigger";
expCond="(vehicle player) in thislist;";
expActiv="_id = [true,this] execVM ""Leos\burner\zonecheck.sqf"";";
expDesactiv="_id = [false,this] execVM ""Leos\burner\zonecheck.sqf"";";
class Effects
{
};
};
};
gratzWorked! Thanks a lot.