Skip to content

DiegR02/fivem-npc-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fivem-npc-template

A reusable Lua starter template for building NPC-related resources on FiveM game servers.


Overview

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.


Tech Stack

Layer Detail
Language Lua
Platform FiveM (CitizenFX)
Project type Game server resource / Starter template

Getting Started

Prerequisites

  • A running FiveM server (txAdmin or bare metal).
  • Basic familiarity with Lua and the FiveM native API.

Installation

  1. Clone or download this repository into your server's resources folder:
    git clone https://github.com/DiegR02/fivem-npc-template.git resources/npc-template
  2. Rename the resource folder and update the fxmanifest.lua name field to match your project.
  3. Add the resource to your server.cfg:
    ensure npc-template
    
  4. Restart the server or run refresh followed by ensure npc-template in the server console.

Note: Review all source files before enabling the resource. Adjust paths, dependencies, and configuration values to suit your server setup.


Usage

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.


Project Status

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.


Topics

fivem · lua · npc · npctemplate · game-server-resource · starter-template · template · learning-project


Repository Maintenance

This repository has been reviewed for naming consistency, metadata completeness, and documentation quality as part of a portfolio refresh.


License

See LICENSE for details.

About

Starter template for FiveM NPC game-server resources, written in Lua.

Topics

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages