Why is the default character screen appearing two or three times just before the multicharacter and how do I fix it?

A lot of you who are using the QBCore Framework will of noticed a default ped appear two or three times in different places after the loading screen has finished and just before the multicharacter screen starts up. I had a look at the cfx-default scripts and found out it was the basic-gamemode files causing the default ped to appear. The default peds are used when you have no framework like ESX or QBCORE so you have a ped that automatically spawns in random locations around the map. If you are using a multicharacter script like qb-multicharacter you do not require basic-gamemode because qb-multicharacter uses a script called qb-spawn after you have created a character. Once your character is created the information is saved to a SQL database so you can use the same information without having to redo a character. It also saves your last location and all other information from when you exited the server. For this reason, you do not require basic-gamemode or any of the random spawn locations. There will be a default loading screen with information about what is loading to help developers. Once the loading screen is finished a default ped is spawned. Basic-gamemode folder is used and is located in a folder called [gamemodes]. Inside the basic-gamemode the is a file called basic_client.lua and if you look at line 2 you will notice the code that looks like this exports.spawnmanager:setAutoSpawn(true). That is an instruction or command to spawn peds just after the loading screen has finished. If you look at your console you might notice at the bottom a folder called fivem-map-hipster is being used. That file is located [gamemodes]\[maps] and there are two other folders in there as well that are not used one is called fivem-map-skater and the other is redm-map-one that is used for the redm multiplayer. If you open the fivem-map-hipster folder you will find a file called map.lua and if you open that with your editor you will see lines of code that look like this spawn point ‘a_m_y_hipster_01’ { x = -802.311, y = 175.056, z = 72.8446 }. Those are the default spawn locations for your character when you not using a framework.

The basic basic-game mode folder is not required if you have a framework like esx or qbcore or any other framework you might be using. To fix the problem of the default peds appearing there are three steps you must do and follow below.

Here is what to do step by step:
  1. Step 1: Go to your server.cfg and comment out basic-gamemode so it looks like this #ensure basic-gamemode or just remove it.
  2. Step 2: Go to where the last item marked ensure in your server.cfg and add stop basic-gamemode to make sure it stops or you can just remove ensure basic-gamemode.
  3. Step 3: Restart your server.