</>liveDevDocs
ScriptlerliveBaseEnglish

liveBase Core

Framework core — convars, modules, permission, hot reload, migration, admin panel, skill tree, exports and events.

🌐 Türkçe · liveBase Çekirdek

Path: resources/[livedev]/liveBase/ · Version: 1.0.0
Provides: live-base, qb-core (QBCore compatibility shim) · Dependency: oxmysql

For detailed Permission / State API → liveBase API System


Convars

ConvarDefaultDescription
livebase_localetrLanguage (tr / en)
livebase_debugfalseDebug mode
livebase_dashboard_tokenDashboard API auth token
livebase_dashboard_port30121Dashboard HTTP port
livebase_log_levelwarnLog level

Config files

FileContent
config/main.luaDebug, locale, spawn, security
config/modules.luaOpt-in module toggles
config/permissions.luaACE roles and permissions
config/skilltree.luaSkill tree XP curves
data/skilltree.lua5 branches + skill definitions
data/items.luaItem definitions

Modules (opt-in)

Managed in config/modules.lua:

ModuleDefaultDescription
core✅ RequiredPlayer, callback, cache
economyDynamic economy multipliers
hot_reloadfw reload
migratefw migrate
permissionsCentral HasPermission API
adminAdmin panel infrastructure
skilltreeSkill tree core
devtoolsWipe, simulate, log viewer

Permission API

Module: permissions · Bridge: shared/permission_bridge.lua

See liveBase API System.


Hot Reload System

Reload a single resource without restarting the server.

CommandDescription
fw reload <alias>Hot reload resource
fw reloadlistList aliases

Protected resources: liveBase, liveFirstScreen, liveLoading, oxmysql, liveNuiCore

exports['liveBase']:HotReload('inventory')

Migration System

CommandDescription
fw migrateApply pending migrations
fw migratestatusStatus list
IDFileDescription
001_livebase_foundationsql/migrations/001_...Core tables
002_admin_foundationsql/migrations/002_...Admin panel tables
exports['liveBase']:RunMigrations()
exports['liveBase']:GetMigrationStatus()

Exports, Player Object, Events

local liveBase = exports['liveBase']:GetBaseObject()
local Player = liveBase.Functions.GetPlayer(source)

Player.Functions.AddMoney('bank', 500, 'reason')
Player.Functions.SetJob('police', 2)
Player.Functions.GetSkillLevel('lockpicking')

Blocked (security): liveBase:Server:AddItem, RemoveItem, UseItem → logs only


Economy & Vehicle DNA

exports['liveBase']:RecordEconomyActivity('fishing', 5)
local payout = exports['liveBase']:CalculateEconomyPrice('fishing', 150)
exports['liveBase']:ApplyVehicleWear(plate, 'engine', 0.5)

Dashboard API

GET /api/livebase/health
GET /api/livebase/players
Authorization: Bearer <livebase_dashboard_token>

Admin Panel Infrastructure

Status: Core infrastructure (v1) — UI will be a separate resource.

Domains: players, economy, organizations, audit, telemetry, ops

HTTP: GET /api/livebase/admin/health, /players, /economy, /audit

Permissions: admin.panel, admin.panel.players, admin.spectate, etc.


Skill Tree

Module: skilltree · Storage: players.metadata.skilltree

BranchIDSkills
Physicalphysical9
Drivingdriving9
Professionsprofessions9
Businessbusiness7
Criminalcriminal8
exports['liveBase']:AddSkillActivityXp(source, 'mining', 20, 'mining:ore')
exports['liveBase']:CanUseSkill(src, 'hacking', 2)
exports['liveBase']:GetSkillModifier(source, 'lockpicking', 'lockpickSpeed', 1.0)

UI is built in a separate resource — core provides data + exports only.


Admin commands

CommandDescription
/lb_devwipe <citizenid>Delete test character
/lb_analyzeLive framework analysis
fw reload <alias>Hot reload
fw migrateSQL migration

Security

  1. Never trust the client — money, items, permissions server-side only
  2. Session mail — only via SetPlayerSessionAccount export
  3. Rate limiting per event
  4. Exploit ban on repeated violations

Writing a new script

local liveBase = exports['liveBase']:GetBaseObject()

RegisterNetEvent('myjob:server:pay', function(amount)
    local src = source
    local Player = liveBase.Functions.GetPlayer(src)
    if not Player then return end
    amount = tonumber(amount)
    if not amount or amount > 500 then return end
    Player.Functions.AddMoney('bank', amount, 'myjob-pay')
end)

On this page