Blumlaut / anticheese-anticheat

the FiveM anticheat, actively fighting against cheaters in FiveM.
The Unlicense
85 stars 43 forks source link

Changing from bans to kicks, is it possible? #41

Closed Legacy-TacticalGamingInteractive closed 1 year ago

Legacy-TacticalGamingInteractive commented 1 year ago

Would it be possible to change addBan to DropPlayer instead? Just a kick? If I edited EasyAdmin to have export for the function? Would this work?

Changing the client in anticheese to be TriggerEvent("EasyAdmin:DropPlayerExport" instead of TriggerEvent("EasyAdmin:addBan"

                if GetConvar("ea_warnAction", "kick") == "kick" then
                    SendWebhookMessage(moderationNotification,string.format(GetLocalisedText("adminkickedplayer"), src, getName(id, true, true), reason), "kick", 16711680)
                    DropPlayer(id, GetLocalisedText("warnkicked"))
                    DropPlayerExport(id, reason, GetLocalisedText("warnkicked"), src)                       
                    WarnedPlayers[id] = nil             
                elseif GetConvar("ea_warnAction", "kick") == "ban" then
                    local expires = os.time()+GetConvarInt("ea_warningBanTime", 604800)
                    addBanExport(id, reason, formatDateString(expires), src)
                    WarnedPlayers[id] = nil

Sorry I'm new to coding tbh

Blumlaut commented 1 year ago

https://easyadmin.readthedocs.io/en/latest/plugins/#sending-events