Hallo
Ich habe versucht ein Safezone Script auf mein Server zu packen aber leider ohne Erfolg.
Einmal die savezone.sqf
Spoiler anzeigen
/*
File: fn_safezones.sqf
Editor: #Hank
Description: kein Kravalla in Kavalla
*/
private ["_eh1","_inArea","_zone1","_zone2","_zone3","_zone4","_zone5","_dis"];
_zone1 = getMarkerPos "safezonekavala";
_zone2 = getMarkerPos "safezoneathira";
_zone3 = getMarkerPos "safezoneflughafen";
_zone4 = getMarkerPos "safezonepyrgos";
_zone5 = getMarkerPos "";
_zone6 = getMarkerPos "";
_dis = 280; // DISTANCE SAFE ZONE (euren Marker Radius angeben)
_inArea = false;
switch (playerSide) do
{
case west:
{
while {true} do
{
if (alive player) then
{
if (((_zone1 distance player < _dis) (_zone2 distance player < _dis) (_zone3 distance player < _dis) (_zone6 distance player < _dis) (_zone4 distance player < _dis) (_zone5 distance player < _dis)) && (!_inArea)) then
{
//_eh1 = player addEventHandler ["fired", {deleteVehicle (_this select 6);}];
_inArea = true;
//hint parseText "<t color='#FF0000'><t size='2'><t align='center'>Warnung<br/><br/><t align='center'><t size='1'><t color='#ffffff'>Du betrittst eine Safezone. Holster dein Waffe. Du kannst niemanden ausrauben oder töten!";
player allowDamage false;
};
if (((_zone1 distance player > _dis) && (_zone2 distance player > _dis) && (_zone6 distance player > _dis) && (_zone3 distance player > _dis) && (_zone4 distance player > _dis) &&(_zone5 distance player > _dis)) && (_inArea)) then
{
//player removeEventHandler ["fired", _eh1];
_inArea = false;
//hint parseText "<t color='#FF0000'><t size='2'><t align='center'>Warnung<br/><br/><t align='center'><t size='1'><t color='#ffffff'>Du verlässt die Safezone.";
player allowDamage true;
};
};
};
};
case civilian:
{
while {true} do
{
if (alive player) then
{
if (((_zone1 distance player < _dis) (_zone2 distance player < _dis) (_zone3 distance player < _dis) (_zone6 distance player < _dis) (_zone4 distance player < _dis) (_zone5 distance player < _dis)) && (!_inArea)) then
{
_eh1 = player addEventHandler ["fired", {deleteVehicle (_this select 6);}];
_inArea = true;
//hint parseText "<t color='#FF0000'><t size='2'><t align='center'>Warnung<br/><br/><t align='center'><t size='1'><t color='#ffffff'>Du betrittst eine Safezone. Holster dein Waffe. Du kannst niemanden ausrauben oder töten!";
player allowDamage false;
};
if (((_zone1 distance player > _dis) && (_zone2 distance player > _dis) && (_zone6 distance player > _dis) && (_zone3 distance player > _dis) && (_zone4 distance player > _dis) &&(_zone5 distance player > _dis)) && (_inArea)) then
{
player removeEventHandler ["fired", _eh1];
_inArea = false;
//hint parseText "<t color='#FF0000'><t size='2'><t align='center'>Warnung<br/><br/><t align='center'><t size='1'><t color='#ffffff'>Du verlässt die Safezone.";
player allowDamage true;
};
};
};
};
case independent:
{
while {true} do
{
if (alive player) then
{
if (((_zone1 distance player < _dis) (_zone2 distance player < _dis) (_zone3 distance player < _dis) (_zone6 distance player < _dis) (_zone4 distance player < _dis) (_zone5 distance player < _dis)) && (!_inArea)) then
{
_eh1 = player addEventHandler ["fired", {deleteVehicle (_this select 6);}];
_inArea = true;
//hint parseText "<t color='#FF0000'><t size='2'><t align='center'>Warnung<br/><br/><t align='center'><t size='1'><t color='#ffffff'>Du betrittst eine Safezone. Holster dein Waffe. Du kannst niemanden ausrauben oder töten!";
player allowDamage false;
};
if (((_zone1 distance player > _dis) && (_zone2 distance player > _dis) && (_zone6 distance player > _dis) && (_zone3 distance player > _dis) && (_zone4 distance player > _dis) &&(_zone5 distance player > _dis)) && (_inArea)) then
{
player removeEventHandler ["fired", _eh1];
_inArea = false;
//hint parseText "<t color='#FF0000'><t size='2'><t align='center'>Warnung<br/><br/><t align='center'><t size='1'><t color='#ffffff'>Du verlässt die Safezone.";
player allowDamage true;
};
};
};
};
sleep 3;
};
Und habe die Datei auch in der init.sqf eingetragen
scripts Ordner ist vorhanden