Fixed #54, fixed starting script from server boot

This commit is contained in:
ElPumpo
2018-07-25 11:38:35 +02:00
parent 6a4ccf0cd7
commit a2f6061e3c
3 changed files with 19 additions and 7 deletions
+5 -1
View File
@@ -37,11 +37,15 @@ function LoadVehicles()
table.insert(Vehicles, vehicle)
end
-- send information after db has loaded, making sure everyone gets vehicle information
TriggerClientEvent('esx_vehicleshop:sendCategories', -1, Categories)
TriggerClientEvent('esx_vehicleshop:sendVehicles', -1, Vehicles)
end
-- extremely useful when restarting script mid-game
Citizen.CreateThread(function()
Citizen.Wait(100) -- hopefully enough for connection to the SQL server
Citizen.Wait(10000) -- hopefully enough for connection to the SQL server
if not hasSqlRun then
LoadVehicles()