Koja Scripts
JOBS

Database

File: shared/config.lua → Config.Database

Database

File: shared/config.luaConfig.Database


Configures how player data is stored in MySQL / MariaDB.

Fields

KeyTypeDefaultDescription
AutoCreateTablebooleantrueAutomatically creates the database table on first startup.
TableNamestring'koja-lawnmower'Name of the database table.
StartingValuestable(see below)Default data assigned to a player when they join for the first time.

StartingValues

KeyTypeDefaultDescription
levelnumber1Starting level.
expnumber0Starting experience points.
skillpointsnumber0Starting skill points.
skillstable{}Unlocked skills (empty by default).
historytable(see below)Mission history object.

history

KeyTypeDefaultDescription
totalMissionsnumber0Lifetime missions completed.
totalEarningsnumber0Lifetime money earned.
logstable{}Array of mission log entries.

Example

shared/config.lua
Config.Database = {
    AutoCreateTable = true,
    TableName = 'koja-lawnmower',
    StartingValues = {
        level = 1,
        exp = 0,
        history = {
            totalMissions = 0,
            totalEarnings = 0,
            logs = {}
        },
        skillpoints = 0,
        skills = {}
    }
}
  • Company — Defines the gardener company — its name, NPC, map blip, job requirement, parking spots, vehicles, and equipment offsets.
  • Locale & Debug — Key Type Default Description ------- --------- ------- ------------------------------------------------------------------- Debug boolean true Enables debug mode.
  • Levels — Controls the leveling progression for the gardener job.
  • Missions — File: shared/config.lua → Config.Missions
  • Skills — Defines the entire skill tree displayed in the Upgrades panel.
  • Uniforms — File: shared/config.lua → Config.Uniforms
  • Configuration — back to the section overview