ACE3/addons/reloadlaunchers/functions/fnc_reloadLauncher.sqf
Phyma ffaa195fe5 Conform function headers to coding guidelines (#5255)
* Fixed headers to work with silentspike python script

* Fixed rest of the files

* Fixed ace-team
2017-06-08 15:31:51 +02:00

31 lines
703 B
Plaintext

/*
* Author: commy2
* Reload a launcher
*
* Arguments:
* 0: Unit to do the reloading <OBJECT>
* 1: Target to rload <OBJECT>
* 2: weapon name <STRING>
* 3: missile name <STRING>
*
* Return Value:
* None
*
* Example:
* [bob, kevin, "weapon", "missile"] call ace_reloadlaunchers_fnc_realoadLauncher
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit","_target","_weapon","_magazine"];
TRACE_4("params",_unit,_target,_weapon,_magazine);
_target selectWeapon _weapon;
if (currentWeapon _target != _weapon) exitWith {};
if (currentMagazine _target != "") exitWith {};
// command is wip, reload time for launchers is not intended.
_target addWeaponItem [_weapon, _magazine];