move mission into src
Some checks failed
Build Mission PBO / pack (push) Failing after 20s
Build Mission PBO / deploy (push) Has been skipped

This commit is contained in:
MrFastwind
2026-06-14 01:53:24 +02:00
parent b5bd14928e
commit 5a7879bca8
479 changed files with 45 additions and 34 deletions

View File

@@ -0,0 +1,20 @@
params ["_vehicle"];
private _vehicleClass = toLower (typeOf _vehicle);
// Cargo is always allowed
private _isCargo = (_vehicle getCargoIndex player) != -1;
if (_isCargo || _vehicle isKindOf "ParachuteBase") exitWith {};
private _permissibleVehicles = [
[KPLIB_typeLightClasses, "STR_PERMISSION_NO_LIGHT"],
[KPLIB_typeHeavyClasses, "STR_PERMISSION_NO_ARMOR"],
[KPLIB_typeAirClasses, "STR_PERMISSION_NO_AIR"]
];
private _permissionIdx = _permissibleVehicles findIf {_vehicleClass in (_x select 0)};
if (_permissionIdx isEqualTo -1) exitWith {};
if !([_permissionIdx] call KPLIB_fnc_hasPermission) exitWith {
moveOut player;
hint localize (_permissibleVehicles select _permissionIdx select 1);
};