Safe Bases - Almost Complete

Code:
  class Item0
        {
            position[]={9845.4043,0,3606.3677};
            a=200;
            b=200;
            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
            {
            };

Code:
if ((getPlayerUID player) in ["16600710","101263750","106387654","107404550","83484998","124084422","123512326","122971078"]) then {
titleText ["Hello Admin.  Welcome back.", "PLAIN DOWN", 3];
} else {
titleText ["This is a protected base, leave now, or perish!", "PLAIN DOWN", 3];
sleep 5;
titleText ["You have 15 seconds to turn back...", "PLAIN DOWN", 3];
sleep 5;
titleText ["You have less than 10 seconds to leave.", "PLAIN DOWN", 3];
sleep 5;
titleText ["You were warned..!", "PLAIN DOWN", 3];
sleep 5;
player setDamage 1;
};


I'm using the standard code provided in this thread.

Where do you want me to place this looping trigger?


change this:
Code:
if ((getPlayerUID player) in ["16600710","101263750","106387654","107404550","83484998","124084422","123512326","122971078"]) then {
titleText ["Hello Admin.  Welcome back.", "PLAIN DOWN", 3];
} else {
titleText ["This is a protected base, leave now, or perish!", "PLAIN DOWN", 3];
sleep 5;
titleText ["You have 15 seconds to turn back...", "PLAIN DOWN", 3];
sleep 5;
titleText ["You have less than 10 seconds to leave.", "PLAIN DOWN", 3];
sleep 5;
titleText ["You were warned..!", "PLAIN DOWN", 3];
sleep 5;
player setDamage 1;
};

to this:
Code:
// Base Owners  camp
if ((getPlayerUID player) in [""16600710","101263750","106387654","107404550","83484998","124084422","123512326","122971078""]) exitWith {
titleText ["You are cleared to stay...  Welcome back.", "PLAIN DOWN", 3];
};
// Everyone Else
titleText ["You have less than 5 seconds to leave, or you will be fried, like chicken.", "PLAIN DOWN", 3];
sleep 5;
titleText ["5", "PLAIN DOWN", 3];
sleep 1;
titleText ["4", "PLAIN DOWN", 3];
sleep 1;
titleText ["3", "PLAIN DOWN", 3];
Sleep 1;
titleText ["2", "PLAIN DOWN", 3];
sleep 1;
titleText ["1", "PLAIN DOWN", 3];
sleep 1;
player setDamage 1;
sleep 1;
 
Is that intended to fix the problem with players bypassing protected base triggers?

Also you put 2 "" in the UID's" that can't be right.
 
@leolilu Can you see anything in here that would stop some people from getting in but not others that are in the list? at least for of them can not get in but the others can.

Code:
waituntil{player == player};
waitUntil {!isNil "bis_fnc_init"};
 
AllowedPlayersArray = ["123456" , "123456" , "123456" , "123456" , "123456" , "123456" , "123456" , "123456" , "123456" , "123456" , "123456" , "123456"];
 
_condition = "(vehicle player) in thislist";
_activation = "
        if ((getPlayerUID player) in AllowedPlayersArray) then {
            titleText [""You are cleared to stay...  Welcome back to fions camp."", ""PLAIN DOWN"", 3];
        }else{
            cuttext ["""",""PLAIN DOWN""];
            _directionto = [(trigger1),(vehicle player)] call BIS_fnc_dirTo;
            if(_directionto < 0) then {_directionto = _directionto + 360};
            _positionPlayer = getposATL vehicle player;
            _setNewPos = [trigger1, (400 + 1), _directionto] call BIS_fnc_relPos;
            _setNewPos set [2,(_positionPlayer select 2)];
            vehicle player setPos _setNewPos;
            _velo = (velocity (vehicle player));
            _velo set[0,(((_velo select 0) / 3) * -1)];
            _velo set[1,(((_velo select 1) / 3) * -1)];
            vehicle player setVelocity _velo;
        };
        hintsilent ""Entering Trigger"";
";
_deactivation = "hintsilent ""YOU HAVE BEEN TELEPORTED OUT OF A PROTECTED DOME""; cuttext ["""",""PLAIN DOWN""];";
 
_trigger_0 = createTrigger ["EmptyDetector", [398, 4591, 0]]; 
_trigger_0 setTriggerActivation ["ANY", "PRESENT", true];
_trigger_0 setTriggerArea [200, 200, 0, false];
_trigger_0 setTriggerType "SWITCH";
_trigger_0 setTriggerText "Trigger1";
_trigger_0 setTriggerStatements [_condition, _activation, _deactivation];
trigger1 = _trigger_0;
 
_marker_0 = createMarker ["triggermarker_1", [398, 4591, 0]];
_marker_0 setMarkerText "Protected camp Do not enter";
_marker_0 setMarkerShape "ELLIPSE";
_marker_0 setMarkerType "mil_objective";
_marker_0 setMarkerBrush "Border";
_marker_0 setMarkerSize [100, 100];
marker1 = _marker_0;
 
// Player Position Marker //
[] spawn {
    private ["_pos", "_mkr"];
    _pos = getPos player;
    PName = "You";
    _mkr = createMarkerLocal [format ["Plr%1%2", _pos select 0, _pos select 1], [(_pos select 0) + 20, _pos select 1, 0]];
    _mkr setMarkerTypeLocal "waypoint";
    _mkr setMarkerSizeLocal [0.5,0.5];
    _mkr setMarkerColorLocal "ColorBlue";
    _mkr setMarkerTextLocal format ["%1", name player];
    _mkr setMarkerTextLocal PName;
 
    [player, _mkr] spawn {
        private ["_obj", "_marker"];
        _obj = _this select 0;
        _marker = _this select 1;
        while {(alive _obj)} do {
            _marker setMarkerPosLocal (getPos _obj);
            sleep 0.05;
        };
    };
};
 
Many of my players are reporting that when they fly over a base that has a trigger in it, the timer still counts down even though they've left the radius of the trigger, and they die. Anyway to fix this?
 
do the four that can not enter or the others that can enter have 'AX' in there UID ?


no using player id's so all of them are just numbers. I have tried removing the spaces between them "12345","12313" also and 1 more was able to get in.... very weird. Also the first uid can always get in the rest are now not able to get in at all. Is there something in the AllowedPlayersArray that needs to be different? Do i need something like... publicVariable "AllowedPlayersArray "; or change this to _AllowedPlayersArray ??
 
hm... you are using the words 'player id' und 'uid', thats a bit confusing
the UID is the unique player id based on GUID/GameKey and is a string that can also contain letters/characters (for example steam accounts can have 'AX' at there UID end)
the player id can be the ID of an char in the survivers table(that would change after player dead), or the client ID that changed on client connect.

if you are using 'getPlayerUID' you will get a string instead of a number...

Is there something in the AllowedPlayersArray that needs to be different? Do i need something like... publicVariable "AllowedPlayersArray"; or change this to _AllowedPlayersArray ??
AllowedPlayerArray is defined in the same script as global variable and this script runs on each client, so each client knows the content of AllowedPlayerArray
 
I think... i may have found the issue. I'm running multiple domes. So the AllowedPlayerArray would need to be unique for each one? otherwise it would only accept a uid that was on "all" domes. right?
 
if you have one script for each 'dome' you can deklare AllowedPlayerArray as local variable for this running script
rename AllowedPlayerArray to _allowedPlayerArray , variable with _ at the beginning are script local, to be on the safe side add this to line 1 off the scripts
Code:
private ["_allowedPlayerArray"];

simply you can make one variable for each 'dome' if you want
 
awesome thanks. yeah i just renamed the variable for each dome atm but that is a much easier way thank you!
 
Can som1 test a bug for me, get a person who is not on the ID list of the trigger to fly a heli through the trigger, after leaving the perimeter they will still die.

I need a fix for this.
 
i suppose for some reason your
Code:
AdminBase = [] execVM ""Scripts\adminbase.sqf"";
has triggered more then one time but only one instance was terminated by leaving the trigger
you can try to avoid this by set a terminate before script call
Code:
terminate AdminBase; AdminBase = [] execVM ""Scripts\adminbase.sqf"";
 
Code:
waituntil{player == player};
waitUntil {!isNil "bis_fnc_init"};
AllowedPlayersArray = ["123456" , "123456" , "123456" , "123456" , "123456" , "123456" , "123456" , "123456" , "123456" , "123456" , "123456" , "123456"];
_condition = "(vehicle player) in thislist";
_activation = "
        if ((getPlayerUID player) in AllowedPlayersArray) then {
            titleText [""You are cleared to stay...  Welcome back to fions camp."", ""PLAIN DOWN"", 3];
        }else{
            cuttext ["""",""PLAIN DOWN""];
            _directionto = [(trigger1),(vehicle player)] call BIS_fnc_dirTo;
            if(_directionto < 0) then {_directionto = _directionto + 360};
            _positionPlayer = getposATL vehicle player;
            _setNewPos = [trigger1, (400 + 1), _directionto] call BIS_fnc_relPos;
            _setNewPos set [2,(_positionPlayer select 2)];
            vehicle player setPos _setNewPos;
            _velo = (velocity (vehicle player));
            _velo set[0,(((_velo select 0) / 3) * -1)];
            _velo set[1,(((_velo select 1) / 3) * -1)];
            vehicle player setVelocity _velo;
        };
        hintsilent ""Entering Trigger"";
";
_deactivation = "hintsilent ""YOU HAVE BEEN TELEPORTED OUT OF A PROTECTED DOME""; cuttext ["""",""PLAIN DOWN""];";
_trigger_0 = createTrigger ["EmptyDetector", [2286.0662, 14409.885, 0]];
_trigger_0 setTriggerActivation ["ANY", "PRESENT", true];
_trigger_0 setTriggerArea [100, 100, 0, false];
_trigger_0 setTriggerType "SWITCH";
_trigger_0 setTriggerText "Trigger1";
_trigger_0 setTriggerStatements [_condition, _activation, _deactivation];
trigger1 = _trigger_0;

// Player Position Marker //
[] spawn {
    private ["_pos", "_mkr"];
    _pos = getPos player;
    PName = "You";
    _mkr = createMarkerLocal [format ["Plr%1%2", _pos select 0, _pos select 1], [(_pos select 0) + 20, _pos select 1, 0]];
    _mkr setMarkerTypeLocal "waypoint";
    _mkr setMarkerSizeLocal [0.5,0.5];
    _mkr setMarkerColorLocal "ColorBlue";
    _mkr setMarkerTextLocal format ["%1", name player];
    _mkr setMarkerTextLocal PName;
    [player, _mkr] spawn {
        private ["_obj", "_marker"];
        _obj = _this select 0;
        _marker = _this select 1;
        while {(alive _obj)} do {
            _marker setMarkerPosLocal (getPos _obj);
            sleep 0.05;
        };
    };
};

I got this bit working, now how do i add more than 1 dome with seperate allowedPlayersList for each dome
 
Back
Top