[Request] Player ID zone restriction and humanity restriction zone

Any method of creating humanity restrictions to the zone? - Kinda wana create an elite bandit or elite hero hangout... something for players to achieve I guess
 
Thanks guys.

Will have a look at that 2D editor and that other thread after work. What I'm looking for is a admin base, where I can be safe when searching for cheaters.

Skickat från min GT-N8020 via Tapatalk 2

Not sure if this is any help to you, but if you're just looking for protection while you track down cheaters then give this tool a go. It also gives you the ability to spectate players, which is invaluable when trying to get visual evidence of cheating ;)

http://opendayz.net/index.php?threads/dayz-admin-tools.8576/
 
Any method of creating humanity restrictions to the zone? - Kinda wana create an elite bandit or elite hero hangout... something for players to achieve I guess

Sure is.. I think this will work:

Code:
PlayerHumanity = (player getVariable"humanity");
if (PlayerHumanity > 5100) then {
 
YOUR CODE HERE
 
};

Then just add your code to execute if humanity is higher than 5100..

Maybe someone can provide something better?
 
So would this be what it could look like?

HeroBase.sqf

Code:
PlayerHumanity = (player getVariable"humanity");
if (PlayerHumanity > 12000) then {
titleText ["Hello Hero.  Welcome back.", "PLAIN DOWN", 3];
} else {
titleText ["You are entering a Hero only zone, please turn back now or face certain death...", "PLAIN DOWN", 3];
sleep 15;
titleText ["You have 1 minute to turn back...", "PLAIN DOWN", 3];
sleep 15;
titleText ["You have less than 45 seconds to leave..", "PLAIN DOWN", 3];
sleep 15;
titleText ["You have less than 30 seconds to leave.. We aren't kidding!", "PLAIN DOWN", 3];
removeAllWeapons player;
sleep 15;
titleText ["You have less than 15 seconds to leave (you're about to die!)...", "PLAIN DOWN", 3];
sleep 15;
titleText ["You were warned..!", "PLAIN DOWN", 3];
sleep 5;
player setDamage 1;
};

So would this be what it could look like?

And for the mission will this work?

Code:
        class Item5
        {
            position[]={12186.046,0,12218.783};
            a=300;
            b=300;
            activationBy="WEST";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="HeroBase";
            expCond="(vehicle player) in thislist;";
            expActiv="HeroBase = [] execVM ""Scripts\HeroBase.sqf"";";
            expDesactiv="terminate HeroBase; titleText [""You have left the Hero Base!"", ""PLAIN DOWN"", 3];";
            class Effects
            {
                titleType="TEXT";
                titleEffect="PLAIN DOWN";
                title="You are entering a restricted zone.";
            };
        };
 
I'm going to say yes, but if it doesn't work then it might be because I'm just not getting the variable right.. I'm sure it's just "humanity" .. So yeah, in theory that looks spot on.

So would this be what it could look like?

HeroBase.sqf

Code:
PlayerHumanity = (player getVariable"humanity");
if (PlayerHumanity > 12000) then {
titleText ["Hello Hero.  Welcome back.", "PLAIN DOWN", 3];
} else {
titleText ["You are entering a Hero only zone, please turn back now or face certain death...", "PLAIN DOWN", 3];
sleep 15;
titleText ["You have 1 minute to turn back...", "PLAIN DOWN", 3];
sleep 15;
titleText ["You have less than 45 seconds to leave..", "PLAIN DOWN", 3];
sleep 15;
titleText ["You have less than 30 seconds to leave.. We aren't kidding!", "PLAIN DOWN", 3];
removeAllWeapons player;
sleep 15;
titleText ["You have less than 15 seconds to leave (you're about to die!)...", "PLAIN DOWN", 3];
sleep 15;
titleText ["You were warned..!", "PLAIN DOWN", 3];
sleep 5;
player setDamage 1;
};

So would this be what it could look like?

And for the mission will this work?

Code:
        class Item5
        {
            position[]={12186.046,0,12218.783};
            a=300;
            b=300;
            activationBy="WEST";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="HeroBase";
            expCond="(vehicle player) in thislist;";
            expActiv="HeroBase = [] execVM ""Scripts\HeroBase.sqf"";";
            expDesactiv="terminate HeroBase; titleText [""You have left the Hero Base!"", ""PLAIN DOWN"", 3];";
            class Effects
            {
                titleType="TEXT";
                titleEffect="PLAIN DOWN";
                title="You are entering a restricted zone.";
            };
        };
 
Just tested the admin base. Working as intended, and redic easy to set up, nice one!

Time to try the humanity based one

Confirmed as functional.Went in without the required humanity. Was warned to leave. Changed my humanity to above the threshold, and it welcomed me.


For Bandits would it be as easy as changing it to this

PlayerHumanity < -12000
 
Just tested the admin base. Working as intended, and redic easy to set up, nice one!

Time to try the humanity based one

Confirmed as functional.Went in without the required humanity. Was warned to leave. Changed my humanity to above the threshold, and it welcomed me.


For Bandits would it be as easy as changing it to this

PlayerHumanity < -12000

Yes. :)

I have started adding rewards to my server, the first one is for every player who reaches (and stays at or above) hero humanity can now bloodbag themselves. This encourages people to think more about cooperative play than being a bandit. I'm not sure what to reward bandits with yet... any ideas?
 
Would be really nice if any of you could write this down :) Atleast where in the mission file i should add the trigger script.
I would like to add this to my server too.

Bandit reward could be more health from food (if that is possible to add) or some kind of weapon perhaps.

Skickat från min GT-I9300 via Tapatalk 2
 
Yes. :)

I have started adding rewards to my server, the first one is for every player who reaches (and stays at or above) hero humanity can now bloodbag themselves. This encourages people to think more about cooperative play than being a bandit. I'm not sure what to reward bandits with yet... any ideas?

Well if you're going to reward bandits, personally they would have to be the ones to earn self blood bag... But they'd have to be extremely negative to do so... I mean, they are usually the solo type.

Rewarding heroes should be something they can make use of for themselves and their friends. I've always liked some sort of Heroes vs Bandits gameplay. Similar to what you've done with your admin debug, perhaps give heroes a 6th sense with some sort of Bandit within X radius. Ideally this would be expanded so more negative you are, the larger a radius you can be sensed, the more positive you are, the larger the radius you can sense.... Iunno just throwing out some thoughts.

I personally like the idea of rewards, I also like the idea of clans being able to set up their own respawn point

BTW is adding bloodbag reward as simple as doing a humanity check like in the one above?
 
This is a snippet of what mine currently looks like. Basically you have class markers in your mission.sqm.

Under it you have a section: class Sensors - Just follow what's been done, ignore the first few, the ones that are relevant are item5 and 6.

Code:
    class Markers
    {
        items=7;
        class Item0
        {
            position[]={6672.2217,22.558523,7341.7119};
            name="center";
            type="Empty";
        };
        class Item1
        {
            position[]={-7101.7598,16.641363,17337.613};
            name="respawn_west";
            type="Empty";
        };
        class Item2
        {
            position[]={5526.7261,10.15,3391.4048};
            name="spawn0";
            type="Empty";
        };
        class Item3
        {
            position[]={9027.3223,8.67414,1868.2104};
            name="spawn1";
            type="Empty";
        };
        class Item4
        {
            position[]={7042.605,10.15,2489.7627};
            name="spawn2";
            type="Empty";
        };
        class Item5
        {
            position[]={8687.374,8.7790642,1984.8423};
            name="spawn3";
            type="Empty";
        };
        class Item6
        {
            position[]={6111.1841,10.16,2619.0313};
            name="spawn4";
            type="Empty";
        };
    };
    class Sensors
    {
        items=7;
        class Item0
        {
            position[]={8807.9092,0,2100.4705};
            a=20;
            b=20;
            angle=72.795197;
            rectangular=1;
            activationBy="WEST";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            expActiv="thisTrigger = [player,150,true,(getPosATL player)] spawn player_alertZombies;";
            class Effects
            {
                soundDet="Sirene_EP1";
            };
        };
        class Item1
        {
            position[]={8951.3994,0,2295.7654};
            a=20;
            b=20;
            angle=-34.950001;
            rectangular=1;
            activationBy="WEST";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            expActiv="thisTrigger = [player,150,true,(getPosATL player)] spawn player_alertZombies;";
            class Effects
            {
                soundDet="Sirene_EP1";
            };
        };
        class Item2
        {
            position[]={8928.7871,0,2484.061};
            a=20;
            b=20;
            angle=-18.1738;
            rectangular=1;
            activationBy="WEST";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            expActiv="thisTrigger = [player,150,true,(getPosATL player)] spawn player_alertZombies;";
            class Effects
            {
                soundDet="Sirene_EP1";
            };
        };
        class Item3
        {
            position[]={5645.2134,0,3811.1863};
            a=20;
            b=20;
            angle=305;
            rectangular=1;
            activationBy="WEST";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            expActiv="thisTrigger = [player,150,true,(getPosATL player)] spawn player_alertZombies;";
            class Effects
            {
                soundDet="Sirene_EP1";
            };
        };
        class Item4
        {
            position[]={5766.7246,0,3918.2568};
            a=20;
            b=20;
            angle=-18.1738;
            rectangular=1;
            activationBy="WEST";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            expActiv="thisTrigger = [player,150,true,(getPosATL player)] spawn player_alertZombies;";
            class Effects
            {
                soundDet="Sirene_EP1";
            };
        };
//        class Item5
//        {
//            position[]={3452.0217,19,3600.6479};
//            a=0;
//            b=0;
//            repeating=1;
//            age="UNKNOWN";
//            expCond="mans = nearestObjects [ player , [""Man"",""Man""], 2] select 1; mans distance player < 2 and alive mans and otschet";
//            expActiv="udar = player addAction [""MeleeStrike!"",""ydar2.sqs""]";
//            expDesactiv="player removeAction udar";
//            class Effects
//            {
//            };
//        };
        class Item5
        {
            position[]={12186.046,0,12218.783};
            a=100;
            b=100;
            activationBy="WEST";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="AdminBase";
            expCond="(vehicle player) in thislist;";
            expActiv="adminbase = [] execVM ""Scripts\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.";
            };
        };
        class Item6
        {
            position[]={12186.046,0,12218.783};
            a=100;
            b=100;
            activationBy="WEST";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="HeroBase";
            expCond="(vehicle player) in thislist;";
            expActiv="HeroBase = [] execVM ""Scripts\HeroBase.sqf"";";
            expDesactiv="terminate HeroBase; titleText [""You have left the Hero Base!"", ""PLAIN DOWN"", 3];";
            class Effects
            {
                titleType="TEXT";
                titleEffect="PLAIN DOWN";
                title="You are entering a restricted zone.";
            };
        };
    };
};
class Intro
{
    addOns[]=
    {
        "mbg_celle2"
    };
    addOnsAuto[]=
    {
        "mbg_celle2"
    };
    randomSeed=6913869;
    class Intel
    {
        startWeather=0.00;
        forecastWeather=0.00;
        year=2013;
        month=8;
        day=23;
        hour=9;
        minute=20;
    };
};
class OutroWin
{
    addOns[]=
    {
        "mbg_celle2"
    };
    addOnsAuto[]=
    {
        "mbg_celle2"
    };
    randomSeed=4081731;
    class Intel
    {
        startWeather=0.00;
        forecastWeather=0.00;
        year=2013;
        month=8;
        day=23;
        hour=9;
        minute=20;
    };
};
class OutroLoose
{
    addOns[]=
    {
        "mbg_celle2"
    };
    addOnsAuto[]=
    {
        "mbg_celle2"
    };
    randomSeed=4975929;
    class Intel
    {
        startWeather=0.00;
        forecastWeather=0.00;
        year=2013;
        month=8;
        day=23;
        hour=9;
        minute=20;
    };
};
 
Yes. :)

I have started adding rewards to my server, the first one is for every player who reaches (and stays at or above) hero humanity can now bloodbag themselves. This encourages people to think more about cooperative play than being a bandit. I'm not sure what to reward bandits with yet... any ideas?

This sounds great! I have been attempting to make the humanity system more important on my server. Humanity rewards would be a great addition. I hope you decide to release a tutorial on how to accomplish this.
 
This sounds great! I have been attempting to make the humanity system more important on my server. Humanity rewards would be a great addition. I hope you decide to release a tutorial on how to accomplish this.

I'll do my best. I'm not as talented as the rest of the coders on opendayz.net , so most of my work is a product of me learning how to do stuff myself.. But I'll always share , you can count on that :)
 
I personally like the idea of rewards, I also like the idea of clans being able to set up their own respawn point

BTW is adding bloodbag reward as simple as doing a humanity check like in the one above?

If you know how to set custom spawn points, please share with me as I'm thinking about that for my admins.

To answer your question:

You will need to download the bloodbag.sqf file, it's linked on opendayz.net somewhere.. Then in the fn_selfActions.sqf file , you need this code:

Code:
if ((getPlayerUID player) in ["11111","22222"] or (PlayerHumanity > 4999)) then {
s_action_blood = -1;
 
if(r_player_blood < 12000 and "ItemBloodbag" in magazines player and s_action_blood < 0) then {
        s_action_blood = player addAction ["Blood Bag Yourself", "Scripts\bloodbag.sqf",[player], 0, false, true, "", "'ItemBloodbag' in magazines player"];
        a_action_blood = 1;
};
if(s_action_blood > 0) then {
        player removeAction s_action_blood;
        s_action_blood = -1;
};
 
};

Hope you can see what I've done there. Me and my admin have the ability to always bloodbag ourselves (it's a perk, not cheating lol) and any player above humanity 4999 gets it too. If anyone can show me how to remove the menu option after the player has blood bagged themselves , I'd appreciate it. This is code I cut n pasted from another source, I only added the conditions for uid and humanity. I've not had any luck removing the menu option thus far :(
 
If you know how to set custom spawn points, please share with me as I'm thinking about that for my admins.

To answer your question:

You will need to download the bloodbag.sqf file, it's linked on opendayz.net somewhere.. Then in the fn_selfActions.sqf file , you need this code:

Code:
if ((getPlayerUID player) in ["11111","22222"] or (PlayerHumanity > 4999)) then {
s_action_blood = -1;
 
if(r_player_blood < 12000 and "ItemBloodbag" in magazines player and s_action_blood < 0) then {
        s_action_blood = player addAction ["Blood Bag Yourself", "Scripts\bloodbag.sqf",[player], 0, false, true, "", "'ItemBloodbag' in magazines player"];
        a_action_blood = 1;
};
if(s_action_blood > 0) then {
        player removeAction s_action_blood;
        s_action_blood = -1;
};
 
};

Hope you can see what I've done there. Me and my admin have the ability to always bloodbag ourselves (it's a perk, not cheating lol) and any player above humanity 4999 gets it too. If anyone can show me how to remove the menu option after the player has blood bagged themselves , I'd appreciate it. This is code I cut n pasted from another source, I only added the conditions for uid and humanity. I've not had any luck removing the menu option thus far :(

Aye, I have self blood bag ability on my server, just figured the same method of having conditions on the zone applied to the BB... and I guess I was somewhat correct. I'm def gonna throw this in., if i wanted to have it so that it was designated for people above AND below a specific point, how would that look?
 
Aye, I have self blood bag ability on my server, just figured the same method of having conditions on the zone applied to the BB... and I guess I was somewhat correct. I'm def gonna throw this in., if i wanted to have it so that it was designated for people above AND below a specific point, how would that look?

I'm pretty sure there's a better way to do this, but this is how I would do it:

Code:
// for people who haven't kept up with the post , this line is important.. 
PlayerHumanity = (player getVariable"humanity");
 
// To answer Manatee Hunters question..
if ((PlayerHumanity < -12000) or (PlayerHumanity > 4999)) then {

I'm trying to find a way so that players who are inside a hospital have the ability to use blood bags too. My logic here is that you'd have access to the right equipment ;)
 
I'm pretty sure there's a better way to do this, but this is how I would do it:

Code:
// for people who haven't kept up with the post , this line is important..
PlayerHumanity = (player getVariable"humanity");
 
// To answer Manatee Hunters question..
if ((PlayerHumanity < -12000) or (PlayerHumanity > 4999)) then {

I'm trying to find a way so that players who are inside a hospital have the ability to use blood bags too. My logic here is that you'd have access to the right equipment ;)

WRONG. You don't need equipment, this is the apocalypse with zombies, reality need not apply - I just drink my blood straight from the bag. wha'kinda loser transfuses, so much slower!

Edit: I gargle first ;)
 
Back
Top