Resource layout

How to list scripts in fxmanifest.lua so load order is explicit.

fxmanifest pattern

shared_scripts {
    '@ox_lib/init.lua',
    '@Newb_Bridge/import.lua',
    'configs/*.lua',
    -- shared classes/helpers that run on both sides
}

client_scripts {
    'resource/client/*.lua',
}

server_scripts {
    'resource/server/*.lua',
}

dependencies {
    'ox_lib',
    'Newb_Bridge',
}

List scripts explicitly in load order. Avoid ** globs, since they load files in an order you do not control.

Player lifecycle

Register world objects on Newb_Bridge:client:playerLoaded and tear them down on Newb_Bridge:client:playerUnloaded. See Events.

On this page