canAdd: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) No edit summary |
No edit summary |
||
Line 46: | Line 46: | ||
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] | ||
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]] | ||
<!-- CONTINUE Notes --> | |||
<dl class="command_description"> | |||
<dd class="notedate">Posted on November 29, 2015 - 00:02 (UTC)</dd> | |||
<dt class="note">[[User:Jonpas|Jonpas]]</dt> | |||
<dd class="note"> | |||
Can also be used on any object that has inventory, not only player inventory containers.<br> | |||
<br> | |||
Where <b>_box</b> is <b>B_supplyCrate_F</b>: | |||
<code>// Empty | |||
_box canAdd "FirstAidKit"; | |||
-> true | |||
// Full | |||
_box canAdd "FirstAidKit"; | |||
-> false | |||
</code> | |||
</dd> | |||
</dl> | |||
<!-- DISCONTINUE Notes --> |
Revision as of 01:02, 29 November 2015
Description
- Description:
- Checks if given object can be stored in any inventory container (uniform, vest, backpack) of given unit.
- Groups:
- Uncategorised
Syntax
Examples
- Example 1:
if (player canAdd "FirstAidKit") then { player addItem "FirstAidKit"; } else { hint "Not enough space"; };
Additional Information
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Notes
Bottom Section
- Posted on November 29, 2015 - 00:02 (UTC)
- Jonpas
-
Can also be used on any object that has inventory, not only player inventory containers.
Where _box is B_supplyCrate_F:// Empty _box canAdd "FirstAidKit"; -> true // Full _box canAdd "FirstAidKit"; -> false