ACE3/addons/csw/functions/fnc_canGetIn.sqf
jonpas 742626ff1a
General - Relative script_component.hpp includes (#9378)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-12 20:58:10 +02:00

29 lines
642 B
Plaintext

#include "..\script_component.hpp"
/*
* Author:tcvm
* Checks if the player can get in the weapon
*
* Arguments:
* 0: Static Weapon <OBJECT>
*
* Return Value:
* None
*
* Example:
* [cursorObject] call ace_csw_fnc_canGetIn
*
* Public: No
*/
// hide this action if quick mount is enabled
if ((missionNamespace getVariable [QEGVAR(quickmount,enabled), false]) && {(missionNamespace getVariable [QEGVAR(quickmount,enableMenu), -1]) in [1, 3]}) exitWith {
false
};
params ["_staticWeapon"];
alive _staticWeapon
&& {!(alive (gunner _staticWeapon))}
&& {(locked _staticWeapon) < 2}
&& {0.3 < ((vectorUp _staticWeapon) select 2)}