FxDK (FiveM Development Kit)
FxDK (Cfx.re Development Kit) is the official integrated development environment (IDE) for FiveM. It provides a streamlined workflow for creating, testing, and debugging resources without needing to manually restart your server or switch windows constantly.
Getting Started
FxDK is included with your FiveM installation. You don’t need to download it separately.
Launching FxDK
- Open your FiveM installation folder.
- Locate and run
FiveM.exe(orFiveM.appon macOS). - On the main menu, click the FxDK button (usually in the top right or via the “Developer” menu).
- Alternatively, look for a shortcut named FiveM (FxDK) created during installation.
Creating a Project
FxDK organizes your work into “Projects”. A project represents your server environment and all its resources.
- Click New Project.
- Choose a location for your project folder.
- Select a template (e.g., “Blank”, “Lua”, “JS”).
- Give your project a name and click Create.
FxDK will set up a local server environment isolated from your main server files.
Interface Overview
The FxDK interface is divided into several key areas:
- Project Explorer (Left): Shows your resources, assets, and configuration files.
- Editor (Center): A code editor (based on Monaco, same as VS Code) for editing your scripts.
- Game View (Center/Right): An embedded view of the FiveM game client.
- Console (Bottom): Displays server and client logs, errors, and debug output.
- Toolbar (Top): Controls for starting/stopping the server, restarting resources, and toggling views.
Key Features
Real-Time Editing (Hot Reload)
One of FxDK’s most powerful features is the ability to edit code and see changes instantly.
- Modify a client or server script.
- Save the file (
Ctrl+S). - FxDK automatically restarts the resource.
- Changes are reflected immediately in the game view.
World Editor
FxDK includes a visual World Editor for placing maps, props, and creating interiors.
- Enable “World Editor” mode from the toolbar.
- Fly around the map and place objects visually.
- Export your changes directly to a resource.
Resource Monitor
Built-in performance monitoring tools allow you to see CPU and memory usage of your resources in real-time, helping you optimize your code before deploying to production.
Basic Project Structure
When you create a project, FxDK generates a structure similar to a standard FiveM server:
my-project/
├── system-resources/ # Default FiveM resources (chat, spawnmanager, etc.)
├── resources/ # Your custom resources go here
├── server.cfg # Server configuration (managed by FxDK)
└── fxdk-project.json # FxDK project metadataTips for Success
- Use Version Control: Initialize a Git repository in your project folder to track changes.
- External Editors: While FxDK has a built-in editor, you can still open the project folder in VS Code if you prefer its extensions and themes. FxDK will detect changes made externally.
- Debugging: Use
console.log()(JS) orprint()(Lua) extensively. FxDK captures both server and client prints in the unified console.
Next Steps
- Check out the Scripting Overview to start writing code.
- Learn about Asset Streaming to add cars and maps.