-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclient.lua
More file actions
29 lines (25 loc) · 804 Bytes
/
client.lua
File metadata and controls
29 lines (25 loc) · 804 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
local loadingScreenFinished = false
AddEventHandler('playerSpawned', function()
if not loadingScreenFinished then
loadingScreenFinished = true
ShutdownLoadingScreenNui()
end
end)
-- Citizen.CreateThread(function()
-- local loadingProgress = 0
-- while not loadingScreenFinished do
-- local players = #GetActivePlayers()
-- if players > 0 then
-- loadingProgress = loadingProgress + 1
-- end
-- SendNUIMessage({
-- eventName = 'loadProgress',
-- loadFraction = math.min(loadingProgress / 100, 1.0)
-- })
-- if loadingProgress >= 100 then
-- loadingScreenFinished = true
-- ShutdownLoadingScreenNui()
-- end
-- Citizen.Wait(50)
-- end
-- end)