UpdatePlate added for all bridged inventories
This commit is contained in:
1 parent
1399b2e754
commit
17d68505a6
5 files changed
+60
No files matched your search
@@ -98,4 +98,16 @@ Inventory.GetImagePath = function(item)
|
||||
local file = LoadResourceFile("origen_inventory", string.format("html/images/%s.png", item))
|
||||
local imagePath = file and string.format("nui://origen_inventory/html/images/%s.png", item)
|
||||
return imagePath or "https://avatars.githubusercontent.com/u/47620135"
|
||||
end
|
||||
|
||||
Inventory.UpdatePlate = function(oldplate, newplate)
|
||||
local queries = {
|
||||
'UPDATE gloveboxitems SET plate = @newplate WHERE plate = @oldplate',
|
||||
'UPDATE trunkitems SET plate = @newplate WHERE plate = @oldplate',
|
||||
}
|
||||
local values = { newplate = newplate, oldplate = oldplate }
|
||||
MySQL.transaction.await(queries, values)
|
||||
if GetResourceState('jg-mechanic') ~= 'started' then return true end
|
||||
exports["jg-mechanic"]:vehiclePlateUpdated(oldplate, newplate)
|
||||
return true
|
||||
end
|
||||
Reference in new issue
Block a user