[Request] Player ID zone restriction and humanity restriction zone

I cant seem to get it to work either, game loads up, then says mission couldn't be loaded, then spawns in about 2k west into the debug. able to get back on the map and everything is where it's supposed to be, but the base isn't "protected". not sure really what to do to fix it.


usually means u screwed somthing up in mission.sqm. make sure all brackets close and open correctly. also your numbers in item## are increasing by one.
 
Can somebody please help me get the correct coordinates for base protection for the NEAF in chernarus?
I tried using the database cords that my character was at and mission editor I do have it setup right as far as the codes and scripts go. I just need the coordinates in the correct format.
 
Can somebody please help me get the correct coordinates for base protection for the NEAF in chernarus?

I tried using the database cords that my character was at and mission editor I do have it setup right as far as the codes and scripts go. I just need the coordinates in the correct format.


you adding the coords in mission.sqm? if so take databases coords, X,Y,Z and change it to X,Z,Y.

mission.sqm uses X,Z,Y

database uses X,Y,Z
 
I'm having an issue with this. When I try to get this into my mission.sqm and try to merge it with my server sqm in game, i get this message 'position/' is not a class ('position' accessed) I don't know why. Any help would be appreciated.

Code:
class Sensors
        {
            position[]={4469.4839, 0, 10366.104};
            a=20;
            b=20;
            activationBy="WEST";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="AdminBase";
            expCond="(vehicle player) in thislist;";
            expActiv="adminbase = [] execVM ""addons\adminbase.sqf"";";
            expDesactiv="terminate adminbase; titleText [""You have left the Admin Base!"", ""PLAIN DOWN"", 3];";
            class Effects
            {
                titleType="TEXT";
                titleEffect="PLAIN DOWN";
                title="You are entering a restricted zone.";
            };
        };
 
Hey all im having an issue where although i meet the requirements i am still given the unauthorized player message and killed. Any help would be appreciated.

Dome.sqf
Code:
PlayerHumanity = (player getVariable"humanity");
    if (PlayerHumanity > 0) then {
    titleText ["You have entered a PVE zone", "PLAIN DOWN", 3];
    };
    // What happens if unauthorized players get into the dome
    titleText ["You are entering a PVE area, leave.", "PLAIN DOWN", 3];
    sleep 5;
    titleText ["Are you blind? GET OUT", "PLAIN DOWN", 3];
    sleep 5;
    titleText ["Still not listening, huh?", "PLAIN DOWN", 3];
    sleep 5;
    titleText ["You have 5 seconds left", "PLAIN DOWN", 3];
    sleep 5;
    titleText ["Good night.", "PLAIN DOWN", 3];
    sleep 2;
    player setDamage 1;

mission.sqm
Code:
        };
    };
   
    class Sensors
    {
    items=1;
    class Item0
    {
        position[]={10477.8,5.353,2363.59};
        a=4000;
        b=10000;
        rectangular=1
        activationBy="WEST";
        repeating=1;
        interruptable=1;
        age="UNKNOWN";
        name="dome";
        expCond="(vehicle player) in thislist;";
        expActiv="dome = [] execVM ""dome.sqf"";";
        expDesactiv="terminate dome; titleText [""You've left the dome"", ""PLAIN DOWN"", 3];";
        class Effects
    {
            };
        };
    };
 
    class Markers

My humanity is 2500 i spawned a new guy and checked the DB just to be sure but i still get killed upon entry
 
I have been working with this script so thanks to all who have had an input, what I am trying to do with it now is add God Mode and instead of killing them as a last resort teleporting them to a set destination.

Has anyone else got this sort of thing working, I am trying to merge a few scripts which are already out there to make mine work.
 
why not look at the code for epoch trader city god modes. then combine it with the admin base protected zone?
 
that is what I am attempting to do and try to understand it at the same time. I will admit I am new to this coding so it may take some time.

this is what I have and would be grateful is someone who has done it before could tell me if this should work please.

mission.sqf
Code:
class Item10 //ADMIN BASE CHERNO
        {
            position[]={GRID DETAILS};
            a=20;
            b=20;
            activationBy="WEST";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="AdminBase";
            expCond="(vehicle player) in thislist;";
            expActiv="adminbase = [] execVM ""player_zones\admin.sqf"";";
            expDesactiv="terminate adminbase; titleText [""You have left the Admin Base!"", ""PLAIN DOWN"", 3];";
            class Effects
            {
                titleType="TEXT";
                titleEffect="PLAIN DOWN";
                title="You are entering a restricted zone.";
            };
        };

admin.sqf
Code:
if ((getPlayerUID player) in ["",""]) then {
titleText ["Hello Admin. GOD MODE ON", "PLAIN DOWN", 3];
///////GOD MODE START HERE////////
    sleep 2;
    player setUnitRecoilCoefficient 0;
    player_zombieCheck = {};
    fnc_usec_damageHandler = {};
    fnc_usec_unconscious  = {};
    player allowDamage false;
    waitUntil {! (vehicle player in list _Basis)};
    titleText ["BYE ADMIN, GOD MODE OFF.", "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;
//// GOD MODE END HERE //////
} else {
titleText ["This area is protected by Deadly Nerve Gas, LEAVE NOW...", "PLAIN DOWN", 3];
sleep 15;
titleText ["I hope your immune to Nerve Gas...", "PLAIN DOWN", 3];
sleep 15;
titleText ["You have less than 45 seconds before Nerve Gas takes effect..", "PLAIN DOWN", 3];
sleep 15;
titleText ["You have lost the use of your hands and lost your weapons !!", "PLAIN DOWN", 3];
removeAllWeapons player;
sleep 15;
titleText ["You have less than 15 seconds before Nerve Gas totally effects you..", "PLAIN DOWN", 3];
sleep 15;
titleText ["You were warned..! We will bury you in a Shallow Grave", "PLAIN DOWN", 3];
sleep 5;
player setDamage 1;
};

I have taken some code from 2 lots of code and tried to get them to work, it is the GOD MODE bit which is what I am having trouble with.
 
I have a protected dome script with siren sound and its working pm me

Gesendet von meinem GT-I9100 mit Tapatalk
 
Finally got this working, thanks Fox for the help and all the others who's script I have used. None of the scripts used are my own and I have found them on this form.

It allows admins into the area (when you enter the UID) and will give warnings to other before removing weapons and then finally killing them.

Hopefully this will be able for people.

Add this to your mission.sqm
Code:
    class Item***** 
        {
            position[]={GRID DETAILS HERE};
            a=20;
            b=20;
            activationBy="WEST";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="AdminBase";
            expCond="(vehicle player) in thislist;";
            expActiv="adminbase = [] execVM ""custom_scripts\player_zones\admin_cherno1.sqf"";";
            expDesactiv="terminate adminbase; titleText [""LEFT ADMIN BASE GOD MODE OFF !!"", ""PLAIN DOWN"", 3]; execVM ""custom_scripts\player_zones\godmode.sqf"";";
            class Effects
            {
                titleType="TEXT";
                titleEffect="PLAIN DOWN";
                title="You are entering a restricted zone.";
            };
        };

admin_cherno1.sqf
Code:
///////START HERE////////
if ((getPlayerUID player) in ["UID"]) then {
titleText ["ENTERED ADMIN BASE. GOD MODE ON !!", "PLAIN DOWN", 3];
///////END HERE////////
    player setUnitRecoilCoefficient 0;
    player_zombieCheck = {};
    fnc_usec_damageHandler = {};
    fnc_usec_unconscious  = {};
    player allowDamage false;
//// START HERE //////
} else {
titleText ["This area is protected by Deadly Nerve Gas, LEAVE NOW...", "PLAIN DOWN", 3];
sleep 15;
titleText ["I hope your immune to Nerve Gas...", "PLAIN DOWN", 3];
sleep 15;
titleText ["You have less than 45 seconds before Nerve Gas takes effect..", "PLAIN DOWN", 3];
sleep 15;
titleText ["You have lost the use of your hands and lost your weapons !!", "PLAIN DOWN", 3];
removeAllWeapons player;
sleep 15;
titleText ["You have less than 15 seconds before Nerve Gas totally effects you..", "PLAIN DOWN", 3];
sleep 15;
titleText ["You were warned..! We will bury you in a Shallow Grave", "PLAIN DOWN", 3];
sleep 5;
player setDamage 1;
};

godmode.sqf
Code:
//Mod by Zane
Private ["_Basis","_EH_Fired","_EH_Hit","_EH_Killed"];
_Basis = _this select 0; //Basisname
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;

I am a newbie when it comes to coding this type of stuff which is why I have split it all down, someone may look at it and decide it can all be done into one file.
 
  • Like
Reactions: Fox
Back
Top