Closed AlexR1712 closed 2 years ago
On my server some people trying to connect and have the same problem too. Any solution yet?
Ive found the loading screen has an effect on it, like different ones can cause longer multi character loading. When we didn't have any loading screen some users couldn't join at all.
I think I've fixed this issue on our server by increasing the time at line 59 to 1500ms and by adding another Wait(1500) after line 86 (Using this as reference for lines: https://github.com/qbcore-framework/qb-multicharacter/blob/main/client/main.lua). I used to have the bug happen to me very frequently, but now since those changes it hasn't happened once (hope I didn't jinx it now.)
Well, I jinxed it, lessgo, it didn't fix shit, although I didn't have the bug happen to me for like, the last 20 connects to the server...
I solved the problem on my own using a NUICallback
-- sample code
RegisterNUICallback('fix', function(data, cb)
Wait(0)
if NetworkIsSessionStarted() then
TriggerEvent('qb-multicharacter:client:chooseChar')
return
end
cb(data)
end)
And then on the javascript add the call to the NUI Callback with a delay of 1000 ms, for now is working on all cases. PD: You can improve this code of course.
// sample code
setTimeout(() => {
fetch(`https://${GetParentResourceName()}/fix`, {
method: 'POST',
headers: {
'Content-Type': 'application/json; charset=UTF-8',
},
body: JSON.stringify({})
}).then(resp => resp.json()).then(resp => console.log('Fixed', resp));
}, 1000);
Hey guys, I am having the same issue unfortunately. I have my server up and running. It is a localhost one and I play in it with my roommates. What is weird is that I can load into the server just fine, and so can one of my roommates... BUT for some reason every time my other roommate joins he is brought to the qb-multicharacter menu but it just shows the background image blurry (see screenshot). We have tried letting it load to see if that fixed the issue, but nothing. Does anyone have a solution to this issue? Any and all help is appreciated! Thanks!
Im also facing the same issue, with our server some or players have this issue, i tried a lot of things already but none solved it yet. But some other users never had a issue im not understanding the cause of this if any one can help
I solved the problem on my own using a NUICallback
-- sample code RegisterNUICallback('fix', function(data, cb) Wait(0) if NetworkIsSessionStarted() then TriggerEvent('qb-multicharacter:client:chooseChar') return end cb(data) end)
And then on the javascript add the call to the NUI Callback with a delay of 1000 ms, for now is working on all cases. PD: You can improve this code of course.
// sample code setTimeout(() => { fetch(`https://${GetParentResourceName()}/fix`, { method: 'POST', headers: { 'Content-Type': 'application/json; charset=UTF-8', }, body: JSON.stringify({}) }).then(resp => resp.json()).then(resp => console.log('Fixed', resp)); }, 1000);
in wich place do you put the js code? inside some function or outside?
@tiagofcp I simply added it to the end of the file.
Yeah I'm having the same issue, as far is I can tell the first time connecting is always fine. But after disconnecting once and reconnecting this starts becoming a issue. Sometimes it works, sometimes it won't
this issue become a serious problem for some players
Same issue here. Maybe a screen resolution issue?
any official fix for this yet? My friend is having this problem but I am not and never have. @AlexR1712 Where do you put the two pieces of code? What files and where?
Same issue here. Maybe a screen resolution issue? yes its resoulutin issue but you can fix it by @tiagofcp soulution
but where do I put that code to fix it?
but where do I put that code to fix it?
for the first one add it under CreateThread(function() while true do Wait(0) if NetworkIsSessionStarted() then TriggerEvent('qb-multicharacter:client:chooseChar') return end end end)
in client second one for js add it after all the lines
btd-multicharacter?
we are not using btd-multicharacter. this is QBcore
we are not using btd-multicharacter. this is QBcore
sorry yes its qb-multicharacter
is there an offical fix for this?
Should be fixed now, re-download
@GhzGarage does not work
I go in and out of my server all night long and never once had the issue happen so i have no way to reproduce it or know what causes it. If someone can add some prints to debug it then i can fix it but otherwise i have no idea.
I had this issue on my previous server and found out that the issue was I had a corrupted resource that I had added in. I had to replace it with a similar resource that wasn't corrupted and then it worked fine. Hopefully this helps!
I go in and out of my server all night long and never once had the issue happen so i have no way to reproduce it or know what causes it. If someone can add some prints to debug it then i can fix it but otherwise i have no idea.
in fact it is precisely the problem, it is very difficult to reproduce, in my case it only happened to some people only, And it does not show an error in the console but with what I indicated above it stopped happening practically in all cases with the cost of waiting a few extra seconds
but where do I put that code to fix it?
for the first one add it under CreateThread(function() while true do Wait(0) if NetworkIsSessionStarted() then TriggerEvent('qb-multicharacter:client:chooseChar') return end end end)
in client second one for js add it after all the lines
like this ? https://media.discordapp.net/attachments/945047713249116220/1070332362900119702/asdasd.png
Some users keep reporting me that when they enter the server they get stuck in the screen before loading the list of characters, and in some cases some of them more than others, look at the console of each of them but there is no visible error in F8.
To Reproduce Steps to reproduce the behavior:
Expected behavior Load all characters of the player.
Screenshots
https://user-images.githubusercontent.com/8460736/152469131-34a569f9-1798-45a2-8489-781f71a0af3d.mp4
Questions (please complete the following information):
qb-
to something custom?: NoAs a side note, I have been updating this script and making some style modifications, but personally I have never had this problem, but it is reported a lot, even by people who had just formatted their computer.
Related #70