mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
26 lines
678 B
Plaintext
26 lines
678 B
Plaintext
// by commy2
|
|
#include "script_component.hpp"
|
|
|
|
private ["_vehicle", "_isEngineOn"];
|
|
|
|
_vehicle = _this select 0;
|
|
_isEngineOn = _this select 1;
|
|
|
|
if (!_isEngineOn || {floor abs speed _vehicle > 0}) exitWith {};
|
|
|
|
[{
|
|
private ["_vehicle", "_time", "_direction"];
|
|
|
|
_vehicle = _this select 0 select 0;
|
|
_time = _this select 0 select 1;
|
|
_direction = _this select 0 select 2;
|
|
|
|
if (time > _time) exitWith {
|
|
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
|
};
|
|
|
|
_vehicle setVelocity [0, 0, 0];
|
|
_vehicle setVectorDirAndUp _direction;
|
|
|
|
} , 0, [_vehicle, time + STARTUP_DELAY, [vectorDir _vehicle, vectorUp _vehicle]]] call CBA_fnc_addPerFrameHandler;
|