Systems Overview
Architecture, database, stages, open files, and server callbacks
Architecture
Key files:
shared/config.luaholds introduction settings, Stage 1 settings, plate length, parking compatibility, and localized strings.server/server.luamanages theenvi_tutorialtable, tutorial buckets, stage get and set logic, and money callbacks.server/server_open.luahandles starter vehicle creation for QBCore, Qbox, and ESX.client/client_open.luaexposes the fuel hook for your fuel script.escrow client files run the actual tutorial flow, entities, timers, and stage transitions.
Database
Tutorial progress is stored in envi_tutorial.
The table stores:
player identifier
current stage
A fresh player starts at stage 0.
A completed player is stored at the finished stage value from the script.
Config
Introduction
Config.Introduction covers:
the intro ped
spawn points
intro alerts and speech
showcase cars
intro blurbs
Stage 1
Config.Stage1 covers:
garage step
gas station step
bank step
store step
accepted item checklist
Other important config values:
Config.LicencePlateLengthConfig.AdvancedParkingConfig.Lang
Stages
Stage 0: introduction
The player enters an isolated bucket.
They meet Professor Bonzai, inspect showcase cars, and choose a starter vehicle.
The vehicle creation path writes to the correct framework garage table through the open server file.
Stage 1
The player is sent through the garage, fuel, bank, and shop steps.
The script validates each step before progressing.
The client flow also includes a safety timeout around 30 minutes.
Open files
Open integration points:
server/server_open.luafor garage branch logicclient/client_open.luaforGetFuel(vehicle)
Server callbacks
Documented callback names include:
envi-tutorial:startenvi-tutorial:endenvi-tutorial:isInTutorialenvi-tutorial:getStageenvi-tutorial:setStageenvi-tutorial:enterBucketenvi-tutorial:exitBucketenvi-tutorial:getMoneyenvi-tutorial:chooseVehicle
These are used by the escrow client through the bridge callback path.
Last updated