Jump to content
  • 0

Safe zone


Nullfati

Question

This script dont work on the server:

/*
    GrenadeStop v0.8 for ArmA 3 Alpha by Bake (tweaked slightly by Rarek)
    
    DESCRIPTION:
    Stops players from throwing grenades in safety zones.
    
    INSTALLATION:
    Move grenadeStop.sqf to your mission's folder. Then add the
    following line to your init.sqf file (create one if necessary):
    execVM "grenadeStop.sqf";
    
    CONFIGURATION:
    Edit the #defines below.
*/

#define SAFETY_ZONES    [["respawn_west", 20],["RESPAWN_Guer",20],["respawn-east",15]] // Syntax: [["marker1", radius1], ["marker2", radius2], ...]
#define MESSAGE "Firing/Grenades Disable this close to Spawn!"

if (isDedicated) exitWith {};
waitUntil {!isNull player};

player addEventHandler ["Fired", {
    if ({(_this select 0) distance getMarkerPos (_x select 0) < _x select 1} count SAFETY_ZONES > 0) then
    {
        deleteVehicle (_this select 6);
        titleText [MESSAGE, "PLAIN", 3];
    };
}];  

and in Init.sqf:

[] execVM "GrenadeStop.sqf";

Any idea how to make it work?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Because you don't have the 3 required markers for script to work. If you have markers, you'll need to add their names and distances by editing this script, or create new markers if don't exist.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...