FiveM Framework Configuration — Quasar Framework (qs-core) | Quasar Store | Quasar Store
Documentation
Configuration
Configure Quasar Framework (qs-core) for FiveM: money, paychecks, theme, languages, items, jobs, inventory, weapons and loading screen. ESX and QBCore ready.
Everything a server owner changes in Quasar Framework (qs-core) lives in plain Lua config files and in server.cfg. This page is the complete reference for this FiveM roleplay framework: every option of the core config, the theme colours, languages, items, jobs and gangs, the inventory and weapon settings, and the loading screen. Each section lists the option, its default value and what it changes in game, followed by a short example.
The money accounts every character has, and the balance a new character starts with. An account that is missing on an existing character is added with this starting balance when the character loads. Money commands and exports only work with accounts listed here.
lua
-- A harder start: less cash, a smaller bank balance
Config.Accounts = {
cash = 250,
bank = 1500,
black_money = 0,
}
How many characters one player can create. Character creation is refused once the limit is reached.
Config.DefaultSpawn
vec4(-268.4842, -957.7139, 31.2231, 205.8032)
Where a new character appears for the first time (x, y, z, heading). Afterwards each character spawns where it last was.
Config.DefaultJob
'unemployed'
The job given to every new character. It must exist in shared/jobs.lua.
Config.DefaultJobGrade
0
The grade of that default job.
Config.SaveInterval
5 * 60 * 1000
How often (in milliseconds) every online character is saved. Characters are also saved when the player disconnects, logs out and when qs-core stops.
Config.Debug
true
Prints debug lines in the console, prefixed [qs-core:server] / [qs-core:client] (for example the number of players saved by each autosave). Set it to false on a live server for a quieter console.
lua
Config.MaxCharacters = 3-- New characters start at the airport
Config.DefaultSpawn = vec4(-1037.74, -2737.84, 20.17, 330.0)
-- Autosave every 10 minutes
Config.SaveInterval = 10 * 60 * 1000
Config.Debug = false
Turns paychecks on or off. Read once when qs-core starts.
Config.Paycheck.interval
30 * 60 * 1000
Time between paychecks, in milliseconds.
Every interval, each player with a loaded character whose job grade has a salary above 0 receives that salary in their bank account and a Paycheck received notification. Salaries are set per grade in shared/jobs.lua (see Jobs and grades below).
When a player dies they go down instead of respawning. After respawnTime seconds they can press E to respawn at the nearest hospital, and they can press G to call paramedics.
Option
Default
What it does
Config.Death.respawnTime
20
Seconds a downed player must wait before E respawns them at the nearest hospital.
Config.Death.loseCashOnDeath
false
When true, the player's cash is set to 0 when they respawn at a hospital.
Config.Death.emsCooldown
30000
Cooldown in milliseconds between two G calls to paramedics.
Which inventory qs-core routes item calls to. Leave it on 'auto': qs-coreinventory is used whenever it is started; when it is not and Quasar Store's advanced qs-inventory is running, items go to qs-inventory.
To use qs-inventory, run it instead ofqs-coreinventory in server.cfg. Quasar Framework always prefers qs-coreinventory while it is started. See Integrations.
The identifier type that links a player to their characters and saved colour palette. Do not change it on a live server: existing characters are stored under the current identifier and would no longer be found. Bans and groups always use the Rockstar license.
Config.Locale
'en'
Fallback language for qs-core when the qs:locale convar is not set. Set the language with setr qs:locale in server.cfg instead (see Languages below).
lua
-- don't change this on a live server
Config.Identifier = 'license'
Config.Locale = 'en'
Every Quasar Framework interface — HUD, inventory, menus, notifications, chat — reads one shared palette. Config.Theme in qs-core/shared/config.lua is the server's default palette: change it and every interface is reskinned for players who have not picked their own colours.
Players can also choose their own colours. On their first join, the intro (qs-intro) asks them to pick a palette, and later they can change it with /colors. A player's palette is saved to their account in the player_colors table and replaces Config.Theme for that player only.
Option
Default
What it does
Config.AllowColorChange
true
Registers the colour picker command. With false, players cannot change their colours with a command.
Config.ColorCommand
'colors'
The name of that command (/colors by default).
lua
Config.AllowColorChange = true
Config.ColorCommand = 'theme'-- players type /theme instead of /colors
Quasar Framework ships in 10 languages — en, es, fr, de, it, pt, pl, ru, tr and ar — and one convar in server.cfg switches every resource:
bash
setr qs:locale "de"
It must be setr (a replicated convar). With a plain set, only the server changes language and every text on the players' screens stays in English. Restart the server after changing it.
Every resource keeps its texts in its own locales folder (qs-core, qs-coreinventory, qs-clothing, qs-corechat, qs-corehud, qs-coremulticharacter, qs-coreshops, qs-corevehiclekeys, qs-coreweapons, qs-intro, qs-needs and every resource in [addons]). Each folder is loaded automatically, so a new language is just a new file per resource.
Copy the English file
In each resource, copy locales/en.lua to locales/<code>.lua — for example locales/nl.lua for Dutch.
Rename the table and translate
Change Locales.en to Locales.nl and translate every value. Keep the keys exactly as they are, and keep placeholders such as %s and %d: they are replaced by names and amounts.
lua
Locales = Locales or {}
Locales.nl = {
no_permission = 'Geen toestemming.',
player_not_found = 'Speler niet gevonden.',
invalid_amount = 'Ongeldig bedrag.',
paycheck = 'Salaris ontvangen: $%d',
-- ...every other key from en.lua
}
Switch the server to it
Set setr qs:locale "nl" in server.cfg and restart the server.
Every item on the server lives in one catalogue owned by qs-core. The inventory, shops, ESX scripts and QBCore scripts all read item labels, weights and settings from it.
qs-core/shared/items.lua defines the base items. Other resources add their own on start (weapons and ammo, food and drinks, police, EMS, job and drug items).
Add items to the base table in qs-core/shared/items.lua, or register them from any resource with the RegisterItems export — this is how the Quasar Framework resources add theirs:
exports['qs-core']:RegisterItem(name, data) adds a single item. Registering a name that already exists replaces its definition. To give a usable item an effect, see Inventory, Items & Weapons; ESX and QBCore scripts can also bring their items through the bridges, see ESX & QBCore Compatibility.
The duty state for a character that has no stored duty value yet (characters created by Quasar Framework start on duty). Scripts read it as job.onduty.
grades
—
A table of grades indexed from [0].
grades[n].name
—
The grade id (for example 'sergeant').
grades[n].label
—
The grade name players see.
grades[n].salary
—
The amount paid to the bank every paycheck. 0 means no paycheck.
grades[n].isBoss
false
Marks the boss grade. ESX and QBCore scripts see it as the boss rank.
Jobs can also be added from a server script with exports['qs-core']:RegisterJob(name, definition) (or several with RegisterJobs). A grade that does not exist falls back to the job's lowest grade. Give a job in game with /setjob <id> <job> [grade], for example /setjob 1 mechanic 2.
Use lowercase gang names. Gangs can also be added from a script with exports['qs-core']:RegisterGang(name, data) and assigned with exports['qs-core']:SetGang(source, name, grade). QBCore scripts see the gang through the qb-core bridge.
Driving jobs and gangs from your own scripts?SetJob, SetGang, RegisterJob, RegisterGang and the events they fire are listed in Commands and Exports.
qs-coreinventory is the FiveM inventory that ships with Quasar Framework: slots and weight, a secondary container (trunk, glovebox or stash), quick slots and an item wheel.
How close (in metres) you must stand to the back of a vehicle for the inventory to open its trunk.
Config.TrunkCloseDistance
5.0
The trunk closes when you walk farther than this from the vehicle. Also the auto-close distance of stash zones without their own radius.
Config.GloveboxSlots
5
Slots of a glovebox.
Config.GloveboxColumns
5
Columns of the glovebox grid.
Config.GloveboxMaxWeight
15000
Glovebox weight limit, in grams.
The trunk opens when you open the inventory standing behind an unlocked vehicle you have the keys for; the glovebox opens when you open it seated in a vehicle you have the keys for. Contents are saved by plate.
A registered stash is opened from a script, either with a stash zone (players open their inventory inside it) or directly. See Inventory, Items & Weapons.
Default key that opens and closes the inventory (command inventory).
Config.RadialKey
'TAB'
Default key held to open the item wheel.
Config.RadialSlots
5
How many slots (from slot 1) the item wheel shows.
Quick slots always use keys 1 to 5 for slots 1–5. The keys are FiveM key mappings: the default only applies to players who have not bound the action yet, and every player can rebind it in Settings → Key Bindings → FiveM.
Weapon categories are melee, pistol, smg, shotgun, rifle, mg, sniper, launcher, flare, taser, throwable and misc. An ammo item loads into a weapon of the same cat. A new weapon must exist in your game build or be streamed as an add-on; restart qs-coreweapons and its item is registered automatically.
lua
-- Bigger pistol magazines: 15 rounds on first equip and per pistol ammo item
WeaponsConfig.MagSize = {
pistol = 15,
smg = 30,
rifle = 30,
shotgun = 8,
sniper = 10,
mg = 100,
launcher = 1,
flare = 1,
taser = 1,
}
-- Inside WeaponsConfig.Weapons: an add-on weapon you stream yourself
weapon_mycarbine = { weapon = 'WEAPON_MYCARBINE', cat = 'rifle', label = 'Custom Carbine', weight = 3400 },
-- Inside WeaponsConfig.Ammo: ammo entries look like this
ammo_pistol = { cat = 'pistol', label = 'Pistol Ammo', weight = 200 },
The full list of the 105 weapons and 9 ammo items, with weights and categories, is in Inventory, Items & Weapons.
The loading screen is what players see while they connect. Its texts are set in [core]/loadingscreen/config.js; edit the file and restart the loadingscreen resource, and the next player who joins sees the change.