Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2020
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.43 KB | None | 0 0
  1. !hint 'Hello World!;
  2.  
  3. enablesaving [false, false];
  4.  
  5. // Class variables
  6. hostile_class = "I_C_Soldier_Bandit_8_F";
  7. hostile_marker_class = "SignAd_SponsorS_Vrana_F";
  8. hostage_class = "C_scientist_F";
  9. hostage_marker_class = "SignAd_SponsorS_Suatmm_F";
  10. position_marker_class = "VR_3DSelector_01_default_F";
  11.  
  12. // HUD variables
  13. total_score = 0;
  14. previous_score = 0;
  15. total_hostiles = 0;
  16. hostiles_alive = 0;
  17. total_hostages = 0;
  18. hostages_remaining = 0;
  19. hostages_rescued = 0;
  20. headshots_count = 0;
  21. player_shots_fired = 0;
  22. hostile_hit_count = 0;
  23.  
  24. // Scoring variables
  25. score_player_hit = -10;
  26. score_hostage_killed = -50;
  27. score_hostage_rescued = 50;
  28. score_hostile_killed = 20;
  29. score_headshot = 10;
  30. score_multikill = 10;
  31.  
  32. // Difficulty variables
  33. max_diff_rating = 5;
  34. diff_rating = 3;
  35. diff_names = ["Very Easy", "Easy", "Normal", "Hard", "Realism"];
  36. diff_damage_taken = [0, .1, .25, .50, 1];
  37. diff_score_multiplier = [1, 1.5, 2, 2.5, 3];
  38.  
  39. // Control variables
  40. run_start_time = 0; // Seconds
  41. previous_run_time = 0; // Seconds
  42. last_hostile_hit = 0; // Seconds
  43. last_kill = 0; // Seconds
  44. multikill_limit = 2; // Max seconds between kills for multikill
  45. hit_count_limit = 0.1; // Max time between 'hitpart' event fired to count total hostile hits
  46. new_round_starting = false;
  47. round_ending = false;
  48. hostiles_marked = false;
  49. timer_started = false;
  50. god_mode_enabled = false;
  51. player_infinite_ammo = false;
  52.  
  53. // Mod detection
  54. ace_is_loaded = isClass(configFile >> "CfgPatches" >> "ace_main");
  55.  
  56. // Add Player Actions
  57. player addAction ["[CQC] Start New Round", {[1] execVM "scripts\new_round.sqf";}, [], 2, false, true];
  58. player addAction ["[CQC] Toggle Day/Night", {execVM "scripts\toggle_day_night.sqf";}, [], 2, false, true];
  59. player addAction ["[CQC] Show Enemies", {execVM "scripts\toggle_show_enemies.sqf";}, [], 2, false, true];
  60. player addAction ["[CQC] Refill Ammo", {execVM "scripts\refill_ammo.sqf";}, [], 2, false, true];
  61. player addAction ["[CQC] Infinite Ammo", {execVM "scripts\toggle_infinite_ammo.sqf";}, [], 2, false, true];
  62.  
  63. // Remove ACE medical event handlers
  64. if (ace_is_loaded) then {
  65. player removeAllEventHandlers "hit";
  66. player removeAllEventHandlers "hitpart";
  67. player removeAllEventHandlers "handledamage";
  68. player removeAllEventHandlers "killed";
  69. player removeAllEventHandlers "explosion";
  70. player removeAllEventHandlers "dammaged";
  71. };
  72.  
  73. // Disable saving
  74. enableSaving [false, false];
  75.  
  76. // Give the player an action to toggle difficulty level
  77. player addAction ["[CQC] Toggle Difficulty", {[max_diff_rating, diff_rating, diff_damage_taken] execVM "scripts\toggle_difficulty.sqf";}, [], 2, false, false];
  78.  
  79. // Support damage scaling with difficulty adjustments
  80. player addEventHandler ["hit", {[_this select 0, _this select 1, _this select 2, _this select 3] execVM "scripts\player_hit.sqf";}];
  81. player addEventHandler ["handleDamage", {[_this select 0, _this select 1, _this select 2, _this select 3] execVM "scripts\player_handle_damage.sqf";}];
  82.  
  83. // Universal player events
  84. player addEventHandler ["killed", {[_this select 0, _this select 1, _this select 2] execVM "scripts\player_killed.sqf";}];
  85. player addEventHandler ["fired", {[] execVM "scripts\player_fired.sqf";}];
  86.  
  87. // Load CQCHUD
  88. sleep 1; // Do not remove
  89. 1 cutRsc ["CQCHUD","PLAIN"];
  90.  
  91. // Start a new match
  92. null = [0] execVM "scripts\new_round.sqf";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement