ACE3/addons/medical_treatment/functions/fnc_isInMedicalVehicle.sqf
Dedmen Miller 7a0a00ea09 Cleanup using SQFLint (#6485)
* Use private
* Fix wrong spacing
* Fix wrong variable being used
* Cleanup empty line after header
* ace_common_fnc_getCountOfItem
* Remove useless _return variable
* Naming
2018-08-02 15:02:10 +01:00

26 lines
536 B
Plaintext

#include "script_component.hpp"
/*
* 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>
*
* Example:
* [player] call ace_medical_treatment_fnc_isInMedicalVehicle
*
* Public: No
*/
params ["_unit"];
private _vehicle = vehicle _unit;
if (_unit == _vehicle) exitWith {false};
if (_unit in [driver _vehicle, gunner _vehicle, commander _vehicle]) exitWith {false};
[_vehicle] call FUNC(isMedicalVehicle);