Skip to main content
Back to school
Track B · 52 core lessons

Write your own scripts

Start with Lua, then build, test, and debug your own FiveM resources.

Work toward: Your own working FiveM resources.

Start with free introductory lessons. Membership unlocks the full library, guides, and standard support. Explore Membership

Your learning path

Follow the modules in order. Optional lessons are there when you need them.

Written lessons and reference material are currently in English.

Module 1 · 5 lessonsDeveloper setup

Module 2 · 7 lessonsLua fundamentals

Module 3 · 5 lessonsYour first resource

Module 4 · 16 lessonsFiveM fundamentals

Natives, threads, events, and the trust boundary.

  1. FiveM natives: the toolboxWhat a native is and how to find one in the docs.Members only
  2. Players, peds, and idsPlayerId vs PlayerPedId vs server id vs network id, and the source variable.Members only
  3. Coordinates, vectors, and distancevector3, GetEntityCoords, heading, and #(a - b) distance checks.Members only
  4. Reading player input: controls and keysControl IDs, IsControlJustPressed, disabling keys, RegisterKeyMapping.Members only
  5. Two worlds, one resourceClient vs server. They cannot read each other's variables.Members only
  6. CreateThread and WaitBackground loops without freezing the server.Members only
  7. Trust and authorityThe server must stay in charge, or cheaters win.Members only
  8. TriggerEvent: same-sideA one-line pattern that keeps code clean.Members only
  9. TriggerServer and TriggerClientEventCrossing the wall, plus the source variable.Members only
  10. CallbacksAsk and wait for an answer with lib.callback.Members only
  11. ox_lib: notifications and UINotifications, inputs, progress bars, and context menus.Members only
  12. State bags: concepts and basic usageShared state without events.OptionalMembers only
  13. How to use State BagsSet, get, and react to State Bag changes - share data between resources without events.OptionalMembers only
  14. Latent eventsStreaming big payloads without overflow.OptionalMembers only
  15. Cancelling eventsStop an event before other handlers see it.OptionalMembers only
  16. Built-in resources: chat, spawnmanager, baseeventsThe stock resources every server runs and their hooks.ReferenceMembers only

Module 5 · 5 lessonsData and persistence

Module 6 · 7 lessonsFramework integration

Module 7 · 15 lessonsBuild real products

Ship jobs, menus, trades, and a banking feature end to end.

  1. /heal command: your first buildPlan before coding. A command with a cooldown.Members only
  2. Jobs frameworkClock-in, grades, a payroll loop that never double-pays.Members only
  3. Mini banking capstoneBalance checks, server validation, safe writes.Members only
  4. Server-only banking and auditPersist balances, audit-log every transaction.Members only
  5. Cleanup disciplineDelete on stop, drop, and timeout. No leaks.Members only
  6. ox_target: interact with anythingEye targeting on props, peds, vehicles.OptionalMembers only
  7. Spawning entities safelyModel loading, handles, a registry for objects, props, peds.OptionalMembers only
  8. Teleport menu with ox_libLocations, permission checks, cooldowns.OptionalMembers only
  9. Player-to-player trade systemBuild a server-authoritative trade with ox_inventory: ownership + proximity checks, both-confirm, anti-dupe lock.OptionalMembers only
  10. Player survey form with ox_libA /survey command that draws a free NUI form, then re-validates every answer server-side.OptionalMembers only
  11. Vehicles: spawn, modify, storeSpawn patterns, network ownership, cleanup on timeout.OptionalMembers only
  12. Vehicles and garagesPlate as key, the spawn-store-retrieve loop.OptionalMembers only
  13. Blips, markers, and checkpointsMap icons, world markers, and standing-in-it detection.OptionalMembers only
  14. Draw on screen: text, 3D text, and markersDrawText, a DrawText3D helper, DrawMarker, and gating the draw loop by distance.OptionalMembers only
  15. Animations and scenariosRequestAnimDict, TaskPlayAnim flags, scenarios, and ClearPedTasks.OptionalMembers only

Module 8 · 7 lessonsInterfaces (NUI)

Module 9 · 15 lessonsProduction engineering

Exports, performance, OneSync, security, and production debugging.

  1. Exports across resourcesexports(name, fn), server vs client.Members only
  2. HTTP requests and webhooksPerformHttpRequest, Discord webhooks, JSON.Members only
  3. Promises and asyncpromise.new, resolve, Citizen.Await.Members only
  4. Measure performance with resmon and the profilerresmon, threads, the 0.5ms hot path.Members only
  5. Optimize client, server, network, and database performanceDistance checks, throttled loops, Wait tuning, and verifying your fix with resmon.Members only
  6. Systematic debugging for production resourcesStructured logging, pcall, the stop-and-collect checklist.Members only
  7. Anti-cheat patternsServer-authority, rate limits, integrity.Members only
  8. OneSync fundamentals and entity ownershipCull distance, instancing, population.AdvancedMembers only
  9. Migrating legacy resources to OneSyncEntity ownership checks, scoped events, and the patterns that changed with OneSync.AdvancedMembers only
  10. OOP via metatablessetmetatable, __index, the class pattern.AdvancedMembers only
  11. Multi-threading for advanced scriptsOffload heavy computation to separate threads, use Citizen.SetTimeout for deferred work.AdvancedMembers only
  12. Voice scripting: proximity, channels, radioThe mumble natives that build voice features, beyond config.AdvancedMembers only
  13. Setting up C# for FiveM resourcesWhen C# beats Lua, the .NET project setup, BaseScript lifecycle, and calling natives from C#.AdvancedMembers only
  14. Handling basics and safe editshandling.meta with a Git revert path.OptionalMembers only
  15. Add Discord rich presence to your serverShow player count, server name, and custom art in Discord with a Join button.OptionalMembers only

Module 10 · 3 lessonsTest and release

Module 11 · 4 lessonsSell and support