bajaboy1972
Well-Known Member
Thanks to Matt L and his Warpzone teleport script i came up with an idea for a script that will stop people from camping the ladder at A2 Bunker on Namalsk. What this script does is warn the player when they have entered the anti-camp protected area and gives them a 3 minute warning. This will give them enough time ( Can be changed to your liking ) to do a quick loot scan of the bunker and leave. If they try to stay they will be teleported to 1 of 5 random spots on the map and their weapons removed. They will be given several warnings with countdown before this happens.
Installation :
Add following code to your mission.sqm just above Class Markers...
Then make a new folder called custom in your mission.pbo. Once you have created the folder copy the following text and paste it into text document and save it as a2_anticamp.sqf within your new cutom folder.
In the beginning of this code there is an option to enter your UID. This can be used by Admins and will stop them from being teleported by the script.
Video :
Installation :
Add following code to your mission.sqm just above Class Markers...
Code:
class Sensors
{
items=1;
class Item0
{
position[]={4984.51, 28.63, 6613.21};
a=25;
b=25;
activationBy="ANY";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="AntiCamp";
expCond="(vehicle player) in thislist";
expActiv="AntiCamp = [] execVM ""custom/a2_anticamp.sqf"";";
expDesactiv="terminate AntiCamp; titleText [""You have left the Anti-Camping area!"", ""PLAIN DOWN"", 3];";
class Effects
{
};
};
};
Then make a new folder called custom in your mission.pbo. Once you have created the folder copy the following text and paste it into text document and save it as a2_anticamp.sqf within your new cutom folder.
Code:
if ((getPlayerUID player) in ["12345678"]) then {
titleText ["Hello Admin. Welcome back.", "PLAIN DOWN", 3];
} else {
titleText ["You are entering an Anti Camping area, you have 3 minutes to leave!!!", "PLAIN DOWN", 3];
sleep 60;
titleText ["You have 2 minutes to leave the area...", "PLAIN DOWN", 3];
sleep 30;
titleText ["You need to leave now...", "PLAIN DOWN", 3];
sleep 30;
titleText ["You have less than 1 minute to clear the area.. We aren't kidding!", "PLAIN DOWN", 3];
removeAllWeapons player;
sleep 50;
titleText ["You have less than 10 seconds to leave (Your gonna be sorry!)...", "PLAIN DOWN", 3];
sleep 5;
titleText ["You were warned..!", "PLAIN DOWN", 3];
sleep 5;
_var = random 1; //generates a random value between 0 and 1
if (_var < 0.20) then {
player setPosATL [6218.21,11933.1,4.09656];
} else {
if (_var < 0.40 and _var > 0.20) then {
player setPosATL [9090.85,10073.1,3.46286];
} else {
if (_var > 0.40 and _var < 0.60) then {
player setPosATL [6924.22,8321.1,4.91701];
} else {
if (_var > 0.60 and _var < .80) then {
player setPosATL [4158.66,4802.05,7.99395];
} else {
if (_var > 0.80 and _var < 1) then {
player setPosATL [6537.89,8512.89,4.52235];
};
};
};
};
};
};
};
};
};
};
};
waitUntil {! (vehicle player in list _Basis)};
titleText ["Was it worth it ?.", "PLAIN DOWN", 3];
In the beginning of this code there is an option to enter your UID. This can be used by Admins and will stop them from being teleported by the script.
Video :