I’ve installed this alongside EasyAdmin and both the scripts are working, but anticheat isn’t warning or banning people.
I’ve tried kicking/banning from the server with EasyAdmin and that worked perfectly. I’ve given myself a blacklisted weapon, and it removes all of my weapons as intended. I can also see the health function work when it takes the -2hp.
Any ideas as to why it’s not dropping people and banning them?
local ped = PlayerPedId()
local unarmed = -1609580060
local meleeHash = -728555052
local pistolHash = 416676503
local subgunHash = -957766203
local shootgunHash = 860033945
local rifleHash = 970310034
local snipHash = -1212426201
local weaponHash = GetSelectedPedWeapon(ped)
local wgroup = GetWeapontypeGroup(weaponHash)
local dmg = GetWeaponDamageType(weaponHash)
if wgroup == unarmed or wgroup == meleeHash then
if dmg ~= 2 then
TriggerServerEvent('AntiCheats:flag', "Melee Explosif")
end
elseif wgroup == pistolHash or wgroup == subgunHash or wgroup == shootgunHash or wgroup == rifleHash or wgroup == snipHash then
if dmg ~= 3 then
TriggerServerEvent('AntiCheats:flag', "Weapon Explosif")
end
end
I’ve tried very silly edit, but nothing’s going on. My idea was to ban straight away non whitelisted persons (such as admins) for just obtaining blacklisted weapons. If someone would join my server and there is no chance how to get eg. a rail gun, I would like them got banned right away.
Could someone help me on this, please? I think I am just too tired atm -.-
Edit.:
This works for bans
Citizen.CreateThread(function()
while true do
Citizen.Wait(5000)
for _,theWeapon in ipairs(BlacklistedWeapons) do
Wait(1)
if HasPedGotWeapon(PlayerPedId(),GetHashKey(theWeapon),false) == 1 then
--RemoveAllPedWeapons(PlayerPedId(),false)
--TriggerServerEvent("banCheater", source,"Cheating")
TriggerServerEvent("AntiCheese:WeaponFlag", weapon )
end
end
end
end)
Unfortunately, it gives no notification on Discord as for Noclipping, for example. This would be highly desirable, as I would like to know about every scum trying to exploit the server. I believe I’ve overlooked something here. Any corrections, please?
Citizen.CreateThread(function()
while true do
Citizen.Wait(5000)
for _,theWeapon in ipairs(BlacklistedWeapons) do
Wait(1)
if HasPedGotWeapon(PlayerPedId(),GetHashKey(theWeapon),false) == 1 then
--RemoveAllPedWeapons(PlayerPedId(),false)
TriggerServerEvent("AntiCheese:WeaponFlag", weapon )
end
end
end
end)
It have some issues, It constantly gives that notification type of thing on the mini-radar like you take damage. It happens constantly, idk how to explain.
It feels like we are taking damage but we don’t however, it appears on the radar every minute and it kinda bothers me.
I am having issues with webhooks, I have read through all the stuff I can find online. I’ve redacted some of the links and the identifiers. But am I missing something here? The webhooks are created in discord and in the room I want the moderator/admin outputs to go too.
Error running system event handling function for resource anticheese: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: @anticheese/ac_s.lua:166: attempt to concatenate a nil value (global ‘license’)