diff --git a/resources/[inventory]/nordi_coffeemachine/fxmanifest.lua b/resources/[inventory]/nordi_coffeemachine/fxmanifest.lua index 3195ff85b..aac246609 100644 --- a/resources/[inventory]/nordi_coffeemachine/fxmanifest.lua +++ b/resources/[inventory]/nordi_coffeemachine/fxmanifest.lua @@ -1,4 +1,3 @@ - fx_version 'cerulean' game 'gta5' @@ -24,5 +23,6 @@ lua54 'yes' dependencies { 'qb-target', 'qb-core', - 'ox_lib' -} \ No newline at end of file + 'ox_lib', + 'tgiann-inventory' +} diff --git a/resources/[inventory]/nordi_coffeemachine/server.lua b/resources/[inventory]/nordi_coffeemachine/server.lua index afedcf709..0eec04f95 100644 --- a/resources/[inventory]/nordi_coffeemachine/server.lua +++ b/resources/[inventory]/nordi_coffeemachine/server.lua @@ -7,20 +7,8 @@ end -- Function to check if player has an item local function HasItem(source, itemName, amount) - local items = exports["tgiann-inventory"]:GetPlayerItems(source) - if not items then return false end - - local count = 0 - for _, item in pairs(items) do - if item.name == itemName then - count = count + item.count - if count >= amount then - return true - end - end - end - - return false + local itemCount = exports["tgiann-inventory"]:GetItemCount(source, itemName) + return itemCount >= amount end -- Event for client to check if player has an item diff --git a/resources/[inventory]/tgiann-inventory/items/items.lua b/resources/[inventory]/tgiann-inventory/items/items.lua index 307492aa9..7ddc79653 100644 --- a/resources/[inventory]/tgiann-inventory/items/items.lua +++ b/resources/[inventory]/tgiann-inventory/items/items.lua @@ -10320,7 +10320,7 @@ itemsData = { weight = 800, label = 'Magnetangel Seil', unique = true, - useable = false, + useable = true, image = 'magnet_rope.png', name = 'magnet_rope', }, diff --git a/resources/[phone]/xsound/html/sounds/anchordown.ogg b/resources/[phone]/xsound/html/sounds/anchordown.ogg new file mode 100644 index 000000000..13f6559ec Binary files /dev/null and b/resources/[phone]/xsound/html/sounds/anchordown.ogg differ diff --git a/resources/[phone]/xsound/html/sounds/anchorup.ogg b/resources/[phone]/xsound/html/sounds/anchorup.ogg new file mode 100644 index 000000000..a7712aa1f Binary files /dev/null and b/resources/[phone]/xsound/html/sounds/anchorup.ogg differ