Frameworks FiveM

Hey Guys

I would like to know what a framework contains so that it actually is considered as a framework? How does it exactly help with developing resources? <-(reference from docs.fivem.net)
I’m currently developing my own resources, what benefits would I have if I create my own framework?
I would be happy over some feedback :slight_smile:

Hey there,
I’ve create like 3 frameworks and having one of your own is cool, but unless you plan on actually developing it for a long period of time, I would’ve just had used ESX or QBCore.

Now answering the original question.
Framework is pretty much anything you can use to help you develop your scripts. Frameworks usually have some functions in which you can control their behaviour or utilise 'em in your scripts. If we go by definition of today most popular frameworks, then we need:

-Server Callbacks
-Basic Server-Side Functions(get player data)
-Basic Client-Side Functions(get/create vehicles etc.)
-Some NUI

This is way oversiplified and in most cases you can just have one of these and it would be considered Framework. If we go with anything that helps you develop your scripts, you may just as well consider oxmysql/mysql-async as frameworks since they help you store data when you may just as well use physical *.json files. So this definition of anything that helps you develop is very vague.

Now going to creating your own framework.

-Benefits are that you know what you have there, other people may not know how to use some function which you’ve secured and this could lead to some better protection against cheaters/exploiters, could doesn’t mean it will.

-Copying and pasting functions while may seem easy way to create useful framework, will lead to even more security vulnerabilities which would be worse than in original framework.

-Other thing is you may add something that couldn’t be found in some other framework like metadata on weapons or items.

-While creating framework you can learn new things like managing data, priorities, async functions and what not which could help you in future. I’ve personally got to learn how async works with for example, callbacks.

-This is a lot of work for 1 person to get it to work perfectly. While it may seem as a good idea to create one, you will work on this for some time and then abandon it from frustration since copying scripts from other frameworks and changing them to fit yours will seem as a waste of time since you could have just used other framework.

These are my thoughts, creating your own framework should either be for one purpose like saving and reading *.json files server-side or big framework like ESX or QBCore as a one time thing to help you learn.
For me, stick to ESX or QBCore and develop tools to help you achieve what you are/will be working on.

Thank you for your answer and time!
We are around 4 peoples working on the project, a bit of a misscommunication from my side
We plan on releasing the server when everything is done, so yes, we will invest a lot of time in the developement.
In case everything fails and we lose motivation, I will def consider esx or qbcore.
Have a nice day and good luck in your projects :slight_smile: