-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathclient.lua
More file actions
43 lines (31 loc) · 949 Bytes
/
client.lua
File metadata and controls
43 lines (31 loc) · 949 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
-- init vRP server context
Tunnel = module("vrp", "lib/Tunnel")
Proxy = module("vrp", "lib/Proxy")
local cvRP = module("vrp", "client/vRP")
vRP = cvRP()
local pvRP = {}
-- load script in vRP context
pvRP.loadScript = module
Proxy.addInterface("vRP", pvRP)
local cfg = module("vrp_loading", "cfg/loading")
local Loading = class("Loading", vRP.Extension)
function Loading:__construct()
vRP.Extension.__construct(self)
end
function Loading:close()
Citizen.Wait(0)
DoScreenFadeOut(0)
-- Shut down the game's loading screen (this is NOT the NUI loading screen).
ShutdownLoadingScreen()
-- Shut down the NUI loading screen.
ShutdownLoadingScreenNui()
if not cfg.loading then
DoScreenFadeIn(500) -- Fade in smoothly
end
Citizen.Wait(0)
TriggerServerEvent("Multi:open")
end
Loading.event = {}
Loading.tunnel = {}
Loading.tunnel.close = Loading.close
vRP:registerExtension(Loading)