mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Cargo - Add alternative unloading item from vehicle cargo (#8827)
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> Co-authored-by: LinkIsGrim <salluci.lovi@gmail.com> Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
This commit is contained in:
29
addons/cargo/functions/fnc_getSelectedItem.sqf
Normal file
29
addons/cargo/functions/fnc_getSelectedItem.sqf
Normal file
@ -0,0 +1,29 @@
|
||||
#include "..\script_component.hpp"
|
||||
/*
|
||||
* Author: Glowbal, Smith
|
||||
* Get selected item from cargo menu.
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* Classname of selected item or selected object <STRING> or <OBJECT> (default: nil)
|
||||
*
|
||||
* Example:
|
||||
* call ace_cargo_fnc_getSelectedItem
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
disableSerialization;
|
||||
|
||||
private _display = uiNamespace getVariable QGVAR(menuDisplay);
|
||||
|
||||
if (isNil "_display") exitWith {};
|
||||
|
||||
private _loaded = GVAR(interactionVehicle) getVariable [QGVAR(loaded), []];
|
||||
|
||||
if (_loaded isEqualTo []) exitWith {};
|
||||
|
||||
// This can be an object or a classname string
|
||||
_loaded param [lbCurSel (_display displayCtrl 100), nil]
|
Reference in New Issue
Block a user