FANDOM


Description

Safe zones prevent zombies, bandits or renegades from spawning. This allows you to create a safe starting point or make an area suitable for a base.
Trigger

1. place a trigger over the area you want to be protected.

Trigger Setup

2. Then fill in the trigger properties as seen in the above screenshot.

Scripts

You will need to create two sqf files to let the player know he is entering and leaving the Safe Zone, to create these 2 scripts do the following:

a. Start 2 new notepad documents

b. Name 1 following----> EnterSZ.sqf and the 2nd---> LeaveSZ.sqf then save.

c. For the EnterSZ.sqf copy and paste the code seen in the 1st box below, then save, for the 2nd script for the LeaveSZ.sqf post the code below seen in the bottom box, then save.

d.Next take both scripts and move them to the folder of your mission.

EnterSZ.sqf

if (isDedicated) exitWith {};
waitUntil {!isNull player};
waitUntil {!isNil "playerSpawning" && {!playerSpawning}};
 _title  = "<t color='#FFFFFF' size='1.2' align='center'>Safe Zone </t><br />";
 _name = format ["%1<br /> ",name player];    
_text = "<t color='#00ff00' shadow='1' shadowColor='#000000' align='center'>You are entering the Safe Zone</t><br />";
 hint parsetext (_title +  _name +  _text);
 playsound "Topic_Done";

LeaveSZ.sqf

_title  = "<t color='#00ff00' size='1.2' align='center'>Safe Zone </t><br />";
_name = format ["%1<br /> ",name player];    
_text = "<t color='#ff0000' shadow='1' shadowColor='#000000' align='center'>You are leaving the Safe Zone!</t><br />";    
hint parsetext (_title +  _name +  _text);
playsound "Topic_Done";

Code and images courtesy of (ie stolen from) .Frankie