The start of a roleplay framework for FiveM (GTA V multiplayer), written in C#.
Status: abandoned learning project, May 2021. I worked on it for one week. Most of the plan in TODO.md was never built.
Diamond.Shared: characters, an inventory system (player and vehicle inventories) and item base classes (food, drink, alcohol, weapons, ammo, blueprints).Diamond.Client: character, inventory, money, shop and weapon handlers, and a police tackle.Diamond.Server: server entry point and a salary handler.Diamond.UserInterface: the in-game UI as a Blazor WebAssembly app, loaded as the resource's NUI page. Getting Blazor to run inside FiveM was the part I was most pleased with.
There is no database. Data is passed between client and server as JSON and nothing is saved.
I have not built it since 2021 and it may not build today.
- Put the repository in a FiveM server's
resourcesfolder. - Build
Diamond.slnin Visual Studio or Rider. The client and server projects target .NET Framework 4.5.2; the UI project targets .NET 5. The client project expectsMenuAPI.dllinDiamond.Client/References, which is not in the repository, and one reference inDiamond.Client.csprojpoints at a NuGet path on my old machine that you will need to fix. - Publish
Diamond.UserInterfacein Release mode.fxmanifest.lualoads the UI from itspublish/wwwrootfolder. - Add
ensure Diamond-Frameworktoserver.cfg.