-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclient.lua
65 lines (58 loc) · 2.52 KB
/
client.lua
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
local Replacer = {
["TITLE"] = "FE_THDR_GTAO",
["MAP"] = "PM_SCR_MAP",
["GAME"] = "PM_SCR_GAM",
["LEAVE"] = "PM_PANE_LEAVE",
["QUIT"] = "PM_PANE_QUIT",
["INFO"] = "PM_SCR_INF",
["STATS"] = "PM_SCR_STA",
["SETTINGS"] = "PM_SCR_SET",
["GALLERY"] = "PM_SCR_GAL",
["KEYBIND"] = "PM_PANE_CFX",
["EDITOR"] = "PM_SCR_RPL",
}
local txd = CreateRuntimeTxd('pause_txd')
CreateRuntimeTextureFromImage(txd, tostring(Config.Background), "assets/"..Config.Background..".png")
function AddTextEntry(key, value)
Citizen.InvokeNative(0x32CA01C3, key, value)
end
local ShowLogo = false
CreateThread(function()
for key, value in pairs(Config.Header) do
if Replacer[key] then
AddTextEntry(Replacer[key], value)
end
end
RequestStreamedTextureDict('pause_txd', true)
ReplaceHudColourWithRgba( 116 , Config.RGBA.LINE["RED"] , Config.RGBA.LINE["GREEN"] , Config.RGBA.LINE["BLUE"] , Config.RGBA.LINE["ALPHA"]) --LINE ABOVE EACH OPTION
ReplaceHudColourWithRgba( 117 , Config.RGBA.STYLE["RED"] , Config.RGBA.STYLE["GREEN"] , Config.RGBA.STYLE["BLUE"] , Config.RGBA.STYLE["ALPHA"]) -- BACKGROUND OF EACH OPTION + BLIPS IN THE LIST
ReplaceHudColourWithRgba( 142 , Config.RGBA.WAYPOINT["RED"] , Config.RGBA.WAYPOINT["GREEN"] , Config.RGBA.WAYPOINT["BLUE"] , Config.RGBA.WAYPOINT["ALPHA"]) -- WAYPOINT COLOURS
while not HasStreamedTextureDictLoaded("pause_txd") do
Wait(100)
end
while true do
if IsPauseMenuActive() then
if not ShowLogo then
ShowLogo = true
SendNUIMessage({ display = true })
end
SetScriptGfxDrawBehindPausemenu(true)
DrawSprite("pause_txd", Config.Background, 0.5, 0.5, 1.0, 1.0, 0, 255, 255, 255, Config.Opacity)
PushScaleformMovieFunctionParameterBool(true)
BeginScaleformMovieMethodOnFrontendHeader("SET_HEADING_DETAILS")
PushScaleformMovieFunctionParameterString(Config.Header['SERVER_NAME'])
PushScaleformMovieFunctionParameterString(Config.Header['SERVER_TEXT'])
PushScaleformMovieFunctionParameterString(Config.Header['SERVER_DISCORD'])
ScaleformMovieMethodAddParamBool(false)
EndScaleformMovieMethod()
Wait(3)
else
SetStreamedTextureDictAsNoLongerNeeded('pause_txd')
if ShowLogo then
ShowLogo = false
SendNUIMessage({ display = false })
end
Wait(150)
end
end
end)