From e30207e4677a4247b8170d73c0a06f2ee5972e4d Mon Sep 17 00:00:00 2001 From: ElPumpo Date: Thu, 29 Nov 2018 15:18:31 +0100 Subject: [PATCH] Fixed mistake, resolves #35, closes #36 --- client/main.lua | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/client/main.lua b/client/main.lua index 2a5b1952..91dc3fc2 100644 --- a/client/main.lua +++ b/client/main.lua @@ -1018,27 +1018,27 @@ Citizen.CreateThread(function() local vehicleProps = ESX.Game.GetVehicleProperties(CurrentActionData.vehicle) TriggerServerEvent('esx_society:putVehicleInGarage', 'mecano', vehicleProps) - else - - if - GetEntityModel(vehicle) == GetHashKey('flatbed') or - GetEntityModel(vehicle) == GetHashKey('towtruck2') or - GetEntityModel(vehicle) == GetHashKey('slamvan3') - then - TriggerServerEvent('esx_service:disableService', 'mecano') - end + else + if + GetEntityModel(vehicle) == GetHashKey('flatbed') or + GetEntityModel(vehicle) == GetHashKey('towtruck2') or + GetEntityModel(vehicle) == GetHashKey('slamvan3') + then + TriggerServerEvent('esx_service:disableService', 'mecano') end - ESX.Game.DeleteVehicle(CurrentActionData.vehicle) end + ESX.Game.DeleteVehicle(CurrentActionData.vehicle) + elseif CurrentAction == 'remove_entity' then DeleteEntity(CurrentActionData.entity) end CurrentAction = nil end + end if IsControlJustReleased(0, Keys['F6']) and not IsDead and PlayerData.job ~= nil and PlayerData.job.name == 'mecano' then OpenMobileMecanoActionsMenu()