Custom Integrations
Add a spawn selector or hand loading-screen shutdown to your framework
Checked against local source and release-version 1.4.0. Edit config.lua and integrations/spawn_selector.lua in the installed resource; both are escrow-open. Source builds use their equivalents under src. Back up changes and merge only your adapter into new releases.
Add a spawn selector
The adapter file runs on the client after the core script. Its local registerSpawnSelector(name, callback) stores a callback under a lower-case name. It is not an export available to another resource. Add an entry in that file, then select the same name in Config.spawnSelector.
The following working example registers an alias for the source-verified FS-SpawnSelector client export:
registerSpawnSelector('my-fs-selector', function()
exports['FS-SpawnSelector']:chooseSpawn()
end)Config.spawnSelector = 'my-fs-selector'For ordinary FS-SpawnSelector use, simply select the built-in fearlessstudios entry. Set Config.manuallyTrigger = true in FS-SpawnSelector so it does not independently open twice. For another provider, replace the callback with its documented client export/event. The names my-fs-selector and any source-comment placeholders are not third-party API names.
The callback receives no arguments. Its return value is ignored: returning false does not signal failure. A thrown error is caught and logged. openSpawnSelector() reports whether the callback ran without throwing, not whether the player selected a spawn.
Framework-controlled completion
Set Config.externalShutdown = true only when your framework will finish loading itself. From its trusted client readiness flow, call:
local handled = exports['FS-LoadingScreenV2']:finishLoadingScreen()This shuts down the loading-screen NUI and attempts the configured selector once. It returns true on the first invocation and false on subsequent invocations; a selector failure does not reset the once-only flag. exports['FS-LoadingScreenV2']:openSpawnSelector() can attempt the selector separately and returns a boolean. It has no once-only protection, so do not call it repeatedly from a tick loop. With externalShutdown = false, the first playerSpawned event handles completion automatically.
Start order and testing
Start FS-Lib and the selected spawn-selector resource before FS-LoadingScreenV2. Test a fresh connection, selector completion, respawn, and a missing/stopped provider. Confirm exactly one selector opens and loading NUI closes. If loading never closes with external shutdown enabled, check that your framework readiness callback actually calls the export. If selection never opens, check the exact selector name and client console. A normal respawn should not repeat first-spawn handling.