Jump to content
Sign in to follow this  
case1489

Need help with squad locked vehicle script

Recommended Posts

I need help with this script I found it a while back and haven't found the part that I'm needing to get it to work

UBGonly-Ken.sqf

/*
// Put the following line in the vehicle you want to make exclusive:
handle = [this, 360, 120, 0, false, false, "this addEventHandler ['GetIn', {_this execVM 'UBGonly-Ken.sqf'}];"] execVM "vehicle.sqf"; this addEventHandler ["GetIn", {_this execVM "UBGonly-Ken.sqf"}];
*/
//Created by Paveway and edited by Kenquinn
// Modified by Nomad to be .pbo independent

private ["_masterUIDArray"];
_masterUIDArray = masterUIDArray;


_vehicle = _this select 0;
_seat = _this select 1;
_player = _this select 2;
_nameCheck = false;
_startFuel = fuel _vehicle;

//sleep 0.1;

//if (!(local _vehicle) || !(_player == player)) exitWith {hint str _player};

sleep 0.1;
_vehicle setFuel 0;
_vehicle vehicleChat format["Welcome %1!", name _player];

//Debug
//hint format ["%1 got in %2 seat of %3", name _player, _seat, typeOf _vehicle];
//hint str toArray name _player;

if (!(_player in _vehicle))  exitWith {_vehicle setFuel _startFuel;};

_name = toArray name _player;

if (getPlayerUID _player in ExcludeUIDs) exitWith {
_vehicle vehicleChat "You are not a UBG member or your identity could not be verified.";
_vehicle vehicleChat "Join UBG at battleguns.freeforums.org to become qualified to fly!";
moveOut _player;
sleep 0.2; _vehicle setFuel _startFuel;
};

if ((_name select 0 == 84) && (_name select 1 == 65) && (_name select 2 == 87) && (_name select 3 == 95)) then {
if (getPlayerUID _player in _masterUIDArray) then {
	_vehicle vehicleChat "UBG member! and name in PID List";
	_nameCheck = true;
} else {
	_vehicle vehicleChat "UBG member!, but your name is not the PID list.";
	_vehicle vehicleChat "Please send your PID to case-1489 and wait for the script to be updated.";
};
};

sleep 1.0;
if (!(_player in _vehicle))  exitWith {sleep 0.2; _vehicle setFuel _startFuel;};

if (_nameCheck) then {
      _vehicle vehicleChat format ["Engine Unlocked: Have a safe flight %1!", name _player];
} else {
_vehicle vehicleChat "You are not a UBG member or your identity could not be verified.";

moveOut _player;
sleep 0.3;
};

sleep 2.0;
_vehicle setFuel _startFuel;
sleep 0.3;
_vehicle setFuel _startFuel;
sleep 0.3;
_vehicle setFuel _startFuel;

x_servercustomcode

call compile preprocessfile "\userconfig\UBG\masteruidlist.sqf";
call compile preprocessfile "\userconfig\UBG\exclusionmasteruidlist.sqf";

Please note I am playing on a domination mission

Share this post


Link to post
Share on other sites

Also using this script however just need help with the following.

do i put the masteruidlist.sqf and exclusionmasteruidlist.sqf server side in the userconfig folder?

Also what script do i put in the masteruidlist.sqf and exclusionmasteruidlist.sqf to add player UIDs?, need the format.

x_servercustomcode

call compile preprocessfile "\userconfig\UBG\masteruidlist.sqf";
call compile preprocessfile "\userconfig\UBG\exclusionmasteruidlist.sqf";

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×