ACE3/addons/vehiclelock/functions/fnc_getVehicleSideKey.sqf

39 lines
916 B
Plaintext
Raw Normal View History

2015-01-23 22:40:39 +00:00
/*
Name: ACE_VehicleLock_fnc_getVehicleSideKey
Author: Pabst Mirror
Description:
Returns the side specifc key for a vehicle
Parameters:
0: OBJECT - vehicle
Returns:
STRING - Key Classname
Example:
[tank1] call ACE_VehicleLock_fnc_getVehicleSideKey;
*/
#include "script_component.hpp"
private ["_veh","_vehConfigSide","_vehSide","_returnValue"];
_veh = [_this, 0, objNull, [objNull]] call bis_fnc_param;
if (isNull _veh) exitWith {["ACE_VehicleLock_fnc_getVehicleSideKey: null vehicle"] call BIS_fnc_error; ""};
_vehConfigSide = [_veh, true] call BIS_fnc_objectSide;
2015-01-24 18:58:01 +00:00
_vehSide = _veh getVariable [QGVAR(lockSide), _vehConfigSide];
2015-01-23 22:40:39 +00:00
_returnValue = "";
switch (_vehSide) do {
case (west): {_returnValue = "ACE_key_west"};
case (east): {_returnValue = "ACE_key_east"};
case (resistance): {_returnValue = "ACE_key_indp"};
case (civilian): {_returnValue = "ACE_key_civ"};
};
_returnValue