-
Notifications
You must be signed in to change notification settings - Fork 0
/
client.lua
60 lines (47 loc) · 1.21 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
local hidehud = false
local black_bars = true
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
end
end)
RegisterCommand("hud", function(source, args, rawCommand) -- Its showing/hiding hud
if (hidehud ~= false) then
hidehud = false
TriggerEvent("vorp:showUi", false)
TriggerEvent("vorp:showHUD")
DisplayHud(false)
else
hidehud = true
TriggerEvent("vorp:showUi", true)
TriggerEvent("vorp:hideHUD")
DisplayHud(true)
end
end, false)
RegisterCommand("cinematic", function(source, args, rawCommand) -- Its cinematic hud
if (hidehud ~= false) then
hidehud = false
TriggerEvent("vorp:showUi", false)
TriggerEvent("vorp_core:showHUD")
DisplayHud(false)
Citizen.InvokeNative(0x69D65E89FFD72313,true)
else
hidehud = true
TriggerEvent("vorp:showUi", true)
TriggerEvent("vorp_core:hideHUD")
DisplayHud(true)
Citizen.InvokeNative(0x69D65E89FFD72313,false)
end
end, false)
RegisterNetEvent('vorp_core:showHUD')
AddEventHandler('vorp_core:showHUD', function()
SendNUIMessage({
showhud = true
})
end)
RegisterNetEvent('vorp_core:hideHUD')
AddEventHandler('vorp_core:hideHUD', function()
SendNUIMessage({
hidehud = true
})
end)