[Request] Zone base warning/kill

- Zsquad - IT07

New Member
Hi all,

I am trying to get a certain script to work on my Bliss DayZ.st server that should protect the Admin base from getting raded when I'm not online.
There are threads on here that have example scripts, so I used them.

But unfortunately, it doesn't work.
The code I used is pasted below:

Thanks a lot in advance :)
 
ok, so I found a script that should work, but it just doesn't work!! I have been trying for soooo long now, there has to be something that is incorrect....

here is my script for the mission.sqm file:
Code:
class Sensors
    {
        items=1;
        class Item0
        {
            position[]={1222.99,2506.65,5.95301};
            a=130;
            b=90;
            rectangular="1";
            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've just saved yourself a PERM BAN"", ""PLAIN DOWN"", 3];";
            class Effects
            {
                titleType="TEXT";
                titleEffect="PLAIN DOWN";
                title="You have entered a restricted area, you will be banned if you don't leave";
            };
        };
    };

And this is the code for "adminbase.sqf"

Code:
PlayerHumanity = (player getVariable"humanity");
if (PlayerHumanity > 120000) then {
titleText ["Welcome home.", "PLAIN DOWN", 3];
} else {
titleText ["You are entering a restriced area. Leave within 15 seconds or you WILL BE KILLED", "PLAIN DOWN", 3];
sleep 15;
player setDamage 1;
};

there are no errors in terms of brackets and stuff, because I can play in my server with this code in the mission file.

PLEASE help me, I'm so sick and tired of this :(
 
Im not very good at this sort of stuff but i would presume it is because you only get the warning if your humanity is above 120000 im not sure but thats what i think the problem is??
 
Try with UID's rather than humanity based:
Code:
if ((getPlayerUID player) in ["########"]) exitWith {
titleText ["Welcome to your base", "PLAIN DOWN", 3];
};

"########" Being your UID.
 
Exactly! I figured out myself before I read your reply, but thanks a lot anyhow :)

CASE SOLVED!

Cause of problem: coords in wrong order, it should be:
Code:
position[]={distanceinmetersfromwest,altitudeinmeters,distanceinmetersfromsouth};
 
That will be a pain in the ass to setup because anti-tp from dayz might block it and keep the player in a infinite teleporting loop. But seriously, if you warn a player like 5 times to get out and they still don't..... Then they gave some bad ideas in mind so punish the fucker by killing him.
 
This is cool code and all works great for ground vehicles coming into a base but when a player fly's over the base it teleports or kills them. How do you change the height of the dome. to be like say 20 meters in the air?
 
Just warn long enough for the player do get out of the dome. That's all.
Sure, if you insta kill players if they enter, then it's not good for people flying over.
The dome on my Admin base waits for 20 seconds and gives warnings during that time so people that "accidentily" fly over will not be killed within seconds.

EDIT: this link is usefull, made it myself: http://dayz.st/w/Protected_Dome
 
Yeh co-ords shud be X,Z,Y

Getting co-ords from database
taken from your survivors world location in ur database wud look like
[107,[1234.56,6543.21,0.00012]]
DIR X Y Z

Dir= Direction you are facing
X = horizontal
Y = vertical
Z = height

So what u need to do is get rid of Direction and Height

So all you will be left with is

1234.56 and 6543.21

Soo now what you need to do is put them in your sensors table

position[]={1234.56,###,6543.21};
X Z Y



Setting Z
Z works from the ground up, so if you set this to 500, your dome wud go from 0 (ground level) upto 500 meters in the sky

so your final position would look like

position[]={1234.56,500,6543.21};
X Z Y
 
That will be a pain in the ass to setup because anti-tp from dayz might block it and keep the player in a infinite teleporting loop. But seriously, if you warn a player like 5 times to get out and they still don't..... Then they gave some bad ideas in mind so punish the fucker by killing him.

Excellent point.

Setting Z
Z works from the ground up, so if you set this to 500, your dome wud go from 0 (ground level) upto 500 meters in the sky

Gorsy, Thanks for that breakdown. I set all my domes 'z' to '0' (zero) and they appear to go as high as you can fly (never tried to see how high) so I assume that when z=0 it will be infinite height and z >0 will be a specific height? If my assumption is correct this could be useful in some events I am planning
 
hey guys,
I've got one question. Is it Possible to protect a base against zombies with some modifications to this scrip?
I fond very much of code with google but nothing that works good. someone an idea?

greetings Gater
 
yes it c
hey guys,
I've got one question. Is it Possible to protect a base against zombies with some modifications to this scrip?
I fond very much of code with google but nothing that works good. someone an idea?

greetings Gater

yes it can,

use Sarges Zed Nuker script.
 
The altitude/elevation doesnt for me for some reason.

I posted a thread before I found this one.

position[]={1503.3221,50,15217.713};
a=50;
b=50;

I'm not exactly sure how a,b work but it seems like my elevation should be set how the others are set not in the postition?

I tested this and flew up 200m still never left the dome.
 
Back
Top