mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Add isInMedicalVehicle function
This commit is contained in:
parent
77ae997993
commit
d640367ff2
23
addons/medical/functions/fnc_isInMedicalVehicle.sqf
Normal file
23
addons/medical/functions/fnc_isInMedicalVehicle.sqf
Normal file
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Author: KoffeinFlummi
|
||||
* Checks if a unit is in a medical vehicle.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: unit to be checked <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Is unit in medical vehicle? <BOOL>
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
|
||||
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};
|
||||
|
||||
// @todo: variable names standard?
|
||||
_vehicle getVariable [QGVAR(isMedic), getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "attendant") == 1]
|
Loading…
Reference in New Issue
Block a user