ACE3/addons/csw/functions/fnc_assemble_canDeployWeapon.sqf
johnb432 cd66f495ad
CSW - Improve tripod and weapon disassembly (#9915)
* Add disassembly for tripods when players have occupied launcher slots

* Update fnc_assemble_canDeployWeapon.sqf

* Update fnc_assemble_canPickupWeapon.sqf

* Revert file renaming (see #9777)

* Correct headers

* Update fnc_canPickupTripod.sqf

* Fixed checks and eject dead bodies

* Invert checks
2024-06-22 19:39:36 +02:00

24 lines
606 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: tcvm
* Checks if you can deploy a weapon on the tripod
*
* Arguments:
* 0: Target Tripod <OBJECT>
* 1: Player <OBJECT>
*
* Return Value:
* Wether or not you can deploy the weapon <BOOL>
*
* Example:
* [cursorObject, player] call ace_csw_fnc_assemble_canDeployWeapon
*
* Public: No
*/
params ["_target", "_player"];
// If the current launcher has a config-value that defines the tripod, it is a CSW
(alive _target) &&
{(getText (configFile >> "CfgWeapons" >> secondaryWeapon _player >> QUOTE(ADDON) >> "assembleTo" >> typeOf _target)) != ""}