Building on Echo

Everything you need to build jobs, businesses, and gameplay scripts on the Echo framework.

Echo is an optimized FiveM framework. The core (echo_core) owns players, money, jobs and gangs; echo_ui owns every HUD widget; echo_inventory owns items. Your script talks to all three through a small, stable API — no need to read the framework's internals.

💡 Where to start

Read Setup below, copy the starter template, then dip into Callbacks and Player & State — that's 90% of what a job needs.

Setup

Add two lines to your resource's fxmanifest.lua. The shared_script import gives every client and server file in your resource the global Echo table.

fx_version 'cerulean'
game 'gta5'

dependency 'echo_core'                 -- echo_core must start first
shared_script '@echo_core/import.lua'  -- gives you the global `Echo` table everywhere

client_scripts { 'client/*.lua' }
server_scripts { 'server/*.lua' }

UI lives in a separate resource — call it directly via exports (exports.echo_ui:Notify{...}), no import needed. See echo_ui.

Your first script

A complete clock-in interaction: the client shows an eye-target option, asks the server (a callback), and the server validates and pays out. Server-authoritative — the client never decides money.

server/main.lua

Echo.RegisterCallback('myjob:clockIn', function(source)
    local data = Echo.GetPlayerData(source)
    if not data then return false end

    -- validate however you like (job, grade, location, cooldown...)
    Echo.AddMoney(source, 'cash', 250, 'myjob-clock-in')
    return true, (data.charinfo and data.charinfo.firstname) or 'worker'
end)

client/main.lua

AddEventHandler(Echo.events.playerLoaded, function()
    exports.echo_ui:AddBoxZone({
        coords = vec3(-1037.0, -2738.0, 20.0),
        size = vec3(2.0, 2.0, 2.0),
        options = {
            {
                label = 'Clock In',
                icon = 'fas fa-clock',
                onSelect = function()
                    local ok, name = Echo.AwaitCallback('myjob:clockIn')
                    exports.echo_ui:Notify({
                        type = ok and 'success' or 'error',
                        title = 'Shift',
                        message = ok and ('Welcome, ' .. name) or 'You can\'t clock in here.',
                    })
                end,
            },
        },
    })
end)
📦 Starter template

A copy-paste resource with exactly this is shipped at resources/[echo]/echo_template. Duplicate the folder, rename it, and start building.

What's next