Skip to content

Commit

Permalink
Merge pull request #18 from MoskalykA/main-1
Browse files Browse the repository at this point in the history
fix: error after script restart
  • Loading branch information
Gellipapa authored Aug 6, 2023
2 parents 5722f4d + e03eb04 commit cb65b9e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/main.lua
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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)
Expand Down

0 comments on commit cb65b9e

Please sign in to comment.