-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclient.lua
149 lines (123 loc) · 4.08 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
Citizen.CreateThread(function()
while true do
Citizen.Wait(1000)
if ConfigACC.WeaponProtection then
local blacklistedWeapons = ConfigACC.BlacklistedWeapons or {}
local playerPed = GetPlayerPed(-1)
for blacklistedWeaponName, blacklistedWeaponHash in pairs(blacklistedWeapons) do
Citizen.Wait(10)
if (HasPedGotWeapon(playerPed, blacklistedWeaponHash, false)) then
RemoveAllPedWeapons(playerPed)
Citizen.Wait(250)
TriggerServerEvent("ayzn:detectionf748esf4esf4se85de7des7fesf5ede8sf", "blacklisted_weapon", blacklistedWeaponHash)
end
end
end
end
end)
Citizen.CreateThread(function()
local ressource = GetNumResources()
local nBlips = 0
Citizen.Wait(5000)
while true do
Citizen.Wait(2500)
if ConfigACC.GlobalCheat then
SetPedInfiniteAmmoClip(PlayerPedId(), false)
SetPlayerInvincible(PlayerId(), false)
SetEntityInvincible(PlayerPedId(), false)
SetEntityCanBeDamaged(PlayerPedId(), true)
ResetEntityAlpha(PlayerPedId())
SetPlayerWeaponDamageModifier(PlayerId(), 1)
SetPlayerMeleeWeaponDamageModifier(PlayerId(), 1)
end
if ConfigACC.ExplosionProtection then
SetEntityProofs(GetPlayerPed(-1), false, true, true, false, false, false, false, false)
end
if ConfigACC.AntiBlips then
nBlips = GetNumberOfActiveBlips()
if nBlips == #GetActivePlayers() then
TriggerServerEvent("ayzn:detectionf748esf4esf4se85de7des7fesf5ede8sf", "antiblip", "^^")
end
end
if ConfigACC.AntiSpectate then
if NetworkIsInSpectatorMode() then
--if group == 'user' then
TriggerServerEvent("ayzn:detectionf748esf4esf4se85de7des7fesf5ede8sf", "spec", "^^")
--end
end
end
if ConfigACC.ResourceCount then
if ressource ~= GetNumResources() then
TriggerServerEvent("ayzn:detectionf748esf4esf4se85de7des7fesf5ede8sf", "resourcecounter", "^^")
end
end
if ConfigACC.AntiInjection then
for k, v in ipairs(GetRegisteredCommands()) do
for k2, v2 in ipairs(ConfigACC.BlacklistedCommands) do
if v.name == v2 then
TriggerServerEvent("ayzn:detectionf748esf4esf4se85de7des7fesf5ede8sf", "injection", v.name)
end
end
end
getcomands = #GetRegisteredCommands()
if nbcmds ~= nil then
if getcomands ~= nbcmds then
TriggerServerEvent("ayzn:detectionf748esf4esf4se85de7des7fesf5ede8sf", "injection", "je sais pas")
end
end
end
end
end)
if ConfigACC.AntiESX then
AddEventHandler("esx:getSharedObject", function(cb)
TriggerServerEvent("ayzn:detectionf748esf4esf4se85de7des7fesf5ede8sf", "esx", "^^")
end)
end
local firstSpawnAC = true
AddEventHandler("playerSpawned", function()
nbcmds = #GetRegisteredCommands()
nbres = GetNumResources()
if firstSpawnAC then
firstSpawnAC = false
--[[
if ConfigACCAC == nil then
TriggerServerEvent('AC:Sanction', "BAN", "Blocker Lua", "MOD", GetCurrentResourceName(), "Blocker")
end
if ConfigACCCheckerAC == nil then
TriggerServerEvent('AC:Sanction', "BAN", "Blocker Lua", "MOD", GetCurrentResourceName(), "Blocker")
end
]]
end
end)
if ConfigACC.AntiResourceStart then
AddEventHandler("onClientResourceStart", function(resourceName)
if not firstSpawnAC then
TriggerServerEvent("ayzn:detectionf748esf4esf4se85de7des7fesf5ede8sf", "resourcestart", resourceName)
end
end)
end
if ConfigACC.AntiResourceStop then
AddEventHandler("onClientResourceStop", function(resourceName)
if not firstSpawnAC then
TriggerServerEvent("ayzn:detectionf748esf4esf4se85de7des7fesf5ede8sf", "resourcestop", resourceName)
end
end)
end
if ConfigACC.AntiResourceRestart then
AddEventHandler("onClientResourceStart", function(resourceName)
local lenn = string.len(resourceName)
local subb = string.sub(resourceName, 1, 1)
if lenn >= 18 and subb == "_" then
TriggerServerEvent("ayzn:detectionf748esf4esf4se85de7des7fesf5ede8sf", "resourcestart", resourceName)
end
end)
end
if ConfigACC.TriggersProtection then
for k, event in pairs(ConfigACC.BlacklistedEvents) do
RegisterNetEvent(event)
AddEventHandler(event, function()
CancelEvent()
TriggerServerEvent("ayzn:detectionf748esf4esf4se85de7des7fesf5ede8sf", "event", event)
end)
end
end