Skip to content
This repository was archived by the owner on Apr 28, 2026. It is now read-only.

Commit 7e2bb54

Browse files
authored
feat(client/utils): add function to suppress item notifications (#9)
1 parent 245d595 commit 7e2bb54

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

modules/utils/client.lua

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,18 @@ end
7979
RegisterNetEvent('ox_inventory:notify', Utils.Notify)
8080
exports('notify', Utils.Notify)
8181

82+
local notifySuppressed = false
83+
84+
---@param value boolean
85+
local function setNotifySuppressed(value)
86+
notifySuppressed = value
87+
end
88+
89+
RegisterNetEvent('ox_inventory:suppressItemNotifications', setNotifySuppressed)
90+
exports('suppressItemNotifications', setNotifySuppressed)
91+
8292
function Utils.ItemNotify(data)
83-
if not client.itemnotify then
93+
if notifySuppressed or not client.itemnotify then
8494
return
8595
end
8696

0 commit comments

Comments
 (0)