How would I go about whitelisting slots that kicks the player out of the slot if their PID does not match?
This is what I am working with, it properly displays the error, however, I cannot seem to whitelist myself now. I have tried with "" around Krihelion a swell.
Here you go! This is what I use for my missions.
RESERVED SLOT
/*
ReservedSlot.sqf by Kahna
Initially call this script in the Init.sqf and then include it in whatever script you use to respawn players,
otherwise the respawned player will not have the Reserved Slot script applied to it.
*/
while {true} do
{
private ["_reserved_units", "_reserved_uids", "_uid"];
waitUntil {!isNull player};
waitUntil {(vehicle player) == player};
waitUntil {(getPlayerUID player) != ""};
// Variable Name of the Player Character to be restricted. //
_reserved_units = [Reserved01];
// The player UID is a 17 digit number found in the profile tab. //
_reserved_uids =
[
"UIDXXXXXXXXXXXXXX"/* Add Player Name Here */,
"UIDXXXXXXXXXXXXXX"/* Add Player Name Here */,
"UIDXXXXXXXXXXXXXX"/* Add Player Name Here */
];
// Stores the connecting player's UID //
_uid = getPlayerUID player;
if ((player in _reserved_units)&& !(_uid in _reserved_uids)) then
{
titleText ["", "BLACK OUT"];
disableUserInput true;
hint "You are in a reserved slot! You will be kicked to the lobby in 15 seconds!";
sleep 5;
hint "You are in a reserved slot! You will be kicked to the lobby in 10 seconds!";
sleep 5;
hint "You are in a reserved slot! You will be kicked to the lobby in 5 seconds!";
sleep 5;
titleText ["", "BLACK IN"];
disableUserInput false;
failMission "end1";
};
};