ACE3/addons/cargo/functions/fnc_addCargoItem.sqf
esteldunedain 18f09b9310 Rename events:
- ace_addedHeartRateAdjustment -> ace_heartRateAdjustmentAdded
- ace_cargoAddedByClass -> ace_cargoByClassAdded
- ace_enteredCardiacArrest -> ace_cardiacArrestEntered
- ace_itemAddedToTriageCard -> ace_triageCardItemAdded
- ace_reload_linkedAmmo ->  ace_reload_ammoLinked
- ace_reload_returnedAmmo -> ace_reload_ammoReturned
- ace_treatmentSuccess ->  ace_treatmentSucceded
- ace_common_engineOn -> ace_common_setEngine
- ace_explosives_clientRequestOrientations -> ace_explosives_requestOrientations
- ace_explosives_serverSendOrientations -> ace_explosives_sendOrientations
- ace_interaction_lampTurnOff -> ace_interaction_setLampOff
- ace_interaction_lampTurnOn -> ace_interaction_setLampOn
- ace_overheating_spareBarrelsLoadCoolest -> ace_overheating_loadCoolestSpareBarrel
- ace_overheating_spareBarrelsSendTemperatureHint -> ace_overheating_sendSpareBarrelTemperatureHint
Close #3533
2016-06-24 10:45:13 -03:00

30 lines
688 B
Plaintext

/*
* Author: Glowbal, Jonpas
* Adds a cargo item to the vehicle.
*
* Arguments:
* 0: Item Classname <STRING>
* 1: Vehicle <OBJECT>
* 2: Amount <NUMBER> (default: 1)
* 3: Show Hint <BOOL> (default: false)
*
* Return Value:
* None
*
* Example:
* ["item", vehicle] call ace_cargo_fnc_addCargoItem
*
* Public: No
*/
#include "script_component.hpp"
params ["_itemClass", "_vehicle", ["_amount", 1], ["_showHint", false, [false]]];
TRACE_3("params",_itemClass,_vehicle,_amount);
for "_i" from 1 to _amount do {
[_itemClass, _vehicle] call FUNC(loadItem);
};
// Invoke listenable event
["ace_cargoByClassAdded", [_itemClass, _vehicle, _amount]] call CBA_fnc_globalEvent;