Configuration#
Almost everything is controlled from config.lua.
config_defaults.lua holds internal defaults. Prefer changing config.lua only.
Framework and language#
Config.Core = "QBCore" -- QBCore or ESX
Config.Locale = "en" -- locales/<code>.json
Built-in languages:
en— Englishtr— Turkishpt— Portuguesees— Spanishde— German
To add a language: copy locales/en.json → locales/xx.json, translate it, then set Config.Locale = "xx".
Notifications and target#
Config.Bridge = {
Notify = "ox_lib", -- ox_lib | qbcore | esx | auto
Target = "auto", -- auto | ox_target | qb-target | qtarget
}
- Notify — how messages are shown to players
- Target — how players interact with the pitch NPC
"auto"picks the first available target system
Commands#
Config.Commands = {
OpenMenu = "soccer",
GoalDebugToggle = "soccer_goaldebug",
}
Change OpenMenu if you want a different chat command.
Match length#
Config.MatchDuration = 20 -- minutes (default lobby match length)
Hosts can still change lobby settings in-game (time, format, etc.).
Host keys (during a match)#
These use FiveM control IDs:
Config.HostKeys = {
StartMatch = 166, -- F5
TogglePause = 311, -- K
EndMatch = 182, -- L
ToggleDoors = 29, -- B
}
Player keys#
Config.PlayerKeys = {
Steal = 38, -- E (soft steal with sprint)
HardSteal = 45, -- R (slide tackle)
}
Typical controls:
- E — goalkeeper actions (when in GK role / zone)
- Shift + E — soft steal
- R — slide tackle
Invite / celebration / scoreboard keys can also be rebound in GTA Settings → Key Bindings.
Map blips#
Config.MapBlips = {
Enabled = true,
Sprite = 58,
Color = 2,
Scale = 1.0,
Label = false, -- false = use pitch name
ShortRange = false,
}
Pitches#
Each entry in Config.Pitches is one playable field.
{
id = "broker_park",
name = "Broker Park",
coords = vector3(771.29, -234.16, 65.22),
radius = 50.0,
image = "area1.png",
npc = {
enabled = true,
model = "a_m_y_dhill_01",
coords = vector4(800.04, -232.21, 66.22, 165.80),
},
doors = {},
goals = {
{
center = vector3(...),
halfExtents = vector3(2.4, 3.1, 2.5),
scoringTeam = 2,
side = "West goal",
},
-- second goal...
},
}
Pitch fields (simple)#
| Field | Meaning |
|---|---|
id | Unique ID (used by exports and saves) |
name | Display name |
coords | Center of the pitch |
radius | Play / lobby area size |
npc | Target ped for the menu |
doors | Optional gates the host can lock |
goals | Goal boxes used for scoring |
The script ships with Broker Park and Vespucci Beach ready to use. You can add more pitches the same way.
Balls#
Balls shown in the lobby creator:
Config.Balls = {
{
id = "classic",
name = "Classic Soccer Ball",
model = "p_ld_soc_ball_01",
image = "default.png", -- file in web/dist/assets
rollRadius = 0.11,
},
}
Team kits (uniforms)#
Kits are applied directly to the ped (no clothing script required).
Edit Config.Uniforms in config.lua to change drawable indexes for home / away teams.
Jersey number limits:
-- from defaults / override in config.lua
Config.UniformNumbers = {
Min = 1,
Max = 10,
Default = 5,
}
Assists and leaderboard#
Config.Assists = {
Enabled = true,
WindowMs = 5000, -- assist time window
LeaderboardOrderBy = "goals", -- goals | assists | matches
}
API / match history#
Config.API = {
SaveMatchHistory = true,
LeaderboardDefaultLimit = 10,
LeaderboardMaxLimit = 100,
MatchHistoryDefaultLimit = 20,
MatchHistoryMaxLimit = 100,
EnableServerEvents = true,
EnableNetEvents = true,
}
Set SaveMatchHistory = false if you do not want matches written to the database.
Stadium scoreboard (DUI)#
Controlled by Config.FootballScoreboard.
Important options:
| Option | Meaning |
|---|---|
Enabled | Turn stadium boards on/off |
ScoreboardDriver | "soccer" (default) = driven by this script |
DuiWidth / DuiHeight | DUI resolution |
DrawDistance | How far the board is drawn |
Boards | List of physical scoreboard props |
Each board can have:
coords,headingmodel(example:prop_huge_display_01)renderTarget(example:big_disp)screenRotation— rotate the image on the screen (0or180)- optional support pole (
supportModel,supportOffset, …)
If a board looks upside down, try changing that board’s screenRotation between 0 and 180.
Goalkeeper and slide tackle#
You can enable / tweak these in config.lua (or rely on defaults):
-- Example overrides
Config.Goalkeeper = { Enabled = true }
Config.SlideTackle = {
EnableKnockdown = true,
DurationMs = 700,
StealDistance = 2.15,
}
Advanced steal / physics settings live in config_defaults.lua. Override only what you need in config.lua.
Locales for config names#
Pitch names, ball names, door labels, and similar strings can be localized in locales/*.json under the config section.
If a locale key is missing, the script falls back to the name written in config.lua.