What resources to load first?

Hello, what resources should be loaded first in the server.cfg because I’ve had different results depending on where i put my different resources.
For example:
cars, plugins, weapons menus etc
I have my plugins to be loaded in first and then my cars and weapons etc, but there seems to be some conflicts when i experiment with the server.

Hey @Volumetric87,
first you should start server relevant Scripts like [cfx-default], mysql-async
next should be your framework (ESX, QBCORE)
then you should be able to start everything whithout problems
Cars, MLO´s, Maps can be startet whenever you want, since they dont depend on anything else

I do the following. It works PERFECTLY for me. But my framework I wrote myself, so…

ensure [cfx-default] # Default FiveM stuff like mapmanager, chat, etc.
ensure [assets] # Streamed assets like cars, maps, clothing, etc.
ensure [important] # Stuff that others depend on like mysql, connectqueue, etc.
ensure pgl_base # My custom framework
ensure [standalone] # Stuff like my loading screen, pma-voice, PolyZone, etc.
ensure [pgl] # Stuff that uses my framework (just like esx_X or qb-X would use theirs)

That should work just as well for frameworks like ESX and QBCore.
Just replacing pgl_base with es_extended or qb-core and [pgl] with [esx] or [qb].

The reason I start pgl_base before standalone stuff, is because sometimes I edit a standalone script and even if it’s not completely standalone anymore because it may use my framework, if I didn’t write it myself, I don’t want it with my stuff and to pretend I did.

The reason I start my assets first, is because if there is a custom interior I am creating when a script starts, not just when a player connects, it needs to already exist. Same for vehicles. These instances are few and far between, but better safe than sorry, right?

As mentioned, this method works perfectly for ME, so it should for you as well, but everyone is different and if you prefer to start things differently, as long as scripts that others depend on start first, there’s no issue with doing your own thing.

So to summarize, I suggest;
default fivem > assets > dependencies > framework > standalone > framework scripts