Advertisement
BETEP3526

Untitled

Oct 4th, 2019
747
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 1.25 KB | None | 0 0
  1. /*
  2.     GrenadeStop v0.8 for ArmA 3 Alpha by Bake (tweaked slightly by Rarek)
  3.  
  4.     DESCRIPTION:
  5.     Stops players from throwing grenades in safety zones.
  6.  
  7.     INSTALLATION:
  8.     Move grenadeStop.sqf to your mission's folder. Then add the
  9.     following line to your init.sqf file (create one if necessary):
  10.     execVM "grenadeStop.sqf";
  11.  
  12.     CONFIGURATION:
  13.     Edit the #defines below.
  14. */
  15.  
  16. #define SAFETY_ZONES    [["holdFire", 200],["holdFire_1",200]] // Syntax: [["marker1", radius1], ["marker2", radius2], ...]
  17. #define MESSAGE "Стрельба на базе запрещена!"
  18. #define MORTAR_MESSAGE  "No point you putting that up, soldier; we're fresh out of ammo for those things."
  19. #define AA_MESSAGE  "Sorry, solider! All AA missiles are disabled!"
  20.  
  21. if (isDedicated) exitWith {};
  22. waitUntil {!isNull player};
  23.  
  24. player addEventHandler ["Fired", {
  25.     if ({(_this select 0) distance getMarkerPos (_x select 0) < _x select 1} count SAFETY_ZONES > 0) then
  26.     {
  27.         deleteVehicle (_this select 6);
  28.         titleText [MESSAGE, "PLAIN", 3];
  29.     };
  30.  
  31.     if (_this select 5 == "RPG32_AA_F") then
  32.     {
  33.         deleteVehicle (_this select 6);
  34.         titleText [AA_MESSAGE, "PLAIN", 3];
  35.     };
  36. }];
  37.  
  38. player addEventHandler ["WeaponAssembled", {
  39.     deleteVehicle _this select 1;
  40.     titleText [MORTAR_MESSAGE, "PLAIN", 3];
  41. }];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement