[HELP] General C# Development Help/Discussion


Hi guys, myself and my associate are not new to programming (just over 7 years experience for me, god knows how long for him) however we are new to modding GTA V (did some GTA:SA scripting in the past but that was PAWN).

So to keep a long story short, my buddy and I are experimenting with multiplayer modding/scripting on FiveReborn. I do apologize if this has already been asked, I couldn’t find it, but with FiveReborn is it possible to use the CTRL+R functionality that ScriptHookV offers? You know, the mod reloading/unloading without having to restart the game. Or is that not supported?

I have tried everything under the sun to try and get it working. It’s really a pain to keep having to start the game over and over again to test, especially when a tiny bug such as a simple typo causes a crash. I have the ScriptHookV.dev file in my main game directory (as well as my five reborn dir just to be safe).

My assumption is that it is not supported, however if there is a way to pull it off I will be eternally grateful.

You’re not supposed to code with ‘ScriptHookV’ anyway, but use the built-in scripting systems to run code downloaded from the server.

If you’d use that, you could just use restart resname in the console.

Oh. Derp. Ok so where can I find documentation on the built-in scripting systems? I’ll take a look around here and see what I can find, but I am currently at work, so someone to point me in the right direction would be helpful.


There is no official documentation it has been a frustration and an uphill battle. Here is a good starting point for your journey: http://www.dev-c.com/nativedb/

Also if you open the main fivereborn folder and got to the folder Five Reborn\citizen\scripting\lua then look for the natives.lua

Thanks, I’ve been sifting through this for hours lol. In fact I’ve discovered how to write in C# (my language of choice) for 5R. So I’m experimenting with that.

Where did you start with C# for 5R?

By examining this which works perfectly: [Release] Vehicle Controls GUI v2

Although I am not having much luck with getting C# to work with my own stuff. There might be a few things I am missing. I’ve even gone so far as to decompile his dll’s in order to get a look at his references.

Clearly I am missing something, I am thinking maybe he is using some sort of modified version of nativeUI. Thats the only thing I can think of that is different because I have replicated EVERYTHING he’s got in his project for testing purposes. So I am going to give in and write in LUA for the time being.

P.S. I haven’t checked for a nativeui.dll in the fivereborn directory though, maybe I am using the wrong version of nativeui? Idk just pissing in the wind at this point lol

here is a good starting point for you @BBrown : Here

and also: here

Thanks that is awesome! I did that myself actually but wasn’t sure if I had configured it correctly I think i may have done a few steps that were unnecessary and broke it in the first place lol.

Do you happen to know if CitizenFX.Core includes all of the natives?

Natives can be found in: Five Reborn\citizen\scripting\lua\natives.lua

and this site has some more info http://www.dev-c.com/nativedb/

@Healshot - thanks for the info. I am BBrown’s partner in this, in case your wondering.

Unfortunately any .net.dll compiled with VS 2015 isn’t loading into the Server. Are you sure the instructions here work with streaming the .dll’s down to players? Server console throws a bit of errors that I’m not familiar with. http://imgur.com/0GSpqRP

resource name is ’ pm5r ’ in case your wondering.

Yeah thanks Healshot, i ended up finding a way to call the natives using Function.Call<[Data_Type_Here]>(Hash.[NATIVE_FUNCTION_HERE]);

@Wyste never seen this before. All of the DLLs my dev team has created have worked so, I’ll ask them if they have run into the issue.

Just an update for anyone else reading this, finally are starting to make some headway with C# development. Things are coming together and working as they should. Thank you to Healshot for getting us pointed in the right direction.

I am going to change the name of this topic to reflect this thread’s true nature, which is now a general help thread.

1 Like

Hello, I portforward my server and it is still not showing up for the public. Does anyone know how to make it work?


This is in no way related to what the topic is about. Not even close.