Difference between revisions of "VN ms fnc hasItems"
Jump to navigation
Jump to search
Lou Montana (talk | contribs) (Page filling) |
Lou Montana (talk | contribs) m (typo) |
||
Line 27: | Line 27: | ||
|p3n= allItems | |p3n= allItems | ||
|p3t= boolean | |p3t= boolean | ||
− | |p3d= if set to false, only one of the listed items | + | |p3d= if set to false, only one of the listed items needs to be found |
|p3v= true | |p3v= true | ||
Latest revision as of 21:48, 23 February 2021
← back to Functions | Introduced in S.O.G. Prairie Fire v1.00 by Wyqer, veteran29 |
|
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;