diff --git a/CHANGELOG.md b/CHANGELOG.md index 5973b62..9e68d94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,10 @@ -## 1.1 +## 1.2 +- Fixed the conflict where players would always spawn at the LSIA enterance when using any plane in the airport zone. +## 1.1 - Essentialmode isn't required by default, server admins can enable this option in **config.lua**. ## 1.0 - - Added support for NativeUILua. - Added support for EssentialMode. - Added blips for **Los Santos International Airport** and **Sandy Shores Airfield.** diff --git a/client/client.lua b/client/client.lua index eccfb1d..b2e75cb 100644 --- a/client/client.lua +++ b/client/client.lua @@ -58,12 +58,13 @@ Citizen.CreateThread(function() end if not IsEntityInZone(PlayerPedId(), startZone) then - if not IsEntityInAir(AirPlane) and IsPedInAnyPlane(PlayerPedId()) then + if not IsEntityInAir(AirPlane) and IsPedInVehicle(PlayerPedId(), AirPlane, false) then TaskVehicleTempAction(pilot, Airplane, 27, -1) SetVehicleHandbrake(AirPlane, true) if GetEntitySpeed(AirPlaine) == 0.0 then if IsEntityInZone(PlayerPedId(), "AIRP") then + Wait(500) DoScreenFadeOut(200) while not IsScreenFadedOut() do Citizen.Wait(0) @@ -71,7 +72,7 @@ Citizen.CreateThread(function() SetEntityCoords(PlayerPedId(), -1042.0395, -2740.7780, 20.1692) SetEntityHeading(PlayerPedId(), 340.2285) - Citizen.Wait(500) + Wait(800) DoScreenFadeIn(500) else TaskLeaveVehicle(PlayerPedId(), AirPlane, 0) diff --git a/client/spawn.lua b/client/spawn.lua index 491d84b..071c076 100644 --- a/client/spawn.lua +++ b/client/spawn.lua @@ -36,7 +36,7 @@ function CreatePlane(x, y, z, heading, destination) AirPlane = CreateVehicle(modelHash, x, y, z-1.0, heading, true, false) SetVehicleOnGroundProperly(AirPlane) SetVehicleEngineOn(AirPlane, true, true, true) - SetEntityProofs(PlayerPedId(), true, true, true, true, true, true, true, false) + SetEntityProofs(AirPlane, true, true, true, true, true, true, true, false) SetVehicleHasBeenOwnedByPlayer(AirPlane, true) pilot = CreatePedInsideVehicle(AirPlane, 6, pilotModel, -1, true, false)