mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
31 lines
505 B
Plaintext
31 lines
505 B
Plaintext
/*
|
|
* Author: commy2
|
|
* Removes the magazine of the units rangefinder.
|
|
*
|
|
* Arguments:
|
|
* 0: Unit <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [player] call ace_common_fnc_removeBinocularMagazine
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
params ["_unit"];
|
|
|
|
private ["_binocular", "_selectBinocular"];
|
|
|
|
_binocular = binocular _unit;
|
|
|
|
_selectBinocular = currentWeapon _unit == _binocular;
|
|
|
|
_unit addWeapon _binocular;
|
|
|
|
if (_selectBinocular) then {
|
|
_unit selectWeapon _binocular;
|
|
};
|