-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Character spawning inside multicharacter preview rooms #347
Comments
I'm pretty confident this is where the issue lies. A check if the user is "logged in" should probably be performed before getting the users location: https://github.com/Qbox-project/qbx_core/blob/main/server/player.lua#L492 |
I managed to replicate it.
AddEventHandler('populationPedCreating', function(x, y, z)
Wait(500) -- Give the entity some time to be created
local handle = GetClosestPed(vec3(x,y,z)) -- This is an invalid native call, not enough arguments passed
SetPedDropsWeaponsWhenDead(handle, false)
end)
|
can confirm this, i though it was my multichar issue but apparently its not @_@ |
So when selecting a character SetMetaData gets triggert 3 times because of: https://github.com/Qbox-project/qbx_medical/blob/main/server/main.lua#L35 and https://github.com/Qbox-project/qbx_police/blob/main/server/main.lua#L325 qbx_medical wil trigger the Save() function because: https://github.com/Qbox-project/qbx_core/blob/main/server/player.lua#L1004 Here we store the last location: https://github.com/Qbox-project/qbx_core/blob/main/server/player.lua#L1006 After you select a character it will save the multicharacter location 2 times because of Does anyone has this issue with the latest version? |
Summary
Sometimes if you leave your server after you see the character selection screen, once you rejoin and spawn in at last location, itll spawn you inside the room
Reproduction
Expected behavior
Your characters last location shouldnt be saved while in character selection
Actual behavior
It saves
Additional context
Might be something in the multicharacter or just how the last location is saved. Not too sure
Current Version
v1.6.1
Custom Resources
N/A
The text was updated successfully, but these errors were encountered: