mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
39 lines
948 B
Plaintext
39 lines
948 B
Plaintext
/*
|
|
* Author: GitHawk
|
|
* Rearm an entire vehicle.
|
|
*
|
|
* Arguments:
|
|
* 0: Rearm information <ARRAY>
|
|
* 0: Ammo Truck <OBJECT>
|
|
* 1: Vehicle <OBJECT
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [[ammo_truck, tank]] call ace_rearm_fnc_rearmEntireVehicleSuccess
|
|
*
|
|
* Public: No
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
params ["_args"];
|
|
_args params [
|
|
["_truck", objNull, [objNull]],
|
|
["_vehicle", objNull, [objNull]]
|
|
];
|
|
|
|
if (isServer) then {
|
|
{
|
|
private _turretOwnerID = _vehicle turretOwner _x;
|
|
if (_turretOwnerID == 0) then {
|
|
[QGVAR(rearmEntireVehicleSuccessLocalEH), [_truck, _vehicle, _x], _truck] call CBA_fnc_targetEvent;
|
|
} else {
|
|
[QGVAR(rearmEntireVehicleSuccessLocalEH), [_truck, _vehicle, _x], _turretOwnerID] call CBA_fnc_ownerEvent;
|
|
};
|
|
false
|
|
} count REARM_TURRET_PATHS;
|
|
} else {
|
|
[QGVAR(rearmEntireVehicleSuccessLocalEH), _this] call CBA_fnc_serverEvent;
|
|
};
|