hey i was working on anti camper script but i lost my server so cant test , and cant keep working on it if anyone want to test or keep this work i give the codes where i left.
first create this path: mpmissions\instance 11...\nokill\
nokillarea.sqf
Spoiler
titleText ["YOURE IN A RESTRICTED AREA,DO NOT KILL OR U WILL PUNISHED", "PLAIN DOWN"];titleFadeOut 5;
Question
juandayz
hey i was working on anti camper script but i lost my server so cant test , and cant keep working on it if anyone want to test or keep this work i give the codes where i left.
first create this path: mpmissions\instance 11...\nokill\
nokillarea.sqf
titleText ["YOURE IN A RESTRICTED AREA,DO NOT KILL OR U WILL PUNISHED", "PLAIN DOWN"];titleFadeOut 5;
if (isNil "safearea") then {
safearea = true;
};
while {!safearea} do {
_characterID = _this select 0;
_minutes = _this select 1;
_newObject = _this select 2;
_playerID = _this select 3;
_infected = _this select 4;
if (((count _this) >= 6) && {(typeName (_this select 5)) == "STRING"} && {(_this select 5) != ""}) then {
_victimName = _this select 5;
} else {
_victimName = if (alive _newObject) then {name _newObject;} else {"";};
};
_victim = _newObject;
_newObject setVariable ["bodyName", _victimName, true];
_newObject setVariable ["bodyUID", _playerID, true];
_killer = _victim getVariable["AttackedBy", "nil"];
_killerName = _victim getVariable["AttackedByName", "nil"];
if ((side _killer) == EAST) exitwith {
};
if ((side _killer) == WEST) then {
sleep 1;
[_killer] execVM "nokill\punish.sqf"
//[_killer] endMission "LOSER"; //return to lobby //same as execute punish.sqf
} else {
if (((count crew _killer) > 1) && ((side _killer) == WEST)) then {
if (((gunner _killer) in (crew _killer)) && ((side _killer) == WEST)) then {
sleep 1;
[(gunner _killer)] execVM "nokill\punish.sqf"
//[(gunner _killer)] endMission "LOSER"; //return to lobby
} else {
sleep 1;
[(driver _killer)] "nokill\punish.sqf"
};
} else {
sleep 1;
[(driver _killer)] execVM "nokill\punish.sqf"
//[(driver _killer)] endMission "LOSER"; //return to lobby
};
};
};
punish.sqf
titleText ["YOURE WILL BE KICKED CAMPER", "PLAIN DOWN"];titleFadeOut 5;
sleep 2;
endMission "LOSER"; //return to lobby
*Now in mission.sqm needs create a new class sensor this is only for test 600mts around Stary
class Item8 //modify eight by your number
{
position[]={6325.6772,304.99033,7807.7412};
a=600;
b=600;
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="safearea";
expCond="(vehicle player) in thislist;";
expActiv="safearea = false; nokillarea = [] execVM ""nokill\nokillarea.sqf"";";
expDesactiv="safearea = true; terminate nokillarea; titleText [""\n\nLeaving NoKillArea"", ""PLAIN DOWN"", 3];";
class Effects
{
};
};
Link to comment
Share on other sites
10 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now