Skip to content

Commit

Permalink
fix(server): create SQL table immediately
Browse files Browse the repository at this point in the history
  • Loading branch information
Frowmza authored Jan 16, 2025
1 parent b1d8843 commit a3f6eba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/property.lua
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ RegisterNetEvent('qbx_properties:server:buyProperty', function(propertyId)
exports.qbx_core:Notify(playerSource, string.format('Successfully purchased %s for $%s', property.property_name, property.price))
end)

CreateThread(function()
Citizen.CreateThreadNow(function()
local sql1 = LoadResourceFile(cache.resource, 'property.sql')
local sql2 = LoadResourceFile(cache.resource, 'decorations.sql')
MySQL.query.await(sql1)
Expand Down Expand Up @@ -451,4 +451,4 @@ RegisterNetEvent('qbx_properties:server:removeDecoration', function(objectId)

MySQL.query.await('DELETE FROM properties_decorations WHERE id = ?', {objectId})
lib.triggerClientEvent('qbx_properties:client:removeDecoration', insideProperty[propertyId], objectId)
end)
end)

0 comments on commit a3f6eba

Please sign in to comment.