-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathclient_menu.lua
70 lines (63 loc) · 2.46 KB
/
client_menu.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
66
67
68
69
70
local mainMenu = RageUI.CreateMenu("Optimization Menu", "Optimization Menu")
local index_vue_lod, index_ombre = 2, 2
local startOpti = false
AddEventHandler("playerSpawned", function()
Wait(1000)
init()
end)
function init()
distance_vue_lod = GetResourceKvpFloat("view_lod")
distance_shadow = GetResourceKvpFloat("dist_shadow")
if distance_vue_lod == 0.0 then
distance_vue_lod = 1.0
distance_shadow = 0.5
SetResourceKvpFloat("view_lod", distance_vue_lod)
SetResourceKvpFloat("dist_shadow", distance_shadow)
end
startOpti = true
end
Citizen.CreateThread(function()
while (true) do
Citizen.Wait(1)
if startOpti then
RageUI.IsVisible(mainMenu, function()
RageUI.List("Cascade Shadow", {
{ Name = "Without", Value = 0.0 },
{ Name = "Normal", Value = 0.5 },
{ Name = "Complex", Value = 1.0 },
}, index_ombre, "", {}, true, {
onListChange = function(Index, Item)
index_ombre = Index
distance_shadow = Item["Value"]
SetResourceKvpFloat("dist_shadow", distance_shadow)
end
})
RageUI.List("Lod View distance", {
{ Name = "Near", Value = 0.5 },
{ Name = "Normal", Value = 1.0 },
{ Name = "Far", Value = 200.0 },
}, index_vue_lod, "", {}, true, {
onListChange = function(Index, Item)
index_vue_lod = Index
distance_vue_lod = Item["Value"]
SetResourceKvpFloat("view_lod", distance_vue_lod)
end
})
end, function()end)
if RageUI.Visible(mainMenu) then
DisableControlAction(0, 140, true) --> DESACTIVER LA TOUCHE POUR PUNCH
DisableControlAction(0, 172, true) --DESACTIVE CONTROLL HAUT
end
OverrideLodscaleThisFrame(distance_vue_lod)
SetLightsCutoffDistanceTweak(distance_vue_lod)
CascadeShadowsSetCascadeBoundsScale(distance_shadow)
end
end
end)
RegisterCommand('+menuopti', function()
Wait(100)
RageUI.Visible(mainMenu, not RageUI.Visible(mainMenu))
end, false)
RegisterCommand('-menuopti', function()
end, false)
RegisterKeyMapping('+menuopti', 'GTA Optimization', 'keyboard', 'M')