π Configuration File#
Background locations are configured in:
config/locations.lua
π¬ Location Structure#
local Locations = {}
Locations.List = {
{
id = 1,
label = 'Location Name', -- Display name
img = 'location-1', -- Image filename
coords = vec4(x, y, z, heading), -- Camera/player position
},
-- More locations...
}
return Locations
βοΈ Location Properties#
| Property | Type | Description |
|---|---|---|
| id | number | Unique identifier (sequential) |
| label | string | Name shown in the UI |
| img | string | Image filename (without extension) |
| coords | vec4 | Position (x, y, z) and heading (w) |
πΌοΈ Adding Custom Backgrounds#
Step 1: Choose a Location In-Game#
- Go to your desired location
- Find a good camera angle
- Get coordinates:
/coordsor use a coords script
Step 2: Take a Screenshot#
- Position your camera
- Take a high-quality screenshot
- Crop to 16:9 aspect ratio (recommended: 1920x1080 or 800x450)
Step 3: Add the Image#
Save your image to:
web/build/imgs/my-location.png
And also to (for development):
web/public/imgs/my-location.png
Step 4: Add to Config#
Locations.List = {
-- Existing locations...
{
id = 11, -- Next available ID
label = 'My Custom Location',
img = 'my-location',
coords = vec4(123.45, -456.78, 30.0, 180.0),
},
}
π Default Locations#
The script comes with these pre-configured locations:
Locations.List = {
{
id = 1,
label = 'Location 1',
img = 'location-1',
coords = vec4(-75.96, -818.95, 326.18, 0.0),
},
{
id = 2,
label = 'Location 2',
img = 'location-2',
coords = vec4(-1033.18, -2728.22, 20.18, 237.57),
},
-- ... up to 10 locations
}
π₯ Camera Behavior#
When a player selects a background:
- Player ped is teleported to the coordinates
- Camera is positioned 1 unit in front of the player
- Player faces the camera (180Β° offset from heading)
- Shallow depth of field is applied for visual effect
Camera Settings#
The camera configuration is in config/camera.lua:
local CameraConfig = {}
CameraConfig.List = {
'default',
'cinema',
'CAMERA_secuirity_FUZZ',
'hud_def_blur',
-- More filters...
}
return CameraConfig
π€οΈ Weather Configuration#
Weather settings during character selection are in config/weather.lua:
local WeatherConfig = {}
WeatherConfig.List = {
'EXTRASUNNY',
'CLEAR',
'CLOUDS',
'OVERCAST',
'RAIN',
'THUNDER',
'CLEARING',
'NEUTRAL',
'SNOW',
'BLIZZARD',
'SNOWLIGHT',
'XMAS',
'HALLOWEEN',
}
return WeatherConfig
β¨ Effects Configuration#
Particle effects are in config/effects.lua:
local EffectsConfig = {}
EffectsConfig.List = {
{
pName = 'scr_rcbarry2',
pNameChild = 'scr_clown_appears',
},
{
pName = 'scr_rcbarry1',
pNameChild = 'scr_alien_teleport',
},
-- More effects...
}
return EffectsConfig
π Animation Configuration#
Character animations/scenarios are in config/animation.lua:
local AnimationConfig = {}
AnimationConfig.List = {
'WORLD_HUMAN_AA_COFFEE',
'WORLD_HUMAN_AA_SMOKE',
'WORLD_HUMAN_BINOCULARS',
'WORLD_HUMAN_CHEERING',
'WORLD_HUMAN_DRINKING',
-- More scenarios...
}
return AnimationConfig
πΌοΈ Image Guidelines#
Recommended Specifications#
| Property | Value |
|---|---|
| Format | PNG or JPG |
| Aspect Ratio | 16:9 |
| Resolution | 800x450 (min) to 1920x1080 (max) |
| File Size | Under 500KB |
Tips for Good Screenshots#
- Use good lighting - Dawn/dusk for dramatic effect
- Clear weather - Avoid rain/fog unless intentional
- Hide UI - Remove all HUD elements
- Steady camera - No motion blur
- Interesting angles - Show the location's best features
π Complete Example#
-- config/locations.lua
local Locations = {}
Locations.List = {
{
id = 1,
label = 'Vinewood Sign',
img = 'vinewood',
coords = vec4(726.77, 1198.28, 326.26, 270.0),
},
{
id = 2,
label = 'Del Perro Pier',
img = 'pier',
coords = vec4(-1850.15, -1231.51, 13.02, 315.0),
},
{
id = 3,
label = 'Downtown',
img = 'downtown',
coords = vec4(195.17, -933.77, 29.7, 144.5),
},
{
id = 4,
label = 'Airport',
img = 'airport',
coords = vec4(-1037.74, -2737.75, 20.17, 327.06),
},
{
id = 5,
label = 'Beach',
img = 'beach',
coords = vec4(-1183.35, -1509.75, 4.65, 125.0),
},
}
return Locations
β Troubleshooting#
Image Not Showing#
- Check filename matches exactly (case-sensitive)
- Ensure image is in
web/build/imgs/ - Rebuild if using development mode
Wrong Camera Position#
- Adjust z-coordinate (height)
- Change heading for different angle
- Test in-game before finalizing