Skip to content
This repository has been archived by the owner on May 13, 2021. It is now read-only.

Commit

Permalink
Merge pull request #4 from FiveM-Scripts/dev
Browse files Browse the repository at this point in the history
1.2
  • Loading branch information
ghermans authored Aug 26, 2018
2 parents e2f0c41 + e6be70f commit e1a1206
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.**
Expand Down
5 changes: 3 additions & 2 deletions client/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,21 @@ 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)
end

SetEntityCoords(PlayerPedId(), -1042.0395, -2740.7780, 20.1692)
SetEntityHeading(PlayerPedId(), 340.2285)
Citizen.Wait(500)
Wait(800)
DoScreenFadeIn(500)
else
TaskLeaveVehicle(PlayerPedId(), AirPlane, 0)
Expand Down
2 changes: 1 addition & 1 deletion client/spawn.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e1a1206

Please sign in to comment.