mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
ffaa195fe5
* Fixed headers to work with silentspike python script * Fixed rest of the files * Fixed ace-team
31 lines
713 B
Plaintext
31 lines
713 B
Plaintext
/*
|
|
* Author: PabstMirror
|
|
* Loads a captive into a vehicle
|
|
*
|
|
* Arguments:
|
|
* 0: The Captive <OBJECT>
|
|
* 1: The Vehicle <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [bob, car1] call ACE_captives_fnc_vehicleCaptiveMoveIn;
|
|
*
|
|
* Public: No
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
params ["_target","_vehicle"];
|
|
TRACE_2("params",_target,_vehicle);
|
|
|
|
private _getSeat = [_vehicle] call FUNC(findEmptyNonFFVCargoSeat);
|
|
TRACE_1("free cargo seat",_getSeat);
|
|
_getSeat params ["_cargoIndex"];
|
|
if (_cargoIndex == -1) exitWith {WARNING("cargo index -1");};
|
|
|
|
_target moveInCargo [_vehicle, _cargoIndex];
|
|
_target assignAsCargoIndex [_vehicle, _cargoIndex];
|
|
|
|
_target setVariable [QGVAR(CargoIndex), _cargoIndex, true];
|