VN_ms_fnc_hasItems

From Savage Game Design Wiki
Revision as of 21:21, 20 January 2021 by Lou Montana (talk | contribs) (Text replacement - "]]; |p1n=" to "]] |p1n=")
Jump to navigation Jump to search
← back to Functions Introduced in S.O.G. Prairie Fire v1.00
by Wyqer, veteran29
Argument(s): n/a
Effect(s): unknown

Description

/*
    File: fn_hasItems.sqf
    Author: Wyqer, veteran29
    Date: 2020-10-08
    Last Update: 2020-11-10
    Public: Yes

    Description:
        Checks if given units have at least one of each given item in their inventory.

    Parameter(s):
        _units  - Array of units and/or groups to check for the item                                                    [ARRAY, defaults to []]
        _items  - Array of item classnames to check for in their inventories                                            [ARRAY, defaults to []]
        _all    - Selector if all items should be in the inventory at least once or just one of the items are needed    [BOOL, defaults to true]

    Returns:
        At least one of each item is in the inventory of provided groups [BOOL]

    Example(s):
        // Both listed items are need to be at least once in the inventory
        [[player], ["vn_mine_m18_mag", "vn_mine_m18_x3_mag"]] call vn_ms_fnc_hasItems

        // One of the listed items needs to be at least once in the inventory
        [[player], ["vn_mine_m18_mag", "vn_mine_m18_x3_mag"], false] call vn_ms_fnc_hasItems
*/

(Placeholder description extracted from the function header by LM_exportFunctionsToWiki.sqf)

Syntax

Syntax
[] call vn_ms_fnc_hasItems
Return value
Nothing

Examples

Example 1
-