👾 renzu_multicharacter - Player Multicharacters [ESX/QBCORE]

getting died its not part of multicharacter resource.

oh just seems like once i added this players keep dieing on login

same ,. sometimes you spawn in dead (qbcore) using renzu multi and renzu spawn
i never added the local playerdead to qbabmulancejob , is that maybe why?

also i still get a face error even with up to date qb-clothing

yes :smiling_face_with_tear:

i wonder hows the sometimes can happen?

in ESX we never experience this issue.

this could be incompatibility with some qbcore death system logic.
and probably not in this resource, it could be the spawn resource.
unless player will died instantly when selecting characters.
renzu_spawn is the one handling the spawn logic if you are using it.

and does the player dies in falling? or if its sudden death its weird.

was looking at the renzu spawn code , im testing adding this: (not sure if right but testing)
SetEntityHealth(ped, 200) --testing
TriggerServerEvent(“hospital:server:SetDeathStatus”, false)–testing
TriggerServerEvent(“hospital:server:SetLaststandStatus”, false)–testing

	SendNUIMessage({close = true})
	local ped = PlayerPedId()

	SetEntityHealth(ped, 200) --testing
	TriggerServerEvent("hospital:server:SetDeathStatus", false)--testing
    TriggerServerEvent("hospital:server:SetLaststandStatus", false)--testing
	FreezeEntityPosition(ped, true)
	SetCamParams(cam, coord.x, coord.y, coord.z+4.2, -85.00, 0.00, 0.00, 50.00, 2000, 0, 0, 2)
	local coord = vec4(coord.x, coord.y, coord.z, coord.w)
	SetCamParams(cam, coord.x+0.5, coord.y-7, coord.z, 0.00, 0.00, 0.00, 20.00, 1000, 0, 0, 2)
	RenderScriptCams(false, true, 3000, true, true)
	while not HasCollisionLoadedAroundEntity(ped) do Wait(1) end
	FreezeEntityPosition(ped, false)
	if DoesCamExist(cam) then
		SetCamActive(cam, false)

basically when you the pick character and spawn your dead on the floor. I would say it happens 50% of the time. likely related to qb-abmulance Deathstatus maybe not setting when players quit (even if alive)

I think this would be with the Spawn, when spawning the reason for death is suicide / falling related.

confirm your death logs if you able to. if the player dies on falling
does qbcore saved Z coord value correct? i assume yes., but its weird if its falling since its getting its last position.

from here

local result = MySQL.query.await('SELECT * FROM players WHERE license = ?', {license})
		if result and #result > 0 then
			for i = 1, (#result), 1 do
				local skin = MySQL.query.await('SELECT * FROM playerskins WHERE citizenid = ? AND active = ?', { result[i].citizenid, 1 })
				local info = json.decode(result[i].charinfo)
				local money = json.decode(result[i].money)
				local job = json.decode(result[i].job)
				local firstname = info.firstname or 'No name'
				local lastname = info.lastname or 'No Lastname'
				characters[result[i].cid] = {
					slot = result[i].cid,
					name = firstname..' '..lastname,
					job = job.label or 'Unemployed',
					grade = job.grade.name or 'gago',
					dateofbirth = info.birthdate or '',
					bank = money.bank,
					money = money.cash,
					citizenid = result[i].citizenid,
					identifier = result[i].citizenid,
					skin = skin and skin[1] and json.decode(skin[1].skin) or {},
					sex = info.gender == 0 and 'm' or 'f',
					position = result[i].position and result[i].position ~= '' and json.decode(result[i].position) or vec3(280.03,-584.29,43.29),
					extras = GetExtras(result[i].citizenid)

the position origin is from players table in DB.
so i doubt the issue is from falling unless there is some weird logic in qbcore that saves the Z position with additional value like eg +2.0 or + 7.0

some other i can think about if your player use /relog when in die state.
that could conflict with your death system. for eg. anti combat log death system.

make sure to modify this

RegisterCommand('relog', function(source, args, rawCommand)
	if Config.Relog and not LocalPlayer.state.isdead then
		logout = true

with the proper check of dead state to disable relog.

It’s hit or miss, happens in my server too. Some times it happens some times it doesn’t lol. It’s random and I can not explain it any further. No errors or anything of the sort. It’s really weird. Never happened with qb-multicharcters,

hasnt happened since i added in that snippet above.

Does that go in qb-ambulance or the multicharacter?

into renzu-spawn / client lua

1 Like

glad you solve your problem, but this will make dead people become alive again?
im not sure if qbcore return death status when login. if yes this could be abuse by your player.

it makes them spawn alive regardless , maybe only abused if they log off dead and log back on alive. but its fixed the problem unless someone finds a better solution.

1 Like

Well, update, just got a report last night that someone spawned in dead again.
even with my edit. theyre words were " i spawned in dead again but had full health "
So i guess my edit wasnt a complete fix. :frowning:
@renzu plz send help lol

So I thought I fixed it already by updating qb-ambulancejob as most of the people said it might be because of that, but a new player has joined my server, even before creating a character he’s dead. :frowning:

P.S. I tried turning of the renzu_spawn and it seems to have fixed it. might be issues with ambulance job and spawn but. not sure :frowning:

yeahs its def spawn , i been getting alot of death reports still

Arent the old characters availlable? My old char isnt shown at first start

Edit. just found it :wink:

But did you ever had the problem, taht the char at first spawn sinks into the floor?

i installed your multicharacter and get on char creation this error

 [      script:oxmysql] SCRIPT ERROR in promise (unhandled rejection): Error: es_extended was unable to execute a query!
[      script:oxmysql] Data too long for column 'identifier' at row 1
[      script:oxmysql] INSERT INTO `users` SET `accounts` = ?, `identifier` = ?, `group` = ?, `firstname` = ?, `lastname` = ?, `dateofbirth` = ?, `sex` = ?, `height` = ? ["{\"money\":4000,\"bank\":2000}","char1:c2d47d142bb0e0620c7390cad07166e42b5b6197","user","Matz","Kofert","03/27/1999","m","150"]
[      script:oxmysql] > <unknown> (@oxmysql/dist/build.js:22275)
[      script:oxmysql] > processTicksAndRejections (node:internal/process/task_queues:96)
[      script:oxmysql]

and on client disconnect this error

[script:renzu_multich] SCRIPT ERROR: @renzu_multicharacter/server/framework/main.lua:116: attempt to concatenate a nil value
[script:renzu_multich] > LoadPlayer (@renzu_multicharacter/server/framework/main.lua:116)
[script:renzu_multich] > Login (@renzu_multicharacter/server/framework/main.lua:125)
[script:renzu_multich] > handler (@renzu_multicharacter/server/main.lua:59)