Locations & Backgrounds
Configure the character selection backgrounds and camera locations.
π 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
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:
And also to (for development):
Step 4: Add to Config
π Default Locations
The script comes with these pre-configured 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:
π€οΈ Weather Configuration
Weather settings during character selection are in config/weather.lua:
β¨ Effects Configuration
Particle effects are in config/effects.lua:
π Animation Configuration
Character animations/scenarios are in config/animation.lua:
πΌοΈ Image Guidelines
Recommended Specifications
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
β 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
Last updated