Merge branch 'dev' of https://github.com/The-Order-Of-The-Sacred-Framework/community_bridge into dev
This commit is contained in:
commit
05f7ada1d6
2 files changed
+43
No files matched your search
@@ -0,0 +1,13 @@
|
||||
if GetResourceState('core_inventory') ~= 'started' then return end
|
||||
|
||||
Inventory = Inventory or {}
|
||||
|
||||
local core = exports.core_inventory
|
||||
|
||||
Inventory = Inventory or {}
|
||||
|
||||
Inventory.GetImagePath = function(item)
|
||||
local file = LoadResourceFile("core_inventory", string.format("html/img/%s.png", item))
|
||||
local imagePath = file and string.format("nui://core_inventory/html/img/%s.png", item)
|
||||
return imagePath or "https://avatars.githubusercontent.com/u/47620135"
|
||||
end
|
||||
@@ -0,0 +1,30 @@
|
||||
if GetResourceState('core_inventory') ~= 'started' then return end
|
||||
|
||||
Inventory = Inventory or {}
|
||||
|
||||
local core = exports.core_inventory
|
||||
|
||||
Inventory.GetImagePath = function(item)
|
||||
local file = LoadResourceFile("core_inventory", string.format("html/img/%s.png", item))
|
||||
local imagePath = file and string.format("nui://core_inventory/html/img/%s.png", item)
|
||||
return imagePath or "https://avatars.githubusercontent.com/u/47620135"
|
||||
end
|
||||
|
||||
Inventory.UpdatePlate = function(oldplate, newplate)
|
||||
-- have no clue if this will work but fingers crossed
|
||||
local queries = {
|
||||
'UPDATE coreinventories SET name = @newplate WHERE name = @oldplate',
|
||||
'UPDATE coreinventories SET name = @newplate WHERE name = @glovebox_oldplate',
|
||||
'UPDATE coreinventories SET name = @newplate WHERE name = @trunk_oldplate',
|
||||
}
|
||||
local values = {
|
||||
newplate = newplate,
|
||||
oldplate = oldplate,
|
||||
glovebox_oldplate = 'glovebox-' .. oldplate,
|
||||
trunk_oldplate = 'trunk-' .. 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