From e03eb04a025000d98be37621a1afb46971062269 Mon Sep 17 00:00:00 2001 From: MoskalykA <100430077+MoskalykA@users.noreply.github.com> Date: Fri, 4 Aug 2023 00:53:04 +0200 Subject: [PATCH] fix: error after script restart --- server/main.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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)