-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added alternative function setCargo that replace cargo and addCargo t…
…hat append to the cargo container (#1165) Co-authored-by: Jonah Pool <[email protected]>
- Loading branch information
1 parent
38dd73d
commit 7b95a68
Showing
8 changed files
with
68 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#include "..\script_component.hpp"; | ||
/* | ||
* Author: Whitsel.M | ||
* This function sets given supplies to a container. | ||
* If nothing in the array is defined the container will be empty. | ||
* | ||
* Arguments: | ||
* 0: Vehicle or Crate <OBJECT> | ||
* 1: Inventory <ARRAY> | ||
* | ||
* Return Value: | ||
* Nothing | ||
* | ||
* Example: | ||
* [MyCrate, [["ACE_EarPlugs", 60]]] call cScripts_fnc_setCargo; | ||
* [MyTruck, [["ACE_personalAidKit", 8], ["ACE_tourniquet", 10]]] call cScripts_fnc_setCargo; | ||
* | ||
* Public: Yes | ||
*/ | ||
|
||
params [ | ||
["_vehicle", objNull, [objNull]], | ||
["_inventory", [], [[]]] | ||
]; | ||
|
||
clearWeaponCargoGlobal _vehicle; | ||
clearMagazineCargoGlobal _vehicle; | ||
clearItemCargoGlobal _vehicle; | ||
clearBackpackCargoGlobal _vehicle; | ||
|
||
[_vehicle, _inventory] call FUNC(addCargo); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters