Skip to content

Commit

Permalink
Fixed blackscreen bug!
Browse files Browse the repository at this point in the history
  • Loading branch information
SkapMicke authored Nov 18, 2024
1 parent f2fb43e commit 4e22960
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -170,19 +170,25 @@ end)

-- NUI Callbacks

RegisterNUICallback('closeUI', function(_, cb)
RegisterNUICallback('closeUI', function(data, cb)
local cData = data.cData
DoScreenFadeOut(10)
DoScreenFadeOut(500)
Wait(500)
TriggerServerEvent('qb-multicharacter:server:loadUserData', cData)
openCharMenu(false)
SetEntityAsMissionEntity(charPed, true, true)
DeleteEntity(charPed)
if Config.SkipSelection then
SetNuiFocus(false, false)
skyCam(false)
Wait(1000)
if not IsScreenFadedIn() then
DoScreenFadeIn(1000)
end
else
openCharMenu(false)
end

cb("ok")
end)

Expand Down

0 comments on commit 4e22960

Please sign in to comment.