From b90a0878fd2de28f4535ddf755cde8e6295f6e9e Mon Sep 17 00:00:00 2001 From: ElPumpo Date: Sun, 12 Aug 2018 18:25:51 +0200 Subject: [PATCH] Fixed mistake --- client/main.lua | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/client/main.lua b/client/main.lua index 9b864b72..05fd8472 100644 --- a/client/main.lua +++ b/client/main.lua @@ -821,39 +821,39 @@ Citizen.CreateThread(function() end CurrentAction = nil + end + end - elseif IsControlJustReleased(0, Keys['F6']) and GetLastInputMethod(2) and not IsDead and Config.EnablePlayerManagement and PlayerData.job ~= nil and PlayerData.job.name == 'taxi' then - OpenMobileTaxiActionsMenu() - elseif IsControlJustReleased(0, Keys['DELETE']) and GetLastInputMethod(2) and not IsDead then + if IsControlJustReleased(0, Keys['F6']) and GetLastInputMethod(2) and not IsDead and Config.EnablePlayerManagement and PlayerData.job ~= nil and PlayerData.job.name == 'taxi' then + OpenMobileTaxiActionsMenu() + elseif IsControlJustReleased(0, Keys['DELETE']) and GetLastInputMethod(2) and not IsDead then - if OnJob then - StopTaxiJob() - else + if OnJob then + StopTaxiJob() + else - if PlayerData.job ~= nil and PlayerData.job.name == 'taxi' then + if PlayerData.job ~= nil and PlayerData.job.name == 'taxi' then - local playerPed = PlayerPedId() - if IsPedInAnyVehicle(playerPed, false) then - - local vehicle = GetVehiclePedIsIn(playerPed, false) - if PlayerData.job.grade >= 3 then - StartTaxiJob() - else - if GetEntityModel(vehicle) == GetHashKey('taxi') then - StartTaxiJob() - else - ESX.ShowNotification(_U('must_in_taxi')) - end - end + local playerPed = PlayerPedId() + if IsPedInAnyVehicle(playerPed, false) then + local vehicle = GetVehiclePedIsIn(playerPed, false) + if PlayerData.job.grade >= 3 then + StartTaxiJob() else - - if PlayerData.job.grade >= 3 then - ESX.ShowNotification(_U('must_in_vehicle')) + if GetEntityModel(vehicle) == GetHashKey('taxi') then + StartTaxiJob() else ESX.ShowNotification(_U('must_in_taxi')) end + end + else + + if PlayerData.job.grade >= 3 then + ESX.ShowNotification(_U('must_in_vehicle')) + else + ESX.ShowNotification(_U('must_in_taxi')) end end