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.
Events
Player load, unload, and job-change events from Newb_Bridge. Use these instead of each framework's own hooks so your script works on any framework.
Migrating from community_bridge
Swap community_bridge for Newb_Bridge in a resource you own. You are rewriting the calls, not just renaming the resource.
