diff --git a/server/main.lua b/server/main.lua index 93fa884..1df427b 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1,7 +1,3 @@ -MySQL.ready(function() - ParkBoats() -end) - function ParkBoats() MySQL.update('UPDATE owned_vehicles SET `stored` = true WHERE `stored` = false AND type = @type', { ['@type'] = 'boat' @@ -12,6 +8,10 @@ function ParkBoats() end) end +MySQL.ready(function() + ParkBoats() +end) + ESX.RegisterServerCallback('esx_boat:buyBoat', function(source, cb, vehicleProps) local xPlayer = ESX.GetPlayerFromId(source) local price = getPriceFromModel(vehicleProps.model)