ACE3/addons/vehiclelock/functions/fnc_setVehicleLockEH.sqf

26 lines
504 B
Plaintext
Raw Normal View History

2015-01-23 22:40:39 +00:00
/*
* Author: PabstMirror
* Sets a vehicle lock state because of a "VehicleLock_SetVehicleLock" event
*
* Arguments:
* 0: Vehicle <OBJECT>
* 1: New lock state <BOOL>
*
* Return Value:
* None
*
* Example:
* [tank1, false] call ACE_VehicleLock_fnc_setVehicleLockEH;
*
* Public: Yes
*/
2015-01-23 22:40:39 +00:00
#include "script_component.hpp"
private ["_lockNumber"];
2015-01-23 22:40:39 +00:00
PARAMS_2(_veh,_isLocked);
2015-01-23 22:40:39 +00:00
_lockNumber = if (_isLocked) then {2} else {0};
TRACE_2("Setting Lock State", _veh, _lockNumber);
_veh lock _lockNumber;