[Request] Player ID zone restriction and humanity restriction zone

I highly recommend researching this stuff yourself, as simply adding a script, asking people to baby-step you through it all and not knowing what you've just done to your mission file can get you into hot water. Remember, once a player connects to your server and downloads the mission file , there's nothing stopping them from opening it and looking through your code for possible cheat exploits. I get people asking for white listing on my server all the time, just so they can download my mission file and rip my code. So I make sure I understand everything I've added, so in the event of a hack I can remove the script responsible and have my server back online within the hour.
 
Or maybe the people asking the questions could do a little research, what I've posted is pretty straight forward and short of actually doing it for you, I can't really offer much more. If people are going to get into modding their mission files they should at least know the basics. I'm getting questions in my inbox as dumb as "I can't add the zone to my database... I normally just use <add tool name> to import everything into instance_building" and "which mission file do I edit?" .. I mean really, if people don't know what a trigger or a zone is , they shouldn't be touching their files yet and as for asking which files to edit, when the post actually has the names of the files right there in front of your eyes, then like I said.. short of doing it all for you, I'm not sure what else we can do :)

I like to help people who have at least proven they've done their homework first. Being a lazy mans go-to-guy isn't me :p


Oh thx for teaching :)
!"Scripts\adminbase.sqf" is exactly what i have inside in my script.txt of battleeye. Be sure i tried to make my homework before i ask in this forum. My line 40 of BE looks so: " 5 serverCommandAvailable !"\"serverCommandAvailable\"," !"Scripts\adminbase.sqf" , but it doesnt work very well. So i cant respawn in the safezone

I do really my best ;)
 
Oh thx for teaching :)
!"Scripts\adminbase.sqf" is exactly what i have inside in my script.txt of battleeye. Be sure i tried to make my homework before i ask in this forum. My line 40 of BE looks so: " 5 serverCommandAvailable !"\"serverCommandAvailable\"," !"Scripts\adminbase.sqf" , but it doesnt work very well. So i cant respawn in the safezone

I do really my best ;)

Just a quick search in these forums and on google will explain why you're getting it wrong (you haven't searched far lol). You are putting it on the wrong line, even though battle Eye says #40 (line 40) , it actually means 42 (usually!). I'd look in the script for the commands being called i.e in this script they are setDamage and removeAllWeapons , so if you look near line 40 you should see something like " 5 setDamage " and " 5 removeAllWeapons " ...

Be careful what you do, if you don't understand where you're putting code, you are risking opening a backdoor for script kiddies on your server ;)
 
It's pretty easy to build?

From mission file....
Code:
    class Item3
        {
            position[]={secretlocation};
            a=650;
            b=500;
            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.";
            };
        };

from adminbase.sqf

Code:
if ((getPlayerUID player) in ["xxxxxx"]) then {
titleText ["Hello Admin.  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 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;
};

Can someone confirm/deny that this works or not ?

:confused:
 
@urbanskaters, when you get the location from the sqm file after using the editor do you have to rearange it? seems like it always comes out x,y,z and needs to be x,z,y. Also z is always a 0.556464 number should that be changed to 0?
 
@urbanskaters, when you get the location from the sqm file after using the editor do you have to rearange it? seems like it always comes out x,y,z and needs to be x,z,y. Also z is always a 0.556464 number should that be changed to 0?

I've only done this via the 2D editor, if you're doing through the 3D editor then either convert it first, or wait for someone else to answer your question. Sorry !
 
For the first time in 5 days after working on this, i did not get stuck on wait for host, i was so happy!!
then i did press OK in lobby, and got the message: Could not load mission.
Im getting there soon...i think...maybe.

EDIT:

!!!! FINALLY!!!! Works perfectly, but the text is disappearing faster than i can read it, but its working!!
 
For anyone still struggling , here is a working example (I've removed all my other custom code , including the dayz settings.. so it should run under preview in your editor). Don't just cut and paste from the mission files, actually open it up in the 2D editor and look at the Triggers settings. This should help you to understand how it works. I can't explain it any better so good luck :)
 

Attachments

  • adminbase.chernarus.zip
    2.7 KB · Views: 86
!!!! FINALLY!!!! Works perfectly, but the text is disappearing faster than i can read it, but its working!!

That is controlled by the "sleep" command. If it's going faster than the sleep command is set for, then you should check what might be causing this. It's not good to just say "oh well, i can live with that" .. It might be causing other things in your server scripts to "go faster" ;)
 
That is controlled by the "sleep" command. If it's going faster than the sleep command is set for, then you should check what might be causing this. It's not good to just say "oh well, i can live with that" .. It might be causing other things in your server scripts to "go faster" ;)
Thanks dude, its sorted =)
 
Hey, is there a way to get a player's connection time? Or to see if they disconnect?

For example:
if ((player connectTime) <1:00) then
{
player setDamage 1;
}

Because at the moment if you log off you avoid the whole timer kill zone thing for another few seconds.
 
Code:
        };   
    };   
    class Sensors
    {
        items=2;
        class Item0
        {
            position[]={8150.7515,0.41748,9174.0488};
            a=200;
            b=200;
            activationBy="WEST";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="Hero Base";
            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 the hero base, it's a restricted zone.";
            };
        };   
        class Item 1
        {
            position[]={1198.6938,347.29651,10061.024};
            a=400;
            b=400;
            activationBy="WEST";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="Bandit Base";
            expCond="(vehicle player) in thislist;";
            expActiv="banditbase = [] execVM ""Scripts\banditbase.sqf"";";
            expDesactiv="terminate banditbase; titleText [""You have left the Bandit Base!"", ""PLAIN DOWN"", 3];";
            class Effects
            {
                titleType="TEXT";
                titleEffect="PLAIN DOWN";
                title="You are entering the bandit base, it's a restricted zone.";
            };   
        };       
    };   
};
class Intro

Anyone having an idea why i cant get my "Item1" to work? If i remove it, i will be able to join my server, if not i do get stuck on Wait for host. The herobase one works perfectly, but as soon as i tried to implement the bandit one, i did not get it to work.
 
I know this is old, but does anyone know how to have it set a position, - teleport them back or put at a set position on the map instead of killing? I am trying setPos but maybe thats the wrong thing to be used
 
Get the unid of the admins, there you go

where would i put this code

class Item3
{
position[]={secretlocation};
a=650;
b=500;
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.";
};
};
 
Back
Top