ACE3/addons/vehiclelock/functions/fnc_getVehicleSideKey.sqf
Dedmen Miller 81e02a7336 Refactor private ARRAY to private keyword (#5598)
* Everything

* Fixed missing ;

* Fix missing ; and double private

* Fixed cannot isNull on number

* Turn _temparture back to isNil

* Fix error from merge
2017-10-10 09:39:59 -05:00

36 lines
814 B
Plaintext

/*
* Author: PabstMirror
* Returns the side specifc key for a vehicle
*
* Arguments:
* 0: Vehicle <OBJECT>
*
* Return Value:
* The vehicle's side key classname <STRING>
*
* Example:
* [tank1] call ACE_VehicleLock_fnc_getVehicleSideKey;
*
* Public: No
*/
#include "script_component.hpp"
params ["_veh"];
TRACE_1("params",_veh);
if (isNull _veh) exitWith {ERROR("null vehicle"); "error"};
private _vehConfigSide = [_veh, true] call BIS_fnc_objectSide;
private _vehSide = _veh getVariable [QGVAR(lockSide), _vehConfigSide];
private _returnValue = "";
switch (_vehSide) do {
case (west): {_returnValue = "ACE_key_west"};
case (east): {_returnValue = "ACE_key_east"};
case (resistance): {_returnValue = "ACE_key_indp"};
default {_returnValue = "ACE_key_civ"};
};
_returnValue