<commit_before>waituntil {not isnull player};
waituntil {!isMultiplayer || getplayeruid player != ""};

////////////////////////////////////////////////////////////
// Respawn Handling
////////////////////////////////////////////////////////////

private ["_uid","_string"];
_uid = getplayeruid player;
_string = format ["RMM_nomad_%1",_uid];

//default weapons
if (isnil _string) then {
	//removeallweapons player;
	//removeallitems player;
	player switchmove "";
	if (not isnull (unitBackpack player)) then {
		clearWeaponCargo (unitBackpack player);
		clearMagazineCargo (unitBackpack player);
	};
};

player setskill 0;
{player disableAI _x} foreach ["move","anim","target","autotarget"];

player addeventhandler ["killed", {
	(_this select 0) spawn {
		waituntil {alive player};
		removeallweapons player;
		removeallitems player;
		player switchmove "";
		player setskill 0;
		{player disableAI _x} foreach ["move","anim","target","autotarget"];
	};
}];

////////////////////////////////////////////////////////////
// Specialty Handling
////////////////////////////////////////////////////////////

MSO_R = [];
MSO_R_Admin = false;
MSO_R_Leader = false;
MSO_R_Officer = false;
MSO_R_Air = false;
MSO_R_Crew = false;

private "_exit";
_exit = false;


{
	if (_uid == (_x select 0)) exitwith {
		MSO_R = _x select 2;
		MSO_R_Admin = "admin" in MSO_R;
		MSO_R_Leader = (_x select 1) in ["CORPORAL","SERGEANT","LIEUTENANT"] || MSO_R_Admin;
		MSO_R_Officer = (_x select 1) == "LIEUTENANT" || MSO_R_Admin;
		MSO_R_Air = ("pilot" in MSO_R) || MSO_R_Admin;
		MSO_R_Crew = ("crew" in MSO_R) || MSO_R_Admin;
	};
} foreach [
	["822401", 		"CORPORAL",		["crew"]],	//Ryan
	["1022977",		"PRIVATE",		["crew"]],	//Glenn
	["1062145", 	"CORPORAL",		["crew"]], 	//Antipop
	["1019521", 	"PRIVATE",		["pilot"]], //Innomadic
	["1065345", 	"CORPORAL",		["pilot"]], //Tank
	["3048774",		"LIEUTENANT",	["admin"]] //Rommel
	//[getplayeruid player, rank player, []] //careful, if pubbers around? Need discussion on limits of this first maybe
];

if (MSO_R_Air and ((getMarkerpos "farp") distance [0,0,0] > 0)) then { //ensure marker exists
	"farp" setmarkertypelocal "Faction_BritishArmedForces_BAF";
};

{
	if (_x iskindof "Air") then {
		if (not MSO_R_Air) then {
			_x lockdriver true;
		};<commit_msg>Added single player override and CTB HQ members.<commit_after>waituntil {not isnull player};
waituntil {!isMultiplayer || getplayeruid player != ""};

////////////////////////////////////////////////////////////
// Respawn Handling
////////////////////////////////////////////////////////////

private ["_uid","_string"];
_uid = getplayeruid player;
_string = format ["RMM_nomad_%1",_uid];

//default weapons
if (isnil _string) then {
	//removeallweapons player;
	//removeallitems player;
	player switchmove "";
	if (not isnull (unitBackpack player)) then {
		clearWeaponCargo (unitBackpack player);
		clearMagazineCargo (unitBackpack player);
	};
};

player setskill 0;
{player disableAI _x} foreach ["move","anim","target","autotarget"];

player addeventhandler ["killed", {
	(_this select 0) spawn {
		waituntil {alive player};
		removeallweapons player;
		removeallitems player;
		player switchmove "";
		player setskill 0;
		{player disableAI _x} foreach ["move","anim","target","autotarget"];
	};
}];

////////////////////////////////////////////////////////////
// Specialty Handling
////////////////////////////////////////////////////////////

MSO_R = [];
MSO_R_Admin = false;
MSO_R_Leader = false;
MSO_R_Officer = false;
MSO_R_Air = false;
MSO_R_Crew = false;

private "_exit";
_exit = false;


{
	if (_uid == (_x select 0)) exitwith {
		MSO_R = _x select 2;
		MSO_R_Admin = "admin" in MSO_R;
		MSO_R_Leader = (_x select 1) in ["CORPORAL","SERGEANT","LIEUTENANT"] || MSO_R_Admin;
		MSO_R_Officer = (_x select 1) == "LIEUTENANT" || MSO_R_Admin;
		MSO_R_Air = ("pilot" in MSO_R) || MSO_R_Admin;
		MSO_R_Crew = ("crew" in MSO_R) || MSO_R_Admin;
	};
	if (!isMultiPlayer) exitWith {
		MSO_R_Admin = true;
		MSO_R_Leader = true;
		MSO_R_Officer = true;
		MSO_R_Air = true;
		MSO_R_Crew = true;
	};
} foreach [
	["822401", 		"CORPORAL",		["crew"]],	//Ryan
	["1022977",		"PRIVATE",		["crew"]],	//Glenn
	["1062145", 	"CORPORAL",		["crew"]], 	//Antipop
	["1019521", 	"PRIVATE",		["pilot"]], //Innomadic
	["1065345", 	"CORPORAL",		["pilot"]], //Tank
	["3048774",		"LIEUTENANT",	["admin"]], //Rommel
	["3076038",		"LIEUTENANT",	["admin"]], //Wolffy.au
	["3165254", 	"SERGEANT",		["pilot"]], //Swordsman
	["1965894", 	"CORPORAL",		["crew"]], //Chappy
	["3165446", 	"CORPORAL",		["crew"]], //Delta 51
	["3158150", 	"CORPORAL",		["pilot","crew"]], //Floydii
	["1048961", 	"CORPORAL",		["crew"]] //Swedge
	//[getplayeruid player, rank player, []] //careful, if pubbers around? Need discussion on limits of this first maybe
];

if (MSO_R_Air and ((getMarkerpos "farp") distance [0,0,0] > 0)) then { //ensure marker exists
	"farp" setmarkertypelocal "Faction_BritishArmedForces_BAF";
};

{
	if (_x iskindof "Air") then {
		if (not MSO_R_Air) then {
			_x lockdriver true;
		};
{'fraction_non_alphanumeric': 0.2511379378586978, 'fraction_numerical': 0.02968533544429052, 'mean_word_length': 2.9239130434782608, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2191389', 'n_tokens_mistral': 2058, 'n_tokens_neox': 1853, 'n_words': 437}