Skip to main content
TRACK B·FIVEM FUNDAMENTALS·Verified June 2026 · Lua 5.4 · ox_lib 3.x
Learning with an AI assistant?
Copies this lesson plus 2026 ground rules (no lua54 'yes', Cfx.re Portal, correct callback signatures) as a ready-to-paste mentor prompt.

The built-in resources: chat, spawnmanager, baseevents

Every FiveM server you start, even an empty one, already runs a handful of stock resources from Cfx.re. They handle chat, where players spawn, and the basic life events of a session. You do not install them and you do not write them. You call into them. This lesson shows you the three you reach for most, then proves it by wiring a single resource that talks to all three: a chat suggestion, a styled system message, and a reaction to a real game event.

You'll build
A resource that registers a chat command hint, posts a styled system message into the chat box, and reacts the moment a player gets into a vehicle.
Time
~20 minutes
You need
A FiveM practice server you can join and restart, plus the qu_first_line_of_lua and qu_natives_toolbox mental models from the earlier modules.
You'll learn
What chat, spawnmanager, baseevents, and sessionmanager already give you for free, and how to call into them instead of rebuilding them
BEFORE YOU START

What you already have running

Before the build, here is the map of what is sitting in your server doing work you never wrote. Each one is a real resource folder inside the FiveM artifacts, and each one exposes events or exports you call by name.

Stock resources and what they give you
chat
The chat box. You post messages with the chat:addMessage event, register slash-command hints with chat:addSuggestion, and filter or rewrite messages with the exports.chat:registerMessageHook export.
spawnmanager
Decides where players appear. From the client you call exports.spawnmanager:addSpawnPoint, setAutoSpawnCallback, and forceRespawn to control respawning.
baseevents
Emits life events: baseevents:enteredVehicle and leftVehicle fire on the server (the client tells the server), while baseevents:onPlayerDied and onPlayerKilled fire on both the client and the server.
sessionmanager
Manages the player session and fires playerActivated on the server once a player is fully loaded in and ready.

The point of this lesson is a habit, not a single script. When you need a chat message, a spawn point, or a notification that a player got in a car, your first move is to ask whether a stock resource already does it. It almost always does.

Keep reading the full lesson

Sign in to start, then unlock every step of this lesson and the full FiveM School with a membership.

Still ahead in this lesson
  • Build it
  • How it works
  • Common mistakes
  • What you can do now
  • Try it yourself

The remainder of Built-in resources: chat, spawnmanager, baseevents is available to FiveM School members.