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;";
- expActiv="unitbase = [] execVM ""scripts\base_lock.sqf"";";
- expDesactiv="terminate unitbase; titleText [""You have left the restricted area!""]; player removeaction alarm_on; player removeaction alarm_off;";
- class Effects
- {
- condition="";
- };
- base_lock.sqf: (Side info: Status is declared in init.sqf with Status = 1; publicVariable "Status";)
- _uid = getPlayerUID player;
- if(_uid in PIDArray)
- then {
- titleText ["Welcome back to the Command Post, Soldier!", "PLAIN DOWN", 3];
- alarm_on = player addAction["<t color='#ff0000'>Disable All Kill Zones</t>","scripts\alarm.sqf","",1,false,true,"","Status >= 1"];
- alarm_off = player addAction["<t color='#ff0000'>Enable All Kill Zones</t>","scripts\alarm.sqf","",1,false,true,"","Status <= 0"];
- }
- else
- {
- if(Status >= 1)
- then {
- hintC "You are entering a restricted zone, please turn back.";
- titleText ["You are entering a restricted zone, please turn back.", 3];
- sleep 5;
- titleText ["You have 10 seconds to turn back...", "PLAIN DOWN", 3];
- sleep 15;
- titleText ["You have been warned..!", "PLAIN DOWN", 3];
- sleep 5;
- player setDamage 1;
- };
- };
- alarm.sqf:
- switch (Status) do {
- case 1 :
- {
- Status = 0;
- hintC "You have disabled the kill zones in restricted areas!";
- player removeaction alarm_on;
- };
- case 2 :
- {
- Status = 1;
- hintC "You have enabled the kill zones in restricted areas!";
- sleep 5;
- player removeaction alarm_off;
- };
- default { hintC "Nothing Special, Please Disperse"
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement