Skip to content

Developers

Use the bridge from your own resources.

Manifest

lua
dependency 'lumix_bridge'

shared_script '@lumix_bridge/init.lua'

lumix_bridge must start before your resource.

Notify

lua
-- Client
lumix.notify({ title = 'Shop', description = 'Done', type = 'success' })

-- Server → player
lumix.notify(source, { title = 'Shop', description = 'Done', type = 'success' })

Or via the Notify module:

lua
Notify.SendNotify(source, 'Done', 'success', 3000) -- server
Notify.SendNotify('Done', 'success', 3000)         -- client

Framework & inventory (server)

lua
local name = Framework.GetPlayerName(source)
local id = Framework.GetPlayerIdentifier(source)

Inventory.AddItem(source, 'bread', 1)
Inventory.RemoveItem(source, 'bread', 1)

Callbacks

lua
-- Server
lumix.callback.register('myresource:getName', function(source)
    return Framework.GetPlayerName(source)
end)

-- Client
local name = lumix.callback.await('myresource:getName', false)

Exports

lua
local Bridge = exports.lumix_bridge:Bridge()
Bridge.Notify.SendNotify(...)

Other modules after init: Target, Menu, ProgressBar, Fuel, Doorlock, Phone, …

Appearance

lua
local appearance = exports.lumix_bridge:GetAppearance()
-- appearance.primary, appearance.locale

Listen for live theme changes if your NUI needs to update without restart (see coinshop / other Lumix products for the event pattern).

DMCA.com Protection Status

Lumix Scripts operates independently and is not authorized, sponsored, or endorsed by Cfx.re, Rockstar Games, or Take-Two Interactive.