[HELP] Restrict Area for Clan Members Only in ARMA 2 & OA : MISSIONS - Editing & Scripting Posted September 4, 2011 Hello. Fist i want to apologise if i'm posting in the wrong area, is one of my first posts... So... I'm creating a private area in a mission, just for my clanmates and i need some help, someone can help me? Here is the script that checks the UserID of the player this script ejects non-members out of the members-only vehicles... private ["_vehicle", "_pos", "_unit", "_namesArray"]; _vehicle = _this select 0; _pos = _this select 1; _unit = _this select 2; _namesArray = ["3940166"]; if (driver _vehicle == player) then { _vehicle setFuel 0; _vehicle vehicleChat format["Welcome %1! Wait for the membership check.", name _unit]; }; sleep 3; if ((getPlayerUID _unit) in _namesArray) then { _vehicle vehicleChat "Olá membro CCT! Sua checagem foi efetuada com sucesso."; sleep 2; _vehicle vehicleChat format ["Motores Destravados: Tenha uma boa viagem %1!", name _unit]; sleep 1; _vehicle setFuel 1; } else { _vehicle vehicleChat "You are not a CCT member or your PID is not in our list."; sleep 1; _vehicle vehicleChat "Only CCT members can fly and use heavy vehicles."; _unit action ["Eject", vehicle _unit]; _vehicle setFuel 0; }; and i put this in the Vehicle Init this addEventHandler ["GetIn", {_this execVM "CCT\check.sqf"}]; Problems: When i enter as driver the script checks me normally, but when i enter as "ride in back" and change for driver it dont checks... === Now the script that teleports non-members out of the private area. private ["_vehicle", "_pos", "_unit", "_namesArray"]; _vehicle = _this select 0; _pos = _this select 1; _unit = _this select 2; _namesArray = ["3940165"]; if (_unit distance getmarkerpos "cctbase" < 15) AND (!(getPlayerUID _unit) in _namesArray) then { _vehicle setvelocity [0,0,0]; _unit Action ["GET OUT"]; _vehicle setpos getmarkerpos "pipoca"; _unit setpos getmarkerpos "pipoca"; _unit groupchat "This base is only for VIP CCT Members!"; }; Problems: I put the marker "cctbase" covering the base and the marker "pipoca" far of it, but is not working. -- So.. thanks for the patient and sorry for my english.. Have a good time, Bye!
[HELP] Restrict Area for Clan Members Only
in ARMA 2 & OA : MISSIONS - Editing & Scripting
Posted
Hello.
Fist i want to apologise if i'm posting in the wrong area, is one of my first posts...
So...
I'm creating a private area in a mission, just for my clanmates and i need some help, someone can help me?
Here is the script that checks the UserID of the player
this script ejects non-members out of the members-only vehicles...
private ["_vehicle", "_pos", "_unit", "_namesArray"];
_vehicle = _this select 0;
_pos = _this select 1;
_unit = _this select 2;
_namesArray = ["3940166"];
if (driver _vehicle == player) then {
_vehicle setFuel 0;
_vehicle vehicleChat format["Welcome %1! Wait for the membership check.", name _unit];
};
sleep 3;
if ((getPlayerUID _unit) in _namesArray) then {
_vehicle vehicleChat "Olá membro CCT! Sua checagem foi efetuada com sucesso.";
sleep 2;
_vehicle vehicleChat format ["Motores Destravados: Tenha uma boa viagem %1!", name _unit];
sleep 1;
_vehicle setFuel 1;
} else {
_vehicle vehicleChat "You are not a CCT member or your PID is not in our list.";
sleep 1;
_vehicle vehicleChat "Only CCT members can fly and use heavy vehicles.";
_unit action ["Eject", vehicle _unit];
_vehicle setFuel 0;
};
and i put this in the Vehicle Init
this addEventHandler ["GetIn", {_this execVM "CCT\check.sqf"}];
Problems: When i enter as driver the script checks me normally, but when i enter as "ride in back" and change for driver it dont checks...
===
Now the script that teleports non-members out of the private area.
private ["_vehicle", "_pos", "_unit", "_namesArray"];
_vehicle = _this select 0;
_pos = _this select 1;
_unit = _this select 2;
_namesArray = ["3940165"];
if (_unit distance getmarkerpos "cctbase" < 15) AND (!(getPlayerUID _unit) in _namesArray) then {
_vehicle setvelocity [0,0,0];
_unit Action ["GET OUT"];
_vehicle setpos getmarkerpos "pipoca";
_unit setpos getmarkerpos "pipoca";
_unit groupchat "This base is only for VIP CCT Members!";
};
Problems: I put the marker "cctbase" covering the base and the marker "pipoca" far of it, but is not working.
--
So.. thanks for the patient and sorry for my english..
Have a good time, Bye!