๐ฏ Spawn Configuration#
Located in config/config.lua:
Config.ApartmentStart = false
Config.NewPlayerSpawnCoords = vec4(-1037.74, -2737.75, 20.17, 327.06)
Config.SkipSpawnSelector = true
Config.SpawnSelector = '0r-spawn'
โ๏ธ Configuration Options#
Skip Spawn Selector#
Config.SkipSpawnSelector = true -- Skip selector, spawn at last location
| Value | Behavior |
|---|---|
| true | Players spawn directly at their last location |
| false | Players see the spawn location selector |
Spawn Selector Type#
Config.SpawnSelector = '0r-spawn' -- Which spawn system to use
| Value | Description |
|---|---|
'0r-spawn' | Built-in spawn selector (recommended) |
'qb-spawn' | QBCore's spawn system |
'qbx_spawn' | QBox spawn system |
'um-spawn' | UM spawn selector |
'vms_spawnselector' | VMS spawn selector |
'custom' | Use custom export function |
New Player Spawn#
Where newly created characters spawn:
Config.NewPlayerSpawnCoords = vec4(-1037.74, -2737.75, 20.17, 327.06)
Format: vec4(x, y, z, heading)
Apartment Start#
Enable apartment selection for new characters:
Config.ApartmentStart = false -- Show apartment selection for new characters
When true, new characters choose their starting apartment from config/apartments.lua.
๐ Spawn Locations#
Configure available spawn points in Config.SpawnLocations:
Config.SpawnLocations = {
{
id = 1,
label = 'Legion Square',
img = 'legion-square', -- Image in web/build/imgs/
icon = 'fa-solid fa-city', -- FontAwesome icon
coords = vec4(195.17, -933.77, 29.7, 144.5)
},
{
id = 2,
label = 'Paleto Bay',
img = 'paleto-bay',
icon = 'fa-solid fa-mountain-city',
coords = vec4(80.35, 6424.12, 30.67, 45.5),
},
{
id = 3,
label = 'Motels',
img = 'motels',
icon = 'fa-solid fa-house',
coords = vec4(327.56, -205.08, 53.08, 163.5),
},
-- Add more locations...
}
Location Properties#
| Property | Type | Description |
|---|---|---|
| id | number | Unique identifier |
| label | string | Display name |
| img | string | Image filename (without extension) |
| icon | string | FontAwesome icon class |
| coords | vec4 | Spawn coordinates (x, y, z, heading) |
๐ผ๏ธ Adding Custom Location Images#
- Create a 16:9 image (recommended: 400x225 pixels)
- Save as PNG in
web/build/imgs/ - Reference by filename (without .png)
{
id = 10,
label = 'My Custom Location',
img = 'my-custom-location', -- web/build/imgs/my-custom-location.png
icon = 'fa-solid fa-star',
coords = vec4(100.0, 200.0, 30.0, 90.0)
}
๐ง Custom Spawn Function#
For advanced spawn logic, use the custom export:
Config.SpawnSelector = 'custom'
Config.CustomSpawnExports = function(playerId, position)
-- Your custom spawn logic here
-- playerId = player's server ID
-- position = last known position
-- Example: Trigger your own spawn system
TriggerClientEvent('my-spawn:open', playerId)
end
๐ฎ HUD Integration#
Control HUD visibility during spawn selection:
Config.CustomHud = function(status)
if status then
-- HIDE HUD during spawn selection
exports['my-hud']:hideHud()
else
-- SHOW HUD after spawning
exports['my-hud']:showHud()
end
end
๐ Complete Example#
-- Skip spawn selector - spawn at last location
Config.SkipSpawnSelector = false -- Show the selector
Config.SpawnSelector = '0r-spawn'
Config.ApartmentStart = false
Config.NewPlayerSpawnCoords = vec4(195.17, -933.77, 29.7, 144.5)
Config.SpawnLocations = {
{
id = 1,
label = 'Legion Square',
img = 'legion-square',
icon = 'fa-solid fa-city',
coords = vec4(195.17, -933.77, 29.7, 144.5)
},
{
id = 2,
label = 'Paleto Bay',
img = 'paleto-bay',
icon = 'fa-solid fa-mountain-city',
coords = vec4(80.35, 6424.12, 30.67, 45.5)
},
{
id = 3,
label = 'Sandy Shores',
img = 'sandy-shores',
icon = 'fa-solid fa-sun',
coords = vec4(1841.35, 3668.89, 33.68, 213.45)
},
{
id = 4,
label = 'Hospital',
img = 'hospital',
icon = 'fa-solid fa-hospital',
coords = vec4(285.21, -579.42, 43.23, 70.61)
},
}
Config.CustomHud = function(status)
-- Your HUD toggle logic
end
๐ Apartment Configuration#
See the dedicated apartments page: