C# or LUA?

Hey everyone. I’m looking to get started with developing mods for FiveM. I have a question, is it better to use LUA or C#? I have no experience at all with LUA, and some with C#. I’m looking more towards using C#. Are there any drawbacks to not using LUA?

Also, can someone briefly explain to me what type of things client side vs. server side scripts do? Thanks.

I use Lua as I have no experience with C#. I have seen no drawbacks for using any of them as they are both great in this situation. I would personally say Lua is easier to learn and understand in my opinion but you can use C# if you want.

As far as client and server goes. In FiveM there are natives that can only be called on the client unless it’s a native the FiveM developers added into the API to either be shared, client, or Server. Which it will tell you on the native.

For client scripts is where you would do all of the clients work as in setting the players ped model or spawning in cars, objects, etc.

For server that’s where you would want to keep all of your important data like important config files or if you have a mysql database you would use the server to interact with the mysqldb.

Sorry if I missed parts of the question I am about to fall asleep.

Thanks bro, one more question… I’m quite new to modding, what is a native? Is it a function that originates from the original game?

It’s GTA 5s functions they build natively for the game yes.

Yep. A native such as SetTextFont is a function that originates ingame. There are also natives that have been added by FiveM developers such as DropPlayer. A good website is runtime.fivem.net/doc/reference.html which lists the natives available to use.

1 Like