Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Trigger:
- class Item24
- {
- position[]={15267.027,18.01264,17250.303};
- a=53;
- b=64;
- angle=-135;
- rectangular=1;
- activationBy="WEST";
- repeating=1;
- interruptable=1;
- age="UNKNOWN";
- text="CommandPost";
- name="CommandPost";
- expCond="(vehicle player) in thislist && (Status == 1);";
- expActiv="unitbase = [] execVM ""scripts\base_lock.sqf"";";
- expDesactiv="terminate unitbase; titleText [""You have left the restricted area!""]; ";
- class Effects
- {
- condition="";
- };
- };
- Base_lock.sqf:
- _uid = getPlayerUID player;
- if(_uid in PIDArray)
- then {
- _message = format ["Welcome back to the Command Post, %1!",name player];
- titleText [_message, "PLAIN DOWN", 1];
- }
- else
- {
- hintC "You are entering a restricted zone, please turn back.";
- titleText ["You are entering a restricted zone, please turn back.", 0.5];
- sleep 5;
- titleText ["You have 10 seconds to turn back...", "PLAIN DOWN", 0.5];
- sleep 5;
- titleText ["You have been warned..!", "PLAIN DOWN", 0.5];
- sleep 5;
- player setDamage 1;
- };
- Laptop:
- class Item1351
- {
- position[]={15272.451,18.10956,17243.449};
- azimut=671.69598;
- offsetY=1.4;
- id=1440;
- side="EMPTY";
- vehicle="Land_Laptop_unfolded_F";
- skill=0.60000002;
- text="airdefenseTerminal_1_1";
- init="this allowDamage false; this enableSimulation false; access = this execVM ""scripts\killzones.sqf"";";
- };
- killzones.sqf:
- WaitUntil{!isNull player};
- waitUntil {(getPlayerUID player) != ""};
- _uid = getPlayerUID player;
- if(_uid in PIDArray) then
- {
- alarm_on = _this addAction["<t color='#ffff00'>Disable All Kill Zones</t>","scripts\alarm.sqf","",1,false,true,"","Status == 1 && (player distance _target < 3)"];
- alarm_off = _this addAction["<t color='#ffff00'>Enable All Kill Zones</t>","scripts\alarm.sqf","",1,false,true,"","Status == 0 && (player distance _target < 3)"];
- };
- alarm.sqf:
- switch (Status) do {
- case 1 :
- {
- Status = 0;
- systemChat "Killzones in restricted areas have been deactivated!"
- };
- case 0 :
- {
- Status = 1;
- systemChat "Killzones in restricted areas have been activated!"
- };
- default
- {
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement