Skip to content

Commit

Permalink
Real life parking optimization, solve some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangducvn committed Feb 14, 2022
1 parent bd662df commit bd262fc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,6 @@ local function Deleteveh(plate) -- Delete the vehicle if it is somewhere outside
local vehicle = gameVehicles[i]
if DoesEntityExist(vehicle) then
if QBCore.Functions.GetPlate(vehicle) == plate then
TriggerServerEvent('MojiaGarages:server:removeOutsideVehicles', plate)
QBCore.Functions.DeleteVehicle(vehicle)
end
end
Expand Down Expand Up @@ -1232,7 +1231,6 @@ RegisterNetEvent('MojiaGarages:client:storeVehicle', function() -- Store Vehicle
QBCore.Functions.DeleteVehicle(curVeh)
end
TriggerServerEvent('MojiaGarages:server:updateVehicleState', 1, plate, lastcurrentgarage)
TriggerServerEvent('MojiaGarages:server:removeOutsideVehicles', plate)
if plate ~= nil then
OutsideVehicles[plate] = nil
end
Expand All @@ -1258,7 +1256,6 @@ RegisterNetEvent('MojiaGarages:client:storeVehicle', function() -- Store Vehicle
QBCore.Functions.DeleteVehicle(curVeh)
end
TriggerServerEvent('MojiaGarages:server:updateVehicleState', 1, plate, lastcurrentgarage)
TriggerServerEvent('MojiaGarages:server:removeOutsideVehicles', plate)
if plate ~= nil then
OutsideVehicles[plate] = nil
end
Expand Down
2 changes: 1 addition & 1 deletion fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ fx_version 'cerulean'
game 'gta5'

author 'Hoàng Đức'
version '1.0.1'
version '1.1.0'
description 'MojiaGarages - Best advanced garages for QB-Core Framework'

shared_scripts {
Expand Down
2 changes: 1 addition & 1 deletion server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ CreateThread(function() -- Update houses
end)


CreateThread(function() -- read all vehicles from the database on startup and do a cleanup check
CreateThread(function() -- Read all vehicles from the database on startup and do a cleanup check
while true do
if not vehiclesLoaded then
vehiclesLoaded = true
Expand Down

0 comments on commit bd262fc

Please sign in to comment.