Welcome to the Delirium Template for FiveM, a comprehensive starting point for developing FiveM servers using Lua. This template includes best practices, a clean directory structure, and essential files to kickstart your development.
- Organized directory structure for client, server, and shared scripts.
- Best practices for Lua coding, including naming conventions, formatting, and usage of nativos.
- Sample implementations for commands, events, functions, and NUI interaction.
- Pre-configured with essential FiveM resources and dependencies.
-
Clone the repository:
git clone --depth 1 https://github.com/DeliriumNetwork/delirium-template.git resource-name
-
Navigate to the project directory:
cd delirium-template
-
Install dependencies: Ensure you have the necessary dependencies installed for FiveM development.
-
Configure the
fxmanifest.lua
file: Adjust thefxmanifest.lua
file to fit your project requirements. -
Start your FiveM server: Follow the FiveM documentation to start your server with this template.
The project is structured as follows:
delirium-template
├── .github
├── client
│ ├── events.lua
│ ├── functions.lua
│ ├── main.lua
│ └── nui.lua
├── server
│ ├── commands.lua
│ ├── events.lua
│ ├── functions.lua
│ └── main.lua
├── shared
│ └── config.lua
├── ui
├── .gitignore
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── fxmanifest.lua
├── LICENSE
├── NOTICE
├── README.md
└── release.toml
Configuration options are located in the shared/config.lua
file. Adjust these settings to match your server requirements.
- Main Script:
client/main.lua
- Events Script:
client/events.lua
- Functions Script:
client/functions.lua
- NUI Script:
client/nui.lua
- Main Script:
server/main.lua
- Events Script:
server/events.lua
- Functions Script:
server/functions.lua
- Commands Script:
server/commands.lua
- Config Script:
shared/config.lua
The NUI integration is handled via the client/nui.lua
script, providing an abstraction layer for interaction with the HTML/CSS/JS UI located in the ui
folder.
We welcome contributions! Please read our Contributing Guide for guidelines on how to proceed.
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.
This template is maintained by the Delirium Network and its contributors. We appreciate the community's support and contributions.