ACE3/addons/reload/functions/fnc_onTake.sqf
johnb432 44e0fdb6fa
Reload - Code cleanup and various improvements (#9343)
* Reload code cleanup

* Update fnc_startLinkingBelt.sqf

* Update addons/reload/functions/fnc_getAmmoToLinkBelt.sqf

Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>

---------

Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
2023-08-28 14:26:24 -03:00

30 lines
585 B
Plaintext

#include "script_component.hpp"
/*
* Author: jokoho48
* Called from "Take" EH.
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Container <OBJECT>
* 2: Item <STRING>
*
* Return Value:
* None
*
* Example:
* [player, backpackContainer player, "ACE_Banana"] call ace_reload_fnc_onTake
*
* Public: No
*/
params ["_unit", "_container", "_item"];
if (
_unit == ACE_player &&
{GVAR(displayText)} &&
{_item == currentMagazine _unit} &&
{_container in [uniformContainer _unit, vestContainer _unit, backpackContainer _unit]}
) then {
_unit call FUNC(displayAmmo);
};