Advertisement
Guest User

Untitled

a guest
May 23rd, 2016
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. trigger:
  2.  
  3. class Item24
  4. {
  5. position[]={15267.027,18.01264,17250.303};
  6. a=53;
  7. b=64;
  8. angle=-135;
  9. rectangular=1;
  10. activationBy="WEST";
  11. repeating=1;
  12. interruptable=1;
  13. age="UNKNOWN";
  14. text="CommandPost";
  15. name="CommandPost";
  16. expCond="(vehicle player) in thislist;";
  17. expActiv="unitbase = [] execVM ""scripts\base_lock.sqf"";";
  18. expDesactiv="terminate unitbase; titleText [""You have left the restricted area!""]; player removeaction alarm_on; player removeaction alarm_off;";
  19. class Effects
  20. {
  21. condition="";
  22. };
  23.  
  24. base_lock.sqf: (Side info: Status is declared in init.sqf with Status = 1; publicVariable "Status";)
  25.  
  26. _uid = getPlayerUID player;
  27. if(_uid in PIDArray)
  28. then {
  29. titleText ["Welcome back to the Command Post, Soldier!", "PLAIN DOWN", 3];
  30. alarm_on = player addAction["<t color='#ff0000'>Disable All Kill Zones</t>","scripts\alarm.sqf","",1,false,true,"","Status >= 1"];
  31. alarm_off = player addAction["<t color='#ff0000'>Enable All Kill Zones</t>","scripts\alarm.sqf","",1,false,true,"","Status <= 0"];
  32. }
  33. else
  34. {
  35. if(Status >= 1)
  36. then {
  37. hintC "You are entering a restricted zone, please turn back.";
  38. titleText ["You are entering a restricted zone, please turn back.", 3];
  39. sleep 5;
  40. titleText ["You have 10 seconds to turn back...", "PLAIN DOWN", 3];
  41. sleep 15;
  42. titleText ["You have been warned..!", "PLAIN DOWN", 3];
  43. sleep 5;
  44. player setDamage 1;
  45. };
  46. };
  47.  
  48. alarm.sqf:
  49.  
  50. switch (Status) do {
  51. case 1 :
  52. {
  53. Status = 0;
  54. hintC "You have disabled the kill zones in restricted areas!";
  55. player removeaction alarm_on;
  56. };
  57. case 2 :
  58. {
  59. Status = 1;
  60. hintC "You have enabled the kill zones in restricted areas!";
  61. sleep 5;
  62. player removeaction alarm_off;
  63. };
  64. default { hintC "Nothing Special, Please Disperse"
  65. };
  66. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement