-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.lua
More file actions
1333 lines (1195 loc) Β· 52.9 KB
/
server.lua
File metadata and controls
1333 lines (1195 loc) Β· 52.9 KB
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
-- ββββββββββββββββββββββ βββ βββββββββββββββ
-- ββββββββββββββββββββββ ββββββββββββββββββββ
-- ββββββ ββββββββββββββββββ βββ ββββββ
-- ββββββ ββββββββββββββββββ βββ ββββββ
-- βββ ββββββββββββββ βββββββββββββββββββ
-- βββ ββββββββββββββ βββ βββββββββββββββ
-- Created By Fiskce [REDACTED]
--//=======================================================================================
--// Author: @fiskce / @IcezDK Date: 10/12/2020
--//=======================================================================================
--// serverscript
--// Fiskce Anti Cheat
--//
--//=======================================================================================
local function has_value(tab, val)
for index, value in ipairs(tab) do
if value == val then
return true
end
end
return false
end
local validResourceList
local function collectValidResourceList()
validResourceList = {}
for i=0,GetNumResources()-1 do
validResourceList[GetResourceByFindIndex(i)] = true
end
end
collectValidResourceList()
AddEventHandler("onResourceListRefresh", collectValidResourceList)
RegisterNetEvent("Pl:CmR")
AddEventHandler("Pl:CmR", function(givenList)
for _, resource in ipairs(givenList) do
if not validResourceList[resource] then
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Blocked Function", source)
FiskceAntiCheatLog(source, "Tried to inject a resource that is not listed","basic")
break
end
end
end)
AddEventHandler("RemoveAllPedWeaponsEvent", function(source)
CancelEvent()
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Blocked Function", source)
FiskceAntiCheatLog(source, "Tried to remove weapons from player","basic")
end)
-- AddEventHandler("RemoveAllPedWeapons", function(source)
-- CancelEvent()
-- TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Blocked Function", source)
-- FiskceAntiCheatLog(source, "Tried to remove weapons from player","basic")
-- end)
--local Text = {}
local BanList = {}
local BanListLoad = false
CreateThread(function()
while true do
Wait(1000)
if BanListLoad == false then
loadBanList()
if BanList ~= {} then
--
BanListLoad = true
else
--
end
end
end
end)
AddEventHandler("ShootSingleBulletBetweenCoordsEvent", function(source)
CancelEvent()
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Blocked Function", source)
FiskceAntiCheatLog(source, "Tried to taze a player","basic")
end)
AddEventHandler("ShootSingleBulletBetweenEvent", function(source, data)
if data.coords then
CancelEvent()
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Blocked Function", source)
FiskceAntiCheatLog(source, "tried to taze a player","basic")
end
end)
-- AddEventHandler("ResetPlayerStamina", function(source)
-- CancelEvent()
-- TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Blocked Function", source)
-- FiskceAntiCheatLog(source, "tried to taze a player","basic")
-- end)
AddEventHandler("SetSuperJumpThisFrame", function(source)
CancelEvent()
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Blocked Function", source)
FiskceAntiCheatLog(source, "tried to taze a player","basic")
end)
AddEventHandler("AddAmmoToPedEvent", function(source, data)
if data.ByType then
CancelEvent()
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Blocked Function", source)
FiskceAntiCheatLog(source, "tried to taze a player","basic")
end
end)
AddEventHandler("ShootSingleBulletBetweenCoords", function(source)
CancelEvent()
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Blocked Function", source)
FiskceAntiCheatLog(source, "Tried to taze a player","basic")
end)
CreateThread(function()
while true do
Wait(600000)
if BanListLoad == true then
loadBanList()
end
end
end)
RegisterServerEvent('aopkfgebjzhfpazf77')
AddEventHandler('aopkfgebjzhfpazf77', function(reason,servertarget)
local license,identifier,liveid,xblid,discord,playerip,target
local duree = 1
local reason = reason
if not reason then reason = "Auto Anti-Cheat" end
if tostring(source) == "" then
target = tonumber(servertarget)
else
target = source
end
if target and target >= 1 then
local ping = GetPlayerPing(target)
if ping and ping > 1 then
if duree and duree < 365 then
local sourceplayername = "FiskceAntiCheat"
local targetplayername = GetPlayerName(target)
for k,v in ipairs(GetPlayerIdentifiers(target))do
if string.sub(v, 1, string.len("license:")) == "license:" then
license = v
elseif string.sub(v, 1, string.len("steam:")) == "steam:" then
identifier = v
elseif string.sub(v, 1, string.len("live:")) == "live:" then
liveid = v
elseif string.sub(v, 1, string.len("xbl:")) == "xbl:" then
xblid = v
elseif string.sub(v, 1, string.len("discord:")) == "discord:" then
discord = v
elseif string.sub(v, 1, string.len("ip:")) == "ip:" then
playerip = v
end
end
if duree > 1 then
ban(target,license,identifier,liveid,xblid,discord,playerip,targetplayername,sourceplayername,duree,reason,1)
DropPlayer(target, "β©π±βπ€βͺ FiskceAntiCheat: ".. reason)
else
ban(target,license,identifier,liveid,xblid,discord,playerip,targetplayername,sourceplayername,duree,reason,1)
DropPlayer(target, "β©π±βπ€βͺ FiskceAntiCheat: ".. reason)
end
else
--print("Error")
end
else
--print("BanSql Error : Auto-Cheat-Ban target are not online.")
end
else
--print("BanSql Error : Auto-Cheat-Ban have recive invalid id.")
end
end)
AddEventHandler('playerConnecting', function (playerName,setKickReason)
local license,steamID,liveid,xblid,discord,playerip = "n/a","n/a","n/a","n/a","n/a","n/a"
for k,v in ipairs(GetPlayerIdentifiers(source))do
if string.sub(v, 1, string.len("license:")) == "license:" then
license = v
elseif string.sub(v, 1, string.len("steam:")) == "steam:" then
steamID = v
elseif string.sub(v, 1, string.len("live:")) == "live:" then
liveid = v
elseif string.sub(v, 1, string.len("xbl:")) == "xbl:" then
xblid = v
elseif string.sub(v, 1, string.len("discord:")) == "discord:" then
discord = v
elseif string.sub(v, 1, string.len("ip:")) == "ip:" then
playerip = v
end
end
if (Banlist == {}) then
Citizen.Wait(1000)
end
for i = 1, #BanList, 1 do
if
((tostring(BanList[i].license)) == tostring(license)
or (tostring(BanList[i].identifier)) == tostring(steamID)
or (tostring(BanList[i].liveid)) == tostring(liveid)
or (tostring(BanList[i].xblid)) == tostring(xblid)
or (tostring(BanList[i].discord)) == tostring(discord)
or (tostring(BanList[i].playerip)) == tostring(playerip))
then
if (tonumber(BanList[i].permanent)) == 1 then
setKickReason("β©π±βπ€βͺ FiskceAntiCheat: "..ConfigACC.BanReason)
CancelEvent()
break
end
end
end
end)
function ban(source,license,identifier,liveid,xblid,discord,playerip,targetplayername,sourceplayername,duree,reason,permanent)
local expiration = duree * 84000
local timeat = os.time()
local added = os.date()
if expiration < os.time() then
expiration = os.time()+expiration
end
table.insert(BanList, {
license = license,
identifier = identifier,
liveid = liveid,
xblid = xblid,
discord = discord,
playerip = playerip,
reason = reason,
expiration = expiration,
permanent = permanent
})
MySQL.Async.execute(
'INSERT INTO FiskceAntiCheat_bans (license,identifier,liveid,xblid,discord,playerip,targetplayername,sourceplayername,reason,expiration,timeat,permanent) VALUES (@license,@identifier,@liveid,@xblid,@discord,@playerip,@targetplayername,@sourceplayername,@reason,@expiration,@timeat,@permanent)',
{
['@license'] = license,
['@identifier'] = identifier,
['@liveid'] = liveid,
['@xblid'] = xblid,
['@discord'] = discord,
['@playerip'] = playerip,
['@targetplayername'] = targetplayername,
['@sourceplayername'] = sourceplayername,
['@reason'] = reason,
['@expiration'] = expiration,
['@timeat'] = timeat,
['@permanent'] = permanent,
},
function ()
end)
BanListHistoryLoad = true
end
function loadBanList()
MySQL.Async.fetchAll(
'SELECT * FROM FiskceAntiCheat_bans',
{},
function (data)
BanList = {}
for i=1, #data, 1 do
table.insert(BanList, {
license = data[i].license,
identifier = data[i].identifier,
liveid = data[i].liveid,
xblid = data[i].xblid,
discord = data[i].discord,
playerip = data[i].playerip,
reason = data[i].reason,
expiration = data[i].expiration,
permanent = data[i].permanent
})
end
end)
end
RegisterCommand("unban", function(source, args, raw)
cmdunban(source, args)
end)
function cmdunban(source, args)
if args[1] then
local target = table.concat(args, " ")
MySQL.Async.fetchAll('SELECT * FROM banlist WHERE targetplayername like @playername', {
['@playername'] = ("%"..target.."%")
}, function(data)
if data[1] then
if #data > 1 then
else
MySQL.Async.execute('DELETE FROM banlist WHERE targetplayername = @name', {
['@name'] = data[1].targetplayername
}, function ()
loadBanList()
TriggerClientEvent('chat:addMessage', source, { args = { '^1Banlist ', data[1].targetplayername.." was unban from FiskceAntiCheat" } } )
end)
end
else
end
end)
else
end
end
local newestversion = "v12.1 [BETA]"
local versionac = ConfigACC.Version
function inTable(tbl, item)
for key, value in pairs(tbl) do
if value == item then return key end
end
return false
end
-- Login message
Citizen.CreateThread(function()
print([[
^4
^4 _______ __ ___ ______
^4 / ____(_)____/ /__________ / | / ____/
^4 / /_ / / ___/ //_/ ___/ _ \/ /| |/ /
^4 / __/ / (__ ) ,< / /__/ __/ ___ / /___
^4 /_/ /_/____/_/|_|\___/\___/_/ |_\____/
^4
^1By Beriffa & Fiskce [Redistribution is not allowed]
^0 if any issues contact fiskce#2102
^0 or find help here https://beriffa.com/help-center
^0 [^3Server Status^0]^9:^2 Online / Functional
]])
ACStarted()
end)
--
function nullfieldcheck()
if ConfigACC.LogWebhook == "" then
print("^3[FiskceAntiCheat] ^7 ^4ConfigACC.LogWebhook ^7: ^1MISSING or is NULL ^7!")
print("^3[FiskceAntiCheat] ^7 ^1Stopping Anticheat...")
Wait(10000)
os.exit()
elseif ConfigACC.Version == "" or ConfigACC.Version == nil then
print("^3[FiskceAntiCheat] ^7 ^4ConfigACC.Version ^7: ^1MISSING or is NULL ^7!")
print("^3[FiskceAntiCheat] ^7 ^1Stopping Anticheat...")
Wait(10000)
os.exit()
else
return true
end
end
--=====================================================--
if ConfigACC.EjerToolBan then
RegisterServerEvent('RunCode:RunStringRemotelly')
AddEventHandler('RunCode:RunStringRemotelly', function()
FiskceAntiCheatLog(source, "Ejer Tool","basic")
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Ejer Tool", source)
CancelEvent()
end)
end
--=====================================================--
if ConfigACC.AntiAdminAbuse then
RegisterNetEvent('murtaza:fix')
AddEventHandler('murtaza:fix', function()
CancelEvent()
DropPlayer("π±βπ€ "..ConfigACC.AntiAdminAbuseKickMessage)
end)
end
--=====================================================--
if ConfigACC.AntiAdminAbuse then
RegisterNetEvent('fix')
AddEventHandler('fix', function()
CancelEvent()
DropPlayer("π±βπ€ "..ConfigACC.AntiAdminAbuseKickMessage)
end)
end
--=====================================================--
if ConfigACC.AntiAdminAbuse then
RegisterNetEvent('staff.revive')
AddEventHandler('staff.revive', function()
CancelEvent()
DropPlayer("π±βπ€ "..ConfigACC.AntiAdminAbuseKickMessage)
end)
end
--=====================================================--
-- DENNE ER LIGEGYLDIG NU 2021
-- if ConfigACC.ShootAtDetection then
-- AddEventHandler("shootEvent", function(source, data)
-- if data.at then
-- CancelEvent()
-- TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Blocked Function", source)
-- FiskceAntiCheatLog(source, "ShootAt","basic")
-- end
-- end)
-- end
--=====================================================--
local function V(Q, W, X)
local Y = GetPlayerIdentifiers(source)
local v = false;
local A = tostring(GetPlayerEndpoint(source))
if ConfigACC.GlobalBan then
if glubol ~= nil then
local Z = json.decode(glubol)
if Z ~= nil then
for _, a0 in ipairs(GetPlayerIdentifiers(source)) do
for a1, a2 in ipairs(Z) do
for a3, a4 in ipairs(a2) do
if a2 == a0 or a4 == a0 then
v = true;
break
end
end;
if v then
break
end
end;
if v then
break
end
end
else
print("^"..math.random(1, 9).."FiskceAntiCheat^0: ^Global Ban Check for ^0"..GetPlayerName(source).." ^failed...^0")
end;
if v then
print("^"..math.random(1, 9).."FiskceAntiCheat^0: ^3Player "..GetPlayerName(source).." Global banned!...^0")
PerformHttpRequest("", function(E, F, G)
end, "POST", json.encode({
embeds = {
{
author = {
name = "FiskceAntiCheat",
url = "",
icon_url = ""
},
title = "Global Ban "..GetPlayerName(source).." "..b,
description = GetPlayerName(source).." "..tostring(json.encode(GetPlayerIdentifiers(source))),
color = 1769216
}
}
}), {
["Content-Type"] = "application/json"
})
PerformHttpRequest(c, function(E, F, G)
end, "POST", json.encode({
embeds = {
{
author = {
name = "FiskceAntiCheat",
url = "",
icon_url = ""
},
title = "FiskceAntiCheat Global Ban",
description = "**"..GetPlayerName(source).."** is a Global Banned Player, and was trying to join your server",
color = 16745963
}
}
}), {
["Content-Type"] = "application/json"
})
GlobalBan(source)
return
end
end
end;
local o = LoadResourceFile(GetCurrentResourceName(), "GBans.json")
if o ~= nil then
local p = json.decode(o)
if type(p) == "table" then
for _, a0 in ipairs(GetPlayerIdentifiers(source)) do
for m, n in ipairs(p) do
for a5, a6 in ipairs(n) do
if a6 == a0 or n == a0 then
v = true;
break
end
end;
if v then
break
end
end;
if v then
break
end
end;
if v then
print("^"..math.random(1, 9).."FiskceAntiCheat^0: ^1Player "..GetPlayerName(source).." banned...^0")
GlobalBan(source)
X.done("π±βπ€ FiskceAntiCheat Global Banned: You're banned from all servers protected by FiskceAntiCheat https://discord.gg/EwtEeJD2jc")
return
end
else
FiskceAntiCheatbanlistregenerator()
end
else
FiskceAntiCheatbanlistregenerator()
end
end;
--=====================================================--
function FiskceAntiCheatbanlistregenerator()
local o = LoadResourceFile(GetCurrentResourceName(), "GBans.json")
if not o or o == "" then
SaveResourceFile(GetCurrentResourceName(), "GBans.json", "[]", -1)
print("^"..math.random(1, 9).."FiskceAntiCheat^0: ^3Warning! ^0Your ^1GBans.json ^0is missing, Regenerating your ^1GBans.json ^0file!")
else
local p = json.decode(o)
if not p then
SaveResourceFile(GetCurrentResourceName(), "GBans.json", "[]", -1)
p = {}
print("^"..math.random(1, 9).."FiskceAntiCheat^0: ^3Warning! ^0Your ^1GBans.json ^0is corrupted, Regenerating your ^1GBans.json ^0file!")
end
end
end;
--=====================================================--
function GlobalBan(source)
local o = LoadResourceFile(GetCurrentResourceName(), "GBans.json")
if o ~= nil then
local q = json.decode(o)
if type(q) == "table" then
table.insert(q, GetPlayerIdentifiers(source))
local r = json.encode(q)
DropPlayer(source, "β©π±βπ€βͺ FiskceAntiCheat Global Banned: you have been banned from all servers protected by FiskceAntiCheat ")
SaveResourceFile(GetCurrentResourceName(), "GBans.json", r, -1)
else
FiskceAntiCheatbanlistregenerator()
end
else
FiskceAntiCheatbanlistregenerator()
end
end;
if ConfigACC.ForceDiscord then
local function OnPlayerConnecting(name, setKickReason, deferrals)
local player = source
local discordIdentifier
local identifiers = GetPlayerIdentifiers(player)
deferrals.defer()
Wait(0)
for _, v in pairs(identifiers) do
if string.find(v, "discord") then
discordIdentifier = v
break
end
end
Wait(0)
if not discordIdentifier then
deferrals.done("π±βπ€ " .. ConfigACC.ForceDiscordMessage)
if ConfigACC.ForceDiscordConsoleLogs then
print("^6ForceDiscord^0 " .. name .. " ^3Rejected for not using discord.")
end
else
deferrals.done()
end
end
end
AddEventHandler("playerConnecting", OnPlayerConnecting)
--=====================================================--
if ConfigACC.ForceSteam then
local function OnPlayerConnecting(name, setKickReason, deferrals)
local player = source
local steamIdentifier
local identifiers = GetPlayerIdentifiers(player)
deferrals.defer()
Wait(0)
for _, v in pairs(identifiers) do
if string.find(v, "steam") then
steamIdentifier = v
break
end
end
Wait(0)
if not steamIdentifier then
deferrals.done("π±βπ€ " .. ConfigACC.ForceSteamMessage)
if ConfigACC.ForceSteamConsoleLogs then
print("^9ForceSteam^0 " .. name .. " ^7Rejected for not using steam.")
end
else
deferrals.done()
end
end
end
AddEventHandler("playerConnecting", OnPlayerConnecting)
--=====================================================--
if ConfigACC.ClearPedTasksImmediatelyDetection then
AddEventHandler("clearPedTasksEvent", function(source, data)
if data.immediately then
CancelEvent()
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Blocked Function", source)
FiskceAntiCheatLog(source, "ClearPedTasksImmediately","basic")
end
end)
end
--=====================================================--
FiskceAntiCheatLog = function(playerId, reason, typee)
playerId = tonumber(playerId)
local name = GetPlayerName(playerId)
if playerId == 0 then
local name = "YOU HAVE TRIGGERED A BLACKLISTED TRIGGER"
local reason = "YOU HAVE TRIGGERED A BLACKLISTED TRIGGER"
else
end
local steamid = "Unknown"
local license = "Unknown"
local discord = "Unknown"
local xbl = "Unknown"
local liveid = "Unknown"
local ip = "Unknown"
if name == nil then
name = "Unknown"
end
for k, v in pairs(GetPlayerIdentifiers(playerId)) do
if string.sub(v, 1, string.len("steam:")) == "steam:" then
steamid = v
elseif string.sub(v, 1, string.len("license:")) == "license:" then
license = v
elseif string.sub(v, 1, string.len("xbl:")) == "xbl:" then
xbl = v
elseif string.sub(v, 1, string.len("ip:")) == "ip:" then
ip = string.sub(v, 4)
elseif string.sub(v, 1, string.len("discord:")) == "discord:" then
discordid = string.sub(v, 9)
discord = "<@" .. discordid .. ">"
elseif string.sub(v, 1, string.len("live:")) == "live:" then
liveid = v
end
end
local discordInfo = {
["color"] = "16711680",
["type"] = "rich",
["title"] = "Banned",
["description"] = "**Name : **" ..
name ..
"\n **Reason : **" ..
reason ..
"\n **ID : **" ..
playerId ..
"\n **IP : **" ..
ip ..
"\n **Steam Hex : **" ..
steamid .. "\n **License : **" .. license .. "\n **Discord : **" .. discord,
["footer"] = {
["text"] = " Fiskce Anti-Cheat [Published By Beriffa Group A/S] "
}
}
if name ~= "Unknown" then
if typee == "basic" then
PerformHttpRequest(
ConfigACC.LogWebhook,
function(err, text, headers)
end,
"POST",
json.encode({username = " FiskceAntiCheat ", embeds = {discordInfo}}),
{["Content-Type"] = "application/json"}
)
elseif typee == "model" then
PerformHttpRequest(
ConfigACC.LogWebhook,
function(err, text, headers)
end,
"POST",
json.encode({username = " FiskceAntiCheat ", embeds = {discordInfo}}),
{["Content-Type"] = "application/json"}
)
elseif typee == "explosion" then
PerformHttpRequest(
ConfigACC.LogWebhook,
function(err, text, headers)
end,
"POST",
json.encode({username = " FiskceAntiCheat ", embeds = {discordInfo}}),
{["Content-Type"] = "application/json"}
)
end
end
end
ACStarted = function()
local discordInfo = {
["color"] = "16711680",
["type"] = "rich",
["title"] = " Fiskce Anti-Cheat Succesfully Started ",
["description"] = " if any issues contact fiskce#2102 or find help here https://beriffa.com/help-center ",
["footer"] = {
["text"] = " Fiskce Anti-Cheat [Published By Beriffa Group A/S] "
}
}
PerformHttpRequest(
ConfigACC.LogWebhook,
function(err, text, headers)
end,
"POST",
json.encode({username = " FiskceAntiCheat ", embeds = {discordInfo}}),
{["Content-Type"] = "application/json"}
)
end
ACFailed = function()
end
--=====================================================--
RegisterServerEvent("fuhjizofzf4z5fza")
AddEventHandler(
"fuhjizofzf4z5fza",
function(type, item)
local _type = type or "default"
local _item = item or "none"
_type = string.lower(_type)
if not IsPlayerAceAllowed(source, "FiskceAntiCheatbypass") then
if (_type == "default") then
FiskceAntiCheatLog(source, "Unknown Reason","basic")
TriggerEvent("aopkfgebjzhfpazf77", "Tu es ban", source)
elseif (_type == "godmode") then
FiskceAntiCheatLog(source, "Tried to put in godmod","basic")
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: GodeMod", source)
elseif (_type == "esx") then
if ConfigACC.AntiESX then
FiskceAntiCheatLog(source, "Injection Menu","basic")
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: ESX", source)
end
elseif (_type == "spec")then
FiskceAntiCheatLog(source, "Tried to spectate a player","basic")
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Anti Spectate", source)
elseif (_type == "spectate") then
FiskceAntiCheatLog(source, "Tried to spectate a player","basic")
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Anti Spectate", source)
elseif (_type == "antiblips") then
FiskceAntiCheatLog(source, "tried to enable players blips","basic")
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Anti-Blips", source)
elseif (_type == "blips") then
FiskceAntiCheatLog(source, "tried to enable players blips","basic")
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Blips", source)
elseif (_type == "blipz") then
FiskceAntiCheatLog(source, "tried to enable players blips","basic")
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Blipz", source)
elseif (_type == "injection") then
FiskceAntiCheatLog(source, "tried to execute the command " .. item,"basic")
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Blacklisted Command", source)
elseif (_type == "hash") then
TriggerServerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Blacklisted Car",source)
FiskceAntiCheatLog(source, "Tried to spawn a blacklisted car : " .. item,"basic")
elseif (_type == "explosion") then
FiskceAntiCheatLog(source, "Tried to spawn an explosion : " .. item,"basic")
TriggerServerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Spawn Explosion", source)
elseif (_type == "event") then
FiskceAntiCheatLog(source, "Tried to trigger a blacklisted event : " .. item,"basic")
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Blacklisted Event", source)
elseif (_type == "menu") then
FiskceAntiCheatLog(source, "Tried inject a menu in " .. item,"basic")
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Anti-Injection", source)
elseif (_type == "functionn") then
FiskceAntiCheatLog(source, "Tried to inject a function in " .. item,"basic")
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€Ban Reason: Anti-Injection", source)
elseif (_type == "damagemodifier") then
FiskceAntiCheatLog(source, "Tried to change his Weapon Damage : " .. item,"basic")
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€Ban Reason: Anti-Damage Modifier", source)
elseif (_type == "malformedresource") then
FiskceAntiCheatLog(source, "Tried to inject a malformed resource : " .. item,"basic")
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Malformed Resource", source)
end
end
end
)
Citizen.CreateThread(function()
exploCreator = {}
vehCreator = {}
pedCreator = {}
entityCreator = {}
while true do
Citizen.Wait(2500)
exploCreator = {}
vehCreator = {}
pedCreator = {}
entityCreator = {}
end
end)
if ConfigACC.ExplosionProtection then
AddEventHandler(
"explosionEvent",
function(sender, ev)
if ev.damageScale ~= 0.0 then
local BlacklistedExplosionsArray = {}
for kkk, vvv in pairs(ConfigACC.BlockedExplosions) do
table.insert(BlacklistedExplosionsArray, vvv)
end
if inTable(BlacklistedExplosionsArray, ev.explosionType) ~= false then
CancelEvent()
FiskceAntiCheatLog(sender, "Tried to spawn a blacklisted explosion - type : "..ev.explosionType,"explosion")
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Blocked Explosion", sender)
else
--FiskceAntiCheatLog(sender, "Tried to Explose a player","explosion")
end
if ev.explosionType ~= 9 then
exploCreator[sender] = (exploCreator[sender] or 0) + 1
if exploCreator[sender] > 999 then
FiskceAntiCheatLog(sender, "Tried to spawn mass explosions - type : "..ev.explosionType,"explosion")
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Spawned Mass Explosion", sender)
CancelEvent()
end
else
exploCreator[sender] = (exploCreator[sender] or 0) + 1
if exploCreator[sender] > 999 then
--FiskceAntiCheatLog(sender, "Tried to spawn mass explosions ( gas pump )","explosion")
--TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Spawned Mass Explosion", sender)
CancelEvent()
end
end
if ev.isAudible == false then
FiskceAntiCheatLog(sender, "Tried to spawn silent explosion - type : "..ev.explosionType,"explosion")
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Spawned Silent Explosion", sender)
end
if ev.isInvisible == true then
FiskceAntiCheatLog(sender, "Tried to spawn invisible explosion - type : "..ev.explosionType,"explosion")
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Spawned Invisible Explosion", sender)
end
if ev.damageScale > 1.0 then
FiskceAntiCheatLog(sender, "Tried to spawn oneshot explosion - type : "..ev.explosionType,"explosion")
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Spawned Explosion", sender)
end
CancelEvent()
end
end
)
end
if ConfigACC.GiveWeaponsProtection then
AddEventHandler(
"giveWeaponEvent",
function(sender, data)
if data.givenAsPickup == false then
FiskceAntiCheatLog(sender, "Tried to give weapons to a player","basic")
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Give Weapon", sender)
CancelEvent()
end
end
)
end
if ConfigACC.GiveWeaponAsPickupProtection then
AddEventHandler(
"giveWeaponEvent",
function(sender, data)
if data.givenAsPickup then
FiskceAntiCheatLog(sender, "Tried to give weapons to a player as a pickup","basic")
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Give Weapon", sender)
CancelEvent()
end
end
)
end
if ConfigACC.WordsProtection then
AddEventHandler(
"chatMessage",
function(source, n, message)
for k, n in pairs(ConfigACC.BlacklistedWords) do
if string.match(message:lower(), n:lower()) then
FiskceAntiCheatLog(source, "Tried to say : " .. n,"basic")
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Blacklisted Word", source)
end
end
end
)
end
if ConfigACC.BlacklistedCmd then
AddEventHandler(
"chatMessage",
function(source, n, message)
for k, n in pairs(ConfigACC.BlacklistedCommands) do
if string.match (message:lower(), n:lower()) then
FiskceAntiCheatLog(source, "Tried to type in blacklisted cmd : " .. n,"basic")
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Blacklisted Command", source)
end
end
end
)
end
if ConfigACC.TriggersProtection then
for k, events in pairs(ConfigACC.BlacklistedEvents) do
RegisterServerEvent(events)
AddEventHandler(
events,
function()
FiskceAntiCheatLog(source, "Blacklisted event: " .. events,"basic")
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Blocked Event", source)
CancelEvent()
end
)
end
end
AddEventHandler(
"entityCreating",
function(entity)
if DoesEntityExist(entity) then
local src = NetworkGetEntityOwner(entity)
local model = GetEntityModel(entity)
local blacklistedPropsArray = {}
local WhitelistedPropsArray = {}
local eType = GetEntityPopulationType(entity)
if src == nil then
CancelEvent()
end
if ConfigACC.DisableAllUnits then
CancelEvent()
end
for bl_k, bl_v in pairs(ConfigACC.BlacklistedModels) do
table.insert(blacklistedPropsArray, GetHashKey(bl_v))
end
for wl_k, wl_v in pairs(ConfigACC.WhitelistedProps) do
table.insert(WhitelistedPropsArray, GetHashKey(wl_v))
end
if GetEntityType(entity) == 3 then
if eType == 6 or eType == 7 then
if inTable(WhitelistedPropsArray, model) == false then
if model ~= 0 then
FiskceAntiCheatLog(src, "Tried to spawn a blacklisted prop : " .. model,"model")
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Spawned Prop", src)
CancelEvent()
entityCreator[src] = (entityCreator[src] or 0) + 1
if entityCreator[src] > 999 then
FiskceAntiCheatLog(src, "Tried to spawn "..entityCreator[src].." entities","model")
TriggerEvent("aopkfgebjzhfpazf77", " π±βπ€ Ban Reason: Spawned Mass Entities", src)
end
end
end
end
else