-
Notifications
You must be signed in to change notification settings - Fork 0
/
client.lua
152 lines (139 loc) · 4.78 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
---- Developer by git@camargo2019
local is_active
cmr = {}
cmr.notify = function(message)
TriggerEvent("Notify","aviso",message,5000)
end
cmr.fpsbooster = function(shadow,air,entity,dynamic,tracker,depth,bounds,distance,tweak,sirens,lights)
RopeDrawShadowEnabled(shadow)
CascadeShadowsClearShadowSampleType()
CascadeShadowsSetAircraftMode(air)
CascadeShadowsEnableEntityTracker(entity)
CascadeShadowsSetDynamicDepthMode(dynamic)
CascadeShadowsSetEntityTrackerScale(tracker)
CascadeShadowsSetDynamicDepthValue(depth)
CascadeShadowsSetCascadeBoundsScale(bounds)
SetFlashLightFadeDistance(distance)
SetLightsCutoffDistanceTweak(tweak)
DistantCopCarSirens(sirens)
SetArtificialLightsState(lights)
end
cmr.change = function(value)
if value == "normal" then
cmr.fpsbooster(true,true,true,true,5.0,5.0,5.0,10.0,10.0,true,false)
ClearTimecycleModifier()
elseif value == "ruim" then
cmr.fpsbooster(false,false,true,false,0.0,0.0,0.0,0.0,0.0,false,nil)
SetTimecycleModifier("cinema")
elseif value == "fraco" then
cmr.fpsbooster(false,false,true,false,0.0,0.0,0.0,5.0,5.0,false,nil)
SetTimecycleModifier("cinema")
elseif value == "medio" then
cmr.fpsbooster(true,false,true,false,5.0,3.0,3.0,3.0,3.0,false,false)
SetTimecycleModifier("cinema")
end
is_active = value
cmr.notify("Você alterou seu fps para "..is_active)
end
cmr.options = {
["normal"] = cmr.change,
["ruim"] = cmr.change,
["fraco"] = cmr.change,
["medio"] = cmr.change
}
cmr.setOption = function(option)
if cmr.options[option] then
cmr.options[option](option)
else
cmr.notify("Use: /fps [normal/ruim/fraco/medio]")
end
end
RegisterNetEvent('fpsbooster:client:event', function(data)
end)
CreateThread(function()
while true do
if is_active == "ulow" then
DisableOcclusionThisFrame()
SetDisableDecalRenderingThisFrame()
RemoveParticleFxInRange(GetEntityCoords(PlayerPedId()), 10.0)
OverrideLodscaleThisFrame(0.4)
SetArtificialLightsState(true)
ClearAllBrokenGlass()
ClearAllHelpMessages()
LeaderboardsReadClearAll()
ClearBrief()
ClearGpsFlags()
ClearPrints()
ClearSmallPrints()
ClearReplayStats()
LeaderboardsClearCacheData()
ClearFocus()
ClearHdArea()
ClearPedBloodDamage(PlayerPedId())
ClearPedWetness(PlayerPedId())
ClearPedEnvDirt(PlayerPedId())
ResetPedVisibleDamage(PlayerPedId())
ClearExtraTimecycleModifier()
ClearTimecycleModifier()
ClearOverrideWeather()
ClearHdArea()
DisableVehicleDistantlights(false)
DisableScreenblurFade()
SetRainLevel(0.0)
SetWindSpeed(0.0)
elseif is_active == "low" then
SetDisableDecalRenderingThisFrame()
RemoveParticleFxInRange(GetEntityCoords(PlayerPedId()), 10.0)
OverrideLodscaleThisFrame(0.6)
SetArtificialLightsState(true)
ClearAllBrokenGlass()
ClearAllHelpMessages()
LeaderboardsReadClearAll()
ClearBrief()
ClearGpsFlags()
ClearPrints()
ClearSmallPrints()
ClearReplayStats()
LeaderboardsClearCacheData()
ClearFocus()
ClearHdArea()
ClearPedBloodDamage(PlayerPedId())
ClearPedWetness(PlayerPedId())
ClearPedEnvDirt(PlayerPedId())
ResetPedVisibleDamage(PlayerPedId())
ClearExtraTimecycleModifier()
ClearTimecycleModifier()
ClearOverrideWeather()
ClearHdArea()
DisableVehicleDistantlights(false)
DisableScreenblurFade()
SetRainLevel(0.0)
SetWindSpeed(0.0)
elseif is_active == "medio" then
OverrideLodscaleThisFrame(0.8)
ClearAllBrokenGlass()
ClearAllHelpMessages()
LeaderboardsReadClearAll()
ClearBrief()
ClearGpsFlags()
ClearPrints()
ClearSmallPrints()
ClearReplayStats()
LeaderboardsClearCacheData()
ClearFocus()
ClearHdArea()
SetWindSpeed(0.0)
Wait(1000)
else
Wait(500)
end
Wait(500)
end
end)
RegisterCommand("fps", function(_,args)
if args[1] == nil then
cmr.notify("Use: /fps [normal/ruim/fraco/medio]")
return
end
cmr.setOption(args[1])
end, false)