A reusable Lua starter template for building NPC-related resources on FiveM game servers.
This repository provides a clean, opinionated starting point for FiveM resource development focused on NPC scripting. Clone it, rename the resource, and build on top of the scaffolding instead of starting from scratch every time.
It is maintained as a personal learning and portfolio project and is not intended for production use without further validation.
| Layer | Detail |
|---|---|
| Language | Lua |
| Platform | FiveM (CitizenFX) |
| Project type | Game server resource / Starter template |
- A running FiveM server (txAdmin or bare metal).
- Basic familiarity with Lua and the FiveM native API.
- Clone or download this repository into your server's
resourcesfolder:git clone https://github.com/DiegR02/fivem-npc-template.git resources/npc-template
- Rename the resource folder and update the
fxmanifest.luanamefield to match your project. - Add the resource to your
server.cfg:ensure npc-template - Restart the server or run
refreshfollowed byensure npc-templatein the server console.
Note: Review all source files before enabling the resource. Adjust paths, dependencies, and configuration values to suit your server setup.
After installation, the template exposes a minimal NPC scaffold. Typical customisation points:
client/main.lua– client-side NPC spawn and interaction logic.server/main.lua– server-side event handlers and data persistence hooks.shared/config.lua– shared configuration table (model hashes, spawn coords, behaviour flags).
Replace placeholder values in shared/config.lua with your own NPC definitions and extend the event handlers as needed.
| Field | Value |
|---|---|
| Category | Template |
| Priority | Low |
| Portfolio status | Reusable starter |
| Quality signals | Has license |
This project is positioned as a learning and practice resource. Contributions, issues, and forks are welcome, but no production support SLA is implied.
fivem · lua · npc · npctemplate · game-server-resource · starter-template · template · learning-project
This repository has been reviewed for naming consistency, metadata completeness, and documentation quality as part of a portfolio refresh.
See LICENSE for details.