various fixes

This commit is contained in:
second_coming 2016-04-11 16:39:00 +01:00
parent a093bd2190
commit a6e9f43771
2 changed files with 11 additions and 5 deletions

View File

@ -30,6 +30,9 @@ busDriver setCaptive true;
_publicBus = createVehicle ["Exile_Car_Ikarus_Party", _spawnLocation, [], 0, "CAN_COLLIDE"];
SC_publicBusArray = SC_publicBusArray + [_publicBus];
_publicBus setVariable ["SC_assignedDriver", busDriver,true];
_publicBus setVariable ["SC_vehicleSpawnLocation", _spawnLocation,true];
_publicBus addEventHandler ["getin", "_this call SC_fnc_getInBus;"];
_group addVehicle _publicBus;
clearBackpackCargoGlobal _publicBus;
clearItemCargoGlobal _publicBus;
@ -93,17 +96,20 @@ while {true} do
else
{
_currentDriver = driver _publicBus;
if(isPlayer _currentDriver) then
if(_currentDriver != busDriver) then
{
_publicBus setFuel 0;
[_currentDriver] orderGetin false;
_currentDriver action ["eject", _publicBus];
};
if(isnull _currentDriver) then
{
sleep 0.1;
busDriver assignAsDriver _publicBus;
busDriver moveInDriver _publicBus;
busDriver moveInDriver _publicBus;
[busDriver] orderGetin true;
_publicBus lockDriver true;
};
_publicBus setFuel 1;
uiSleep 3;

View File

@ -105,9 +105,9 @@ if(_vehiclesToSpawn >= 1) then
_vehicle setVariable ["SC_vehicleSpawnLocation", _spawnLocation,true];
_vehicle setFuel 1;
_vehicle engineOn true;
_vehicle lock 0;
_vehicle setVehicleLock "UNLOCKED";
_vehicle setVariable ["ExileIsLocked", 0, true];
_vehicle lock true;
_vehicle setVehicleLock "LOCKED";
_vehicle setVariable ["ExileIsLocked", 1, true];
_vehicle setSpeedMode "LIMITED";
_vehicle limitSpeed 60;
_vehicle action ["LightOn", _vehicle];