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
| Convar | Default | Description |
|---|---|---|
livebase_locale | tr | Language (tr / en) |
livebase_debug | false | Debug mode |
livebase_dashboard_token | — | Dashboard API auth token |
livebase_dashboard_port | 30121 | Dashboard HTTP port |
livebase_log_level | warn | Log level |
Config files
| File | Content |
|---|---|
config/main.lua | Debug, locale, spawn, security |
config/modules.lua | Opt-in module toggles |
config/permissions.lua | ACE roles and permissions |
config/skilltree.lua | Skill tree XP curves |
data/skilltree.lua | 5 branches + skill definitions |
data/items.lua | Item definitions |
Modules (opt-in)
Managed in config/modules.lua:
| Module | Default | Description |
|---|---|---|
core | ✅ Required | Player, callback, cache |
economy | ✅ | Dynamic economy multipliers |
hot_reload | ✅ | fw reload |
migrate | ✅ | fw migrate |
permissions | ✅ | Central HasPermission API |
admin | ✅ | Admin panel infrastructure |
skilltree | ✅ | Skill tree core |
devtools | ❌ | Wipe, 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.
| Command | Description |
|---|---|
fw reload <alias> | Hot reload resource |
fw reloadlist | List aliases |
Protected resources: liveBase, liveFirstScreen, liveLoading, oxmysql, liveNuiCore
exports['liveBase']:HotReload('inventory')Migration System
| Command | Description |
|---|---|
fw migrate | Apply pending migrations |
fw migratestatus | Status list |
| ID | File | Description |
|---|---|---|
001_livebase_foundation | sql/migrations/001_... | Core tables |
002_admin_foundation | sql/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
| Branch | ID | Skills |
|---|---|---|
| Physical | physical | 9 |
| Driving | driving | 9 |
| Professions | professions | 9 |
| Business | business | 7 |
| Criminal | criminal | 8 |
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
| Command | Description |
|---|---|
/lb_devwipe <citizenid> | Delete test character |
/lb_analyze | Live framework analysis |
fw reload <alias> | Hot reload |
fw migrate | SQL migration |
Security
- Never trust the client — money, items, permissions server-side only
- Session mail — only via
SetPlayerSessionAccountexport - Rate limiting per event
- 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)