smdv-spawnSelector
A clean and modern spawn selector for FiveM using ox_lib.
This script is built to be stable, easy to use, and safe for all players.
Features
- Spawn selector opens automatically when a player joins
- Manual spawn menu using the /spawn command
- Weighted fallback spawn system if no choice is made
- Spawn timeout to prevent players from getting stuck
- Cooldown system to prevent command abuse
- Smooth screen fade when spawning
- Discord webhook logging support
- Fully configurable spawn locations
- Safe on script restarts and player reconnects
Requirements
- FiveM server
- ox_lib (required)
ox_lib must start before this resource.
Installation
-
Upload the folder to your resources directory:
smdv-spawnSelector/
-
Add the following to server.cfg:
ensure ox_lib
ensure smdv-spawnSelector
-
Edit config.lua to match your server setup.
Commands
- /spawn
Opens the spawn selector again (cooldown applies)
How It Works
On First Join
- The spawn selector opens automatically
- If the player does not choose a location in time, a fallback spawn is used
Manual Spawn
- /spawn opens the selector
- Canceling the menu does nothing
- Cooldown prevents spam usage
Safety Systems
- Players cannot spawn more than once
- Script restarts do not force respawns
- Player data is cleaned up on disconnect
Configuration
Branding
Controls the title and subtitle shown in the menu.
Default Spawn
Used only if no valid spawn locations exist.
Spawn Locations
Each spawn has an ID, label, description, weight, and coordinates.
Weight controls how likely a location is chosen during fallback spawns.
Discord Webhook Logging
Set a webhook URL in the config to enable logging.
Logs include:
- Player name
- Server ID
- Spawn location
Leaving the webhook empty disables logging.
Support
Join our Discord for support and updates:
https://links.santosmods.dev/discord