VN_ms_fnc_hasItems

From Savage Game Design Wiki
Jump to navigation Jump to search
← back to Functions Introduced in S.O.G. Prairie Fire v1.00
by Wyqer, veteran29
Argument(s): global
Effect(s): unknown

Description

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

Syntax

Syntax
[unitsOrGroups, itemClasses, allItems] call VN_ms_fnc_hasItems
Parameters
unitsOrGroups: Array - groups and/or units to be scanned
itemClasses: Array - case-sensitive classname(s) of item(s) to be found
allItems: Boolean - (Optional, default true) if set to false, only one of the listed items needs to be found
Return value
Boolean

Examples

Example 1
// All listed items need to be at least once in the inventory [[player], ["vn_mine_m18_mag", "vn_mine_m18_x3_mag"]] call VN_ms_fnc_hasItems;
Example 2
// 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;