Spawning as a default ped everytime plaeyrs rejoins server!

So there’s a bug going on my server and I have no clue where it is! So if a player joins my server and restarts their game they rejoin as a default ped. I reset ESX and my Database. I have no clue what to do so can anyone give me a hand?

What resources are you using? Post your start order that is in your server.cfg would help.

It would also help if you could post any errors from the in-game F8 console, as well as your server console.

Sorry about the late response but here you go!

start essentialmode
start esplugin_mysql
start es_ui
start async
start cron
start es_camera
start es_extended
start gcphone
start esx_addons_gcphone
start esx_addonaccount
start esx_ambulancejob
start esx_barbershop
start esx_basicneeds
start esx_billing
start esx_boat
start esx_boilerplate
start esx_clotheshop
start esx_cruisecontrol
start esx_datastore
start esx_dmvschool
start esx_drugs
start esx_holdup
start esx_identity
start esx_joblisting
start esx_jobs
start esx_license
start esx_lscustom
start esx_mechanicjob
start esx_menu_default
start esx_menu_dialog
start esx_service
start esx_sit
start esx_skin
start esx_society
start esx_status
start esx_taxijob
start esx_vehicleshop
start esx_weaponshop
start instance
start skinchanger
start esx_migrate
start esx_optionalneeds
start esx_property
start esx_police
start esx_addons_gcphone
start esx_advancedgarage
start esx_banking
start esx_carwash
start esx_clothsmenu
start esx_doorlock
start esx_drugs
start esx_duty
start esx_extraitems
start esx_fuel
start esx_voice
start esx_giveid
start esx_giveownedcar
start esx_hide_hud
start esx_hospital
start esx_ids
start esx_jobChat
start esx_mdt
start esx_notify
start esx_point
start esx_progbar
start esx_scoreboard
start esx_stress
start esx_vangelico_robbery
start esx_vehiclelocks
start esx-qalle-jail
start fxmigrant
start coastgaurdheli
start dodge_challenger
start replace_cars
start gmcs
start FigherTruck
start swat_truck
start Towtruck
start Towsilv
start TowWrecker
start EC139
start ambulance2
start emtsupervisor
start patreoncars1
start affinity_loadscreen
start 3dme
start blips
start CarRepair
start CarryPeople
start EasyAdmin
start es_ui
start esplugin_mysql
set es_startingBank “50000”
set es_startingCash “5000”
start essentialmode
start gcphone
start ghmattimysql
start hud
start lesslethal_shotgun
start lux_vehcontrol
start meta_libs
start mysql-async
start PiggyBack
start pingkick
start pNotify
start postalmap
start PvP
start removeAIcops
start SeatShuffle
start simpletp
start watermark
start swaycarhud
start xnAdverts

There is a fair amount of things out of order, a bunch of duplicates that shouldn’t be there as well.

Here is an edited load order for you, let me know how it goes.

### Essential Mode, MySQL & More important resources ###
start mysql-async
start async
start essentialmode
start esplugin_mysql
start es_extended
start esx_scoreboard
start cron
start affinity_loadscreen

### Cash Convars ###
set es_startingCash 5000 ### Starting Hand Cash
set es_startingBank 50000 ### Starting Bank Cash

### ES(X) & Other Resources ###
start es_ui
start es_camera
start esx_menu_default
start esx_menu_dialog
start gcphone
start esx_addons_gcphone
start esx_voice

start pNotify

start esx_addonaccount
start esx_society
start esx_billing
start esx_identity
start esx_vehicleshop
start esx_weaponshop
start esx_license
start esx_dmvschool
start skinchanger
start esx_skin
start esx_jobs
start esx_datastore
start esx_police
start esx_mechanicjob
start esx_ambulancejob
start esx_taxijob
start esx_joblisting
start esx_service

start instance
start esx_property
start esx_advancedgarage
start esx_lscustom
start esx_clotheshop
start esx_barbershop
start esx_boat
start esx_holdup
start esx_drugs
start esx_cruisecontrol
start esx_vehiclelocks

start esx_status
start esx_basicneeds
start esx_optionalneeds

start esx_boilerplate
start esx_sit
start esx_migrate
start esx_duty
start esx_banking
start esx_carwash
start esx_clothsmenu
start esx_doorlock
start esx_extraitems
start esx_fuel
start esx_giveid
start esx_giveownedcar
start esx_hide_hud
start esx_hospital
start esx_ids
start esx_jobChat
start esx_mdt
start esx_notify
start esx_point
start esx_progbar
start esx_stress
start esx_vangelico_robbery
start esx-qalle-jail

start ghmattimysql
start hud
start lesslethal_shotgun
start lux_vehcontrol

start fxmigrant
start coastgaurdheli
start dodge_challenger
start replace_cars
start gmcs
start FigherTruck
start swat_truck
start Towtruck
start Towsilv
start TowWrecker
start EC139
start ambulance2
start emtsupervisor
start patreoncars1
start 3dme
start blips
start CarRepair
start CarryPeople
start EasyAdmin
start meta_libs
start PiggyBack
start pingkick
start postalmap
start PvP
start removeAIcops
start SeatShuffle
start simpletp
start watermark
start swaycarhud
start xnAdverts

That did not work either.

Are you getting any errors in the F8 console or the server console?

Only ones I can see are these,

Wait I am getting a ton of console errors tho heres a pic,

I just noticed you’re not using the spawnmanager resource that comes with FiveM, is there a specific reason for that or did you just leave it out?

Can you check in your DB and see if the skins are being saved in the users table?

I can also fix that ambulance error for you if you post the vehicle_names.lua file.

Ahhhhh, that makes much more sense, have you updated ESX recently to the newest version that drops essentialmode?

Alright I did not know I wasnt using it

And yes they are getting saved

and that would be amazing give me a bit for that

I think I have it should auto do it anyways

Theres the ambo thing you wanted btw

Citizen.InvokeNative(GetHashKey("ADD_TEXT_ENTRY"), key, value)

end

Citizen.CreateThread(function()
– ALS5
AddTextEntry(‘0x73920F8E’, ‘ALS5’)

Replace the contents in the vehicle_names.lua, with this.

function AddTextEntry(key, value)
	Citizen.InvokeNative(GetHashKey("ADD_TEXT_ENTRY"), key, value)
end

Citizen.CreateThread(function()
	--ALS5
	AddTextEntry('0x73920F8E', 'ALS5')
end)

As far as the skins go, are you using the most up to date es_extended as well as the most up to date esx_skin? You could post the esx_skin/server/main.lua and I can take a look at it.

I’m not sure about most up to date since I’m pretty new the server hosting but heres my main.lua for the skin thing

ESX = nil

TriggerEvent(‘esx:getSharedObject’, function(obj) ESX = obj end)

RegisterServerEvent(‘esx_skin:save’)
AddEventHandler(‘esx_skin:save’, function(skin)
local xPlayer = ESX.GetPlayerFromId(source)
MySQL.Async.execute(‘UPDATE users SET skin = @skin WHERE identifier = @identifier’, {
[’@skin’] = json.encode(skin),
[’@identifier’] = xPlayer.identifier
})
end)

RegisterServerEvent(‘esx_skin:responseSaveSkin’)
AddEventHandler(‘esx_skin:responseSaveSkin’, function(skin)

TriggerEvent('es:getPlayerFromId', source, function(user)
	TriggerEvent('es:canGroupTarget', user.getGroup(), "admin", function(available)
		if available then
			local file = io.open('resources/[esx]/esx_skin/skins.txt', "a")

			file:write(json.encode(skin) .. "\n\n")
			file:flush()
			file:close()
		else
			print(('esx_skin: %s attempted saving skin to file'):format(user.getIdentifier()))
		end
	end)
end)

end)

ESX.RegisterServerCallback(‘esx_skin:getPlayerSkin’, function(source, cb)
local xPlayer = ESX.GetPlayerFromId(source)

MySQL.Async.fetchAll('SELECT skin FROM users WHERE identifier = @identifier', {
	['@identifier'] = xPlayer.identifier
}, function(users)
	local user, skin = users[1]

	local jobSkin = {
		skin_male   = xPlayer.job.skin_male,
		skin_female = xPlayer.job.skin_female
	}

	if user.skin then
		skin = json.decode(user.skin)
	end

	cb(skin, jobSkin)
end)

end)

– Commands
TriggerEvent(‘es:addGroupCommand’, ‘skin’, ‘admin’, function(source, args, user)
TriggerClientEvent(‘esx_skin:openSaveableMenu’, source)
end, function(source, args, user)
TriggerClientEvent(‘chat:addMessage’, source, { args = { ‘^1SYSTEM’, ‘Insufficient Permissions.’ } })
end, {help = _U(‘skin’)})

TriggerEvent(‘es:addGroupCommand’, ‘skinsave’, ‘admin’, function(source, args, user)
TriggerClientEvent(‘esx_skin:requestSaveSkin’, source)
end, function(source, args, user)
TriggerClientEvent(‘chat:addMessage’, source, { args = { ‘^1SYSTEM’, ‘Insufficient Permissions.’ } })
end, {help = _U(‘saveskin’)})