NFive is a complete plugin framework for GTAV FiveM servers built entirely in managed C#. This project aims to replace existing FiveM server resources with a single managed framework to build upon.
On its own NFive provides no extra game mechanics or functionality, all extra features are introduced via plugins.
Currently a work in progress
This project is still subject to breaking changes at anytime, use at your own risk!
It is strongly recommended that you use NFive Package Manager (nfpm
) to install and manage NFive.
See the NFive Getting Started documentation for more information.
-
Download nfpm and place it in an empty directory.
-
Run
nfpm setup .
and answer the prompts to automatically download and install a FiveM server and NFive into the current directory. -
Install the plugins you want to use on your server with
nfpm install <plugin>
, seenfpm search
and the NFive plugin hub for available plugins. -
Run
nfpm start
to boot the server and try connecting tolocalhost
with your FiveM client.See the NFive Database Setup documentation for how to correctly configure the your MySQL server.
Building NFive will require Visual Studio 2017. A MySQL database is required for storage, MariaDB is recommended.
This resource currently replaces all stock server resources; make sure you remove them from your configuration. The server will always try to load sessionmanager
, even if it is not in your configuration, so you must delete or rename the resource folder.
-
Clone this repository inside of your FiveM server's
resources
directory:git clone https://github.com/NFive/NFive.git nfive cd nfive
-
Build the project in Visual Studio.
-
Edit your
server.cfg
file to include the following line below your existing configuration:start nfive
-
Edit
config\database.yml
with your database connection information as needed.
Note: For full Unicode support you will need to manually preconfigure your MySQL server's default character set. For MySQL/MariaDB add --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_520_ci
to the server arguments before the database is created. See the documentation for details.
Its strongly recommended you use nfpm migrate
for automated migrations.
-
Drop the existing database.
-
Open the Package Manager Console in Visual Studio:
View > Other Windows > Package Manager Console
-
Run following command with your database connection information:
Add-Migration -Name Init -Force -ProjectName Server -ConnectionString "Host=db;Port=3306;Database=fivem;User Id=root;Password=password;CharSet=utf8mb4;SSL Mode=None" -ConnectionProviderName MySql.Data.MySqlClient