(fix): attempted fix for timeout on mysql query

This commit is contained in:
Ark
2021-02-02 04:37:58 -06:00
parent 0ce2055a4d
commit 48d1d8fbeb
+5 -2
View File
@@ -23,8 +23,11 @@ function RemoveOwnedVehicle(plate)
end
AddEventHandler('onResourceStart', function(resourceName)
Wait(500)
Wait(1000)
SQLVehiclesAndCategories()
end)
function SQLVehiclesAndCategories()
MySQL.Async.fetchAll('SELECT * FROM `vehicle_categories`', {}, function(_categories)
categories = _categories
@@ -35,7 +38,7 @@ AddEventHandler('onResourceStart', function(resourceName)
end)
end)
end)
end
function GetVehiclesAndCategories(categories, vehicles)
for k,v in ipairs(vehicles) do