#include "..\script_component.hpp" /* * Function: forge_client_org_fnc_removeAsset * Author: IDSolutions * * [Description] * Removes an asset from an organization's inventory. * Deletes the specified asset based on its type and unique identifier. * * Arguments: * 0: Asset Type - Type of asset (vehicle, building, etc.) * 1: Asset ID - Unique identifier of the asset to remove * * Return Value: * Success - True if asset was removed successfully, false otherwise * * Example: * ["vehicle", "B_MRAP_01_F_1234567890"] call forge_client_org_fnc_removeAsset * * Public: Yes */ params [["_assetType", "", [""]], ["_assetId", "", [""]]]; // Validate input parameters if (_assetType isEqualTo "" || _assetId isEqualTo "") exitWith { ["Invalid parameters for removing asset", "error", 5, "right"] call forge_client_misc_fnc_notify; false }; // Get the organization store interface private _store = call FUNC(verifyOrgStore); // Remove the asset from the organization's inventory private _result = _store call ["removeAsset", [_assetType, _assetId]]; // Provide feedback based on success or failure if (_result) then { [format ["Asset removed successfully: %1", _assetId], "success", 5, "right"] call forge_client_misc_fnc_notify; } else { [format ["Failed to remove asset: %1", _assetId], "error", 5, "right"] call forge_client_misc_fnc_notify; }; // Return the result for further operations _result