if (_visitorUID in _owners) then { _canEnter = true; };
// friendly to owner?
if(_visitorUID != _owner) then
{
_friendlies = _visitorUID getVariable ["friendlyTo",[]];
if(_owner in _friendlies) then {
_canEnter = true;
};
};
//Is Admin?
if (_visitorUID in FastBuilding) then { _canEnter = true; };
sleep 5;
if (_canEnter) exitWith {
titleText [format ["Access Granted: %1", name player], "PLAIN", 10];
};
// Access denied to all others
titleText ["RESTRICTED AREA - NO ACCESS!", "PLAIN", 5];
sleep 5;
titleText ["YOU HAVE 15 SECONDS TO LEAVE!", "PLAIN", 5];
sleep 5;
titleText ["YOU HAVE 10 SECONDS TO LEAVE!", "PLAIN", 5];
sleep 5;
titleText ["YOU HAVE 5 SECONDS TO LEAVE!", "PLAIN", 5];
sleep 5;
titleText ["REST IN PEACE...", "PLAIN", 5];
sleep 2;
player setPos[16492,18312,0]; // PVP Island 1
Thx in advance for looking at this!
Any thoughts?
@nedfox: folders should be correct, it's all client-side relative to root (vilayercustomcode folder). I already have working player-specific files in there.
The point of my efforts here is to get a generic routine working so I don't have to make a specific .sqf for every new player base with UID's etc.
@KiloSwiss: I have looked at triggers for other purposes but I'm not that advanced.
I suspect -
1/ the params need to be double or triple quoted? or
2/ the mission.sqf was never intended to pass params in this way.
UPDATE: At last I found the error - double quotes in the right places did it. Thx for input guys.
Question
Sundowner
I am trying to call a generic base protection script from a sensor in mission.sqm but cannot get the params working.
Exerpt from mission.sqm:
It seems expActive is not calling base_generic.sqf
Target sqf:
Thx in advance for looking at this!
Any thoughts?
@nedfox: folders should be correct, it's all client-side relative to root (vilayercustomcode folder). I already have working player-specific files in there.
The point of my efforts here is to get a generic routine working so I don't have to make a specific .sqf for every new player base with UID's etc.
@KiloSwiss: I have looked at triggers for other purposes but I'm not that advanced.
I suspect -
1/ the params need to be double or triple quoted? or
2/ the mission.sqf was never intended to pass params in this way.
UPDATE: At last I found the error - double quotes in the right places did it. Thx for input guys.
Link to comment
Share on other sites
5 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