Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (!isServer) exitWith {};
- private ["_eh1","_inNoGrenadeZone","_noGrenadeZone","_dis"];
- _inNoGrenadeZone = false;
- _noGrenadeZone = getMarkerPos "noGrenadesArea001";
- _dis = 200;
- if (alive player) then {
- if (_noGrenadeZone distance player > _dis) then {
- _inNoGrenadeZone = false;
- if (isPlayer player) then {
- systemChat format["You are no longer in the mission Area %1. You can now use Grenades.", (name player)];
- };
- }else{
- _inNoGrenadeZone = true;
- systemChat format["You have entered the Mission Zone %1. You cant use Hand Grenades here.", (name player)];
- _eh1 = player addEventHandler ["fired", {deleteVehicle (_this select 6); titleText ["Firing/Grenades Disabled in a safe zone!", "PLAIN", 3]; titleFadeOut 1; }];player addEventHandler ["fired", {deleteVehicle (_this select 6); titleText ["Firing/Grenades Disabled in a safe zone!", "PLAIN", 3]; titleFadeOut 1; }];
- };
- };
- while {true} do {
- if (alive player) then {
- if ((_noGrenadeZone distance player < _dis) && (!_inNoGrenadeZone)) then {
- _eh1 = player addEventHandler ["fired", {deleteVehicle (_this select 6); titleText ["Firing/Grenades Disabled in a safe zone!", "PLAIN", 3]; titleFadeOut 1; }];player addEventHandler ["fired", {deleteVehicle (_this select 6); titleText ["Firing/Grenades Disabled in a safe zone!", "PLAIN", 3]; titleFadeOut 1; }];
- _inNoGrenadeZone = true;
- if (isPlayer player) then {
- systemChat format["You have entered the Mission Zone %1. You cant use Hand Grenades here.", (name player)];
- };
- };
- if ((_noGrenadeZone distance player > _dis) && (_inNoGrenadeZone)) then {
- player removeEventHandler ["fired", _eh1];
- _inNoGrenadeZone = false;
- if (isPlayer player) then {
- systemChat format["You are no longer in the mission Area %1. You can now use Grenades.", (name player)];
- };
- };
- };
- sleep 1;
- };if (!isServer) exitWith {};
- private ["_eh1","_inNoGrenadeZone","_noGrenadeZone","_dis"];
- _inNoGrenadeZone = false;
- _noGrenadeZone = getMarkerPos "noGrenadesArea001";
- _dis = 200;
- if (alive player) then {
- if (_noGrenadeZone distance player > _dis) then {
- _inNoGrenadeZone = false;
- if (isPlayer player) then {
- systemChat format["You are no longer in the mission Area %1. You can now use Grenades.", (name player)];
- };
- }else{
- _inNoGrenadeZone = true;
- systemChat format["You have entered the Mission Zone %1. You cant use Hand Grenades here.", (name player)];
- _eh1 = player addEventHandler ["fired", {deleteVehicle (_this select 6); titleText ["Firing/Grenades Disabled in a safe zone!", "PLAIN", 3]; titleFadeOut 1; }];player addEventHandler ["fired", {deleteVehicle (_this select 6); titleText ["Firing/Grenades Disabled in a safe zone!", "PLAIN", 3]; titleFadeOut 1; }];
- };
- };
- while {true} do {
- if (alive player) then {
- if ((_noGrenadeZone distance player < _dis) && (!_inNoGrenadeZone)) then {
- _eh1 = player addEventHandler ["fired", {deleteVehicle (_this select 6); titleText ["Firing/Grenades Disabled in a safe zone!", "PLAIN", 3]; titleFadeOut 1; }];player addEventHandler ["fired", {deleteVehicle (_this select 6); titleText ["Firing/Grenades Disabled in a safe zone!", "PLAIN", 3]; titleFadeOut 1; }];
- _inNoGrenadeZone = true;
- if (isPlayer player) then {
- systemChat format["You have entered the Mission Zone %1. You cant use Hand Grenades here.", (name player)];
- };
- };
- if ((_noGrenadeZone distance player > _dis) && (_inNoGrenadeZone)) then {
- player removeEventHandler ["fired", _eh1];
- _inNoGrenadeZone = false;
- if (isPlayer player) then {
- systemChat format["You are no longer in the mission Area %1. You can now use Grenades.", (name player)];
- };
- };
- };
- sleep 1;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement