mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
22 lines
518 B
Plaintext
22 lines
518 B
Plaintext
|
/*
|
||
|
* Author: KoffeinFlummi
|
||
|
*
|
||
|
* Checks if a unit is in a medical vehicle.
|
||
|
*
|
||
|
* Arguments:
|
||
|
* 0: unit to be checked (object)
|
||
|
*
|
||
|
* Return Value:
|
||
|
* Bool: is unit in medical vehicle?
|
||
|
*/
|
||
|
|
||
|
private ["_unit", "_vehicle"];
|
||
|
|
||
|
_unit = _this select 0;
|
||
|
_vehicle = vehicle _unit;
|
||
|
|
||
|
if (_unit == _vehicle) exitWith {false};
|
||
|
if (_unit in [driver _vehicle, gunner _vehicle, commander _vehicle]) exitWith {false};
|
||
|
|
||
|
_vehicle getVariable ["AGM_isMedic", getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "attendant") == 1]
|