Skip to content

Commit

Permalink
fix: error after script restart
Browse files Browse the repository at this point in the history
  • Loading branch information
MoskalykA authored Aug 3, 2023
1 parent 5722f4d commit e03eb04
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 e03eb04

Please sign in to comment.