fn_isClassUAV
This commit is contained in:
parent
cc149d0d0d
commit
73de07c32c
|
@ -2,27 +2,23 @@
|
|||
File: fn_isClassUAV.sqf
|
||||
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
|
||||
Date: 2017-11-17
|
||||
Last Update: 2019-12-03
|
||||
Last Update: 2019-12-07
|
||||
License: MIT License - http://www.opensource.org/licenses/MIT
|
||||
|
||||
Description:
|
||||
Returns if given vehicle class is an UAV.
|
||||
|
||||
Parameter(s):
|
||||
_vehicleclass - Class of object which will be checked if it is an UAV [STRING, defaults to ""]
|
||||
_class - Class of object which will be checked if it is an UAV [STRING, defaults to ""]
|
||||
|
||||
Returns:
|
||||
Class is UAV [BOOL]
|
||||
*/
|
||||
// TODO
|
||||
params ["_vehicleclass"];
|
||||
|
||||
private _isUAV = false;
|
||||
params [
|
||||
["_class", "", [""]]
|
||||
];
|
||||
|
||||
if ((typeName _vehicleclass) == "STRING") then {
|
||||
if ((getNumber(configFile >> "CfgVehicles" >> _vehicleclass >> "isUav")) == 1) then {
|
||||
_isUAV = true;
|
||||
};
|
||||
};
|
||||
if (_class isEqualTo "") exitWith {["Empty string given"] call BIS_fnc_error; false};
|
||||
|
||||
_isUAV;
|
||||
(getNumber (configFile >> "CfgVehicles" >> _class >> "isUav")) == 1
|
||||
|
|
Loading…
Reference in New Issue