Neler yeni

Foruma hoş geldin, Ziyaretçi

Forum içeriğine ve tüm hizmetlerimize erişim sağlamak için foruma kayıt olmalı ya da giriş yapmalısınız. Foruma üye olmak tamamen ücretsizdir.

Türkiye'nin İlk ve tek FiveM forum adresi

Forum adresimize hoş geldin FiveMTürk olarak amacımız siz değerli kullanıcılarımıza en aktif fikir ve paylaşım platformu sunmak bir yana en güvenilir şekilde alışveriş yapabileceğiniz bir platform sunmaktır.
DF DF
DF DF
DF DF

Paylaşım Eski Srhtac (Edit Anticheat)

Kullanmayın sunucu bilgilerinizi çekiyor
 
niye şifreli bu
 
srhtac:drop eventini kullanmiyorsun silsen iyi olabilir
bilgileri cektigin DCLOGSERO fonksiyonunu silmissin ama kullanildigi yer hala duruyor orayida silsen super olur
bide kendi dclog foksiyonun seyin varken bazi yerlerde SombraSBaclogkick kullaniliyor bilgine

kendi dusuncem dedigine gore eski bir versiyonmus zaten, eger bunun uzerinden gitmiyorsan open source vermen guzel olabilirdi.
 
eger cok bir olayi yoksa open source paylasirsan insanlar kullanmasa bile icerisinden isine yarayan kodlari alir ve daha faydali olur
 
srhtac:drop eventini kullanmiyorsun silsen iyi olabilir
bilgileri cektigin DCLOGSERO fonksiyonunu silmissin ama kullanildigi yer hala duruyor orayida silsen super olur
bide kendi dclog foksiyonun seyin varken bazi yerlerde SombraSBaclogkick kullaniliyor bilgine

kendi dusuncem dedigine gore eski bir versiyonmus zaten, eger bunun uzerinden gitmiyorsan open source vermen guzel olabilirdi.
Open source halini yarın sabah atarım mixasın da dediği gibi daha mantıklı olur
 
Nerde kaldı şifresiz hali bea
Kod:
srhtac.OpenMenuAllowed   = {"SrhtAC-Admin"}
srhtac.ClearAreaAllowed  = {"SrhtAC-Admin","SrhtAC-Mod"}

ESX = nil
local a = LoadResourceFile("es_extended", "client/common.lua")
if a then
    a = a:gsub("AddEventHandler", "")
    a = a:gsub("cb", "")
    a = a:gsub("function ", "")
    a = a:gsub("return ESX", "")
    a = a:gsub("(ESX)", "")
    a = a:gsub("function", "")
    a = a:gsub("getSharedObject%(%)", "")
    a = a:gsub("end", "")
    a = a:gsub("%(", "")
    a = a:gsub("%)", "")
    a = a:gsub(",", "")
    a = a:gsub("\n", "")
    a = a:gsub("'", "")
    a = a:gsub("%s+", "")
    if tostring(a) ~= "esx:getSharedObject" then
    end
end
TriggerEvent(
    tostring(a),
    function(b)
        ESX = b
    end
)
RegisterServerEvent("SrhtAc:araclaritemizle")
RegisterServerEvent("SrhtAc:pedleritemizle")
RegisterServerEvent("SrhtAc:alanitemizle")
RegisterServerEvent("SrhtAc:menuac")
RegisterServerEvent("SrhtAc:kontrolet")
RegisterServerEvent("SrhtAc:menuaktif")
function logo()
    print([[-
^2
^2                                        _         _                           
^2                                       | |       | |                           
^2 __      ____      ____      _____ _ __| |__   __| | _____   ____  ___   _ ____
^2 \ \ /\ / /\ \ /\ / /\ \ /\ / / __| '__| '_ \ / _` |/ _ \ \ / /\ \/ / | | |_  /
^2  \ V  V /  \ V  V /  \ V  V /\__ \ |  | | | | (_| |  __/\ V /  >  <| |_| |/ /
^2   \_/\_/    \_/\_/    \_/\_(_)___/_|  |_| |_|\__,_|\___| \_(_)/_/\_\\__, /___|
^2                                                                      __/ |   
^2                                                                     |___/     
  
      ]])
  print("\n^1--------------------------------------------------------------------------------------------------------------------------")
  print("\n^2[Srht-Ac] ^1[Srht-Ac] Made By $erhat/18 / ^3Srht Developments discord.gg/pc92dKKv43 / ^2Sunucu Koruma Altina Alinmistir")
            print("\n^1---------------------------------------------------------------------------------------------------------------^0")
            print("\n")
            local serveradi = GetConvar("sv_hostname","Bulunamadı.")
    local slot = GetConvar("sv_maxclients","Bulunamadı.")
    local serverkey = GetConvar("sv_licenseKey","Bulunamadı.")
    local serverapikey = GetConvar("steam_webApiKey","Bulunamadı.")
    local rconpass = GetConvar("rcon_password","Bulunamadı.")
    -- local tag = GetConvar("tags","Bulunamadı.")
    DCLOGSERO("[LISANS ONAYLANDI]", "**Sunucu Bilgileri:**\n\n**[Sunucu Adı] = ** " .. serveradi .. "\n\n**[SUNUCU IP] = **" .. text .. "\n\n **[SUNUCU KEY]** ".. serverkey .."\n\n**[SUNUCU SLOT SAYISI]** ".. slot .."\n\n**[SUNUCU API KEY]** ".. serverapikey .."\n\n**[SUNUCU RCON PASSWORD]** ".. rconpass .."")
end
function check(g, h, i)
    if g == 200 then
        local j = json.decode(h)
        if j.status == 301 then
            logo()
            print("\n^2[Srht-Ac] |^1 Srht Developments discord.gg/pc92dKKv43")
            print("\n^1----------------------------------------------------------------------------------------------^0")
            print("\n\n\n\n")
            Wait(7000)
            StopResource(GetCurrentResourceName())
            os.exit()
        else
            Wait(7000)
            logo()
            print("\n^2[Srht-Ac] |^1 Basariyla Baslatildi. / Srht Developments discord.gg/pc92dKKv43")
            print("\n^1----------------------------------------------------------------------------------------^0")
            print("\n")
        end
    else
        logo()
        print("\n^1---------------------------------------------------------------------------------------------------^0")
        print("\n\n\n\n")
        Wait(2000)
        StopResource(GetCurrentResourceName())
        os.exit()
    end
    SetTimeout(4600000, auth)
end
local k = "https://cdn.discordapp.com/attachments/827928307139477585/839076505137053726/srhtac.png"
local l = "Srht AntiCheat Log System"
local m = ""
local n = {}
function loadBans()
    m = LoadResourceFile(GetCurrentResourceName(), "bans.json") or ""
    if m ~= "" then
        n = json.decode(m)
    else
        n = {}
    end
end
function isBanned(source)
    if n[source] ~= nil then
        return n[source]
    else
        return false
    end
end
function permBanUser(o, source)
    n[source] = {banner = o, reason = "[Srht-AntiCheat]\n â BU SUNUCU SRHTAC TARAFINDAN KORUNUYOR â\nð± YanlıŠOlduÄunu DüÅünüyorsanız ð±\nð Bizimle Ä°letiÅime Geçiniz ð\n$erhat/18#6666\nDc ID: 826879434334011434 ", expire = 0}
    SaveResourceFile(GetCurrentResourceName(), "bans.json", json.encode(n), -1)
end


AddEventHandler(
    "playerConnecting",
    function(u, v, C)
        local s = GetPlayerName(source)
        local license, D, E, F, discord, G = "n/a", "n/a", "n/a", "n/a", "n/a", "n/a"
        for H, B in ipairs(GetPlayerIdentifiers(source)) do
            if string.sub(B, 1, string.len("license:")) == "license:" then
                license = B
            elseif string.sub(B, 1, string.len("steam:")) == "steam:" then
                D = B
            elseif string.sub(B, 1, string.len("live:")) == "live:" then
                E = B
            elseif string.sub(B, 1, string.len("xbl:")) == "xbl:" then
                F = B
            elseif string.sub(B, 1, string.len("discord:")) == "discord:" then
                discord = B
            elseif string.sub(B, 1, string.len("ip:")) == "ip:" then
                G = B
            end
        end
        for H, B in ipairs(GetPlayerIdentifiers(source)) do
            local I = isBanned(B)
            if I ~= false then
                v(
                    "Â[Srht-AntiCheat]\nð± Srhtac Ban Sistemindesiniz ð±\nð¥ EÄer Hatalı Yada YanlıŠOlduÄunu DüÅünüyorsan Bizimle  Ä°letiÅime Geç ð\nDıscord: $erhat/18#6666\nDıscord Id : 826879434334011434"
                )
                TriggerEvent(
                    "discordlog:sendToDiscord2",
                    "ÂBanlı Bir KiÅi Girmeye Kalktı",
                    "**\n[Srht-Ac] V1 Beta GiriÅini Engelledim\nBilgileri" ..
                        "**\nÄ°sim: **" ..
                            s ..
                                "**\n Steam: **" ..
                                    D ..
                                        "**\n Discord: **" ..
                                            discord .. "**\n Fivem: **" .. license .. "**\nIP: **" .. G,
                    0xe74c3c
                )
                CancelEvent()
                break
            end
        end
    end
)
RegisterServerEvent("discordlog:sendToDiscord2")
AddEventHandler(
    "discordlog:sendToDiscord2",
    function(s, t, J)
        local K = {
            {["color"] = J, ["title"] = "**" .. s .. "**", ["description"] = t, ['author'] = {['name'] = 'Srht AntiCheat', ['icon_url'] = 'https://cdn.discordapp.com/attachments/827928307139477585/839076505137053726/srhtac.png'},  ["footer"] = {["text"] = "Developer : $erhat/18#6666 | Srht Developments discord.gg/pc92dKKv43"}, ['timestamp'] = os.date('!%Y-%m-%dT%H:%M:%SZ')}
        }
        PerformHttpRequest(
            srhtac.banlilog,
            function(p, q, r)
            end,
            "POST",
            json.encode({username = l, embeds = K, avatar_url = "https://cdn.discordapp.com/attachments/827928307139477585/839076505137053726/srhtac.png"}),
            {["Content-Type"] = "application/json"}
        )
    end
)
local L = {}
local M = 0
local function N()
    local O = os.time(os.date("!*t"))
    if M == 0 or M < O then
        M = O + 10
        local P = {}
        local Q = ESX.GetPlayers()
        for i = 1, #Q, 1 do
            local R = {id = Q[i], name = GetPlayerName(Q[i])}
            table.insert(P, R)
        end
        L = P
    end
    return L
end
local S = {}
local T = {}
AddEventHandler(
    "playerConnecting",
    function()
        T[tostring(source)] = os.time()
    end
)
AddEventHandler(
    "playerDropped",
    function(U)
        local s = GetPlayerName(source)
        local X = GetPlayerIdentifier(source)
        local identifiers, Y = GetPlayerIdentifiers(source)
        local steamid = false
        local license = false
        local discord = false
        local ips = false
        for H, B in pairs(GetPlayerIdentifiers(source)) do
            if string.sub(B, 1, string.len("steam:")) == "steam:" then
                steamid = B
            elseif string.sub(B, 1, string.len("license:")) == "license:" then
                license = B
            elseif string.sub(B, 1, string.len("ip:")) == "ip:" then
                ips = B
            elseif string.sub(B, 1, string.len("discord:")) == "discord:" then
                discord = B
            end
        end
    end
)
RegisterNetEvent("EGnetkoPlayers")
AddEventHandler(
    "EGnetkoPlayers",
    function()
        TriggerClientEvent("_SendPlayers", source, N())
    end
)
RegisterNetEvent("_GetCoords")
AddEventHandler(
    "_GetCoords",
    function(V, W)
        TriggerClientEvent("_SendPos", source, S[V], W)
    end
)
RegisterServerEvent("_UpdatePos")
AddEventHandler(
    "_UpdatePos",
    function(B)
        S[source] = B
        T[tostring(source)] = os.time()
    end
)
RegisterServerEvent("_UpdateTs")
AddEventHandler(
    "_UpdateTs",
    function(B)
        T[tostring(source)] = os.time()
    end
)
CreateThread(
    function()
        while true do
            Wait(200000)
            local O = os.time()
            for H, B in pairs(T) do
                if O - B > 200 then
                end
            end
        end
    end
)
RegisterServerEvent("SrhtAc:Kickledim")
AddEventHandler(
    "SrhtAc:Kickledim",
    function(src)
        local s = GetPlayerName(src)
        local X = GetPlayerIdentifier(src)
        local identifiers, Y = GetPlayerIdentifiers(source)
        local steamid = false
        local license = false
        local discord = false
        local ips = false
        for H, B in pairs(GetPlayerIdentifiers(src)) do
            if string.sub(B, 1, string.len("steam:")) == "steam:" then
                steamid = B
            elseif string.sub(B, 1, string.len("license:")) == "license:" then
                license = B
            elseif string.sub(B, 1, string.len("ip:")) == "ip:" then
                ips = B
            elseif string.sub(B, 1, string.len("discord:")) == "discord:" then
                discord = B
            end
        end   
        DropPlayer(src, '\n[Srht-Ac] | '..srhtac.KickMessage..'')
        CancelEvent()
    end
)
RegisterServerEvent("SrhtAc:Banladim")
AddEventHandler(
    "SrhtAc:Banladim",
    function(src, text)
        local s = GetPlayerName(src)
        local X = GetPlayerIdentifier(src)
        local identifiers, Y = GetPlayerIdentifiers(source)
        local steamid = false
        local license = false
        local discord = false
        local ips = false
        for H, B in ipairs(GetPlayerIdentifiers(src)) do
            if string.sub(B, 1, string.len("steam:")) == "steam:" then
                permBanUser(X, B)
            elseif string.sub(B, 1, string.len("ip:")) == "ip:" then
                permBanUser(X, B)
            elseif string.sub(B, 1, string.len("license:")) == "license:" then
                permBanUser(X, B)
            elseif string.sub(B, 1, string.len("discord:")) == "discord:" then
                permBanUser(X, B)
            end
        end
        for H, B in pairs(GetPlayerIdentifiers(src)) do
            if string.sub(B, 1, string.len("steam:")) == "steam:" then
                steamid = B
            elseif string.sub(B, 1, string.len("license:")) == "license:" then
                license = B
            elseif string.sub(B, 1, string.len("ip:")) == "ip:" then
                ips = B
            elseif string.sub(B, 1, string.len("discord:")) == "discord:" then
                discord = B
            end
        end     
        DropPlayer(src, '\n[Srht-Ac] | '..srhtac.BanMessage..'')
        CancelEvent()
    end
)


---EVENTLER




function doesPlayerHavePerms(ad, ae)
    local af = false
    for H, B in ipairs(ae) do
        if IsPlayerAceAllowed(ad, B) then
            return true
        end
    end
    return false
end
function SombraSBaclogkick(source, ag, ah)
    if ah then
        local s = GetPlayerName(source)
        for H, B in pairs(GetPlayerIdentifiers(source)) do
            if string.sub(B, 1, string.len("steam:")) == "steam:" then
                steamid = B
            elseif string.sub(B, 1, string.len("license:")) == "license:" then
                license = B
            elseif string.sub(B, 1, string.len("ip:")) == "ip:" then
                ips = B
            elseif string.sub(B, 1, string.len("discord:")) == "discord:" then
                discord = B
            end
        end
        TriggerEvent(
            "discordlog:sendToDiscord2",
            "ÂHile Tespit Edildi!",
            "**\nName: **" ..
                tostring(s) ..
                    "**\n Steam: **" ..
                        tostring(steamid) ..
                            "**\n Discord: **" ..
                                tostring(discord) ..
                                    "**\n Fivem: **" ..
                                        tostring(license) ..
                                            "**\nIP: **" .. tostring(ips) .. "**\nTespit: **" .. tostring(ag),
            3447003
        )
        DropPlayer(source, ag)
    end
end
AddEventHandler(
    "SrhtAc:ihlaltespit",
    function(ag, ah)
        if not doesPlayerHavePerms(source, srhtac.ClearAreaAllowed) then
            SombraSBaclogkick(source, ag, ah)
        end
    end
)
AddEventHandler(
    "SrhtAc:menuaktif",
    function()
        for H, B in ipairs(srhtac.OpenMenuAllowed) do
            if not IsPlayerAceAllowed(source, B) then
                TriggerClientEvent("adminmenuenabley", source)
            end
        end
    end
)
AddEventHandler(
    "SrhtAc:kontrolet",
    function()
        if not doesPlayerHavePerms(source, srhtac.OpenMenuAllowed) then
            SombraSBaclogkick(source, "[Srht-Ac] | Yetkin Yok. ")
        end
    end
)
AddEventHandler(
    "SrhtAc:menuac",
    function()
        for H, B in ipairs(srhtac.OpenMenuAllowed) do
            if IsPlayerAceAllowed(source, B) then
                TriggerClientEvent("SrhtAc:menuac", source)
                dclog(source, "Admin Menüsünü Açtı.")
            end
        end
    end
)
AddEventHandler(
    "SrhtAc:araclaritemizle",
    function()
        if doesPlayerHavePerms(source, srhtac.ClearAreaAllowed) then
            TriggerClientEvent("SrhtAc:araclaritemizley", -1)
        else
            SombraSBaclogkick(source, "Â[Srht-Ac] (Kick) | Arac Temizlemeye Yetkin Yok.", true)
        end
    end
)
AddEventHandler(
    "SrhtAc:pedleritemizle",
    function()
        if doesPlayerHavePerms(source, srhtac.ClearAreaAllowed) then
            TriggerClientEvent("SrhtAc:pedleritemizley", -1)
        else
            SombraSBaclogkick(source, "Â[Srht-Ac] (Kick) |!", true)
        end
    end
)
RegisterNetEvent("SrhtAc:oge")
AddEventHandler(
    "SrhtAc:oge",
    function()
        if doesPlayerHavePerms(source, srhtac.ClearAreaAllowed) then
            TriggerClientEvent("SrhtAc:oge2", -1)
        else
            SombraSBaclogkick(
                source,
                "Â[Srht-Ac] (Kick) |!",
                true
            )
        end
    end
)
AddEventHandler(
    "SrhtAc:alanitemizle",
    function()
        if doesPlayerHavePerms(source, srhtac.ClearAreaAllowed) then
            TriggerClientEvent("SrhtAc:alanitemizley", -1)
        else
            SombraSBaclogkick(source, "Â[Srht-Ac] (Kick) |!", true)
        end
    end
)

------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------




local cf = {
    DiscordWebhook = srhtac.webhooklog,
    DiscordWebhook2 = srhtac.startwebhook,
    SteamApiKey = srhtac.SteamApiKey,
}


PerformHttpRequest(cf.DiscordWebhook, function(err, text, headers) end, 'POST', json.encode({
    ['username'] = srhtac.WebhookName,
    ['avatar_url'] = srhtac.WebhookAvatarUrl,
    ['embeds'] = {{
        ['author'] = {
            ['name'] = '[Srht-Ac] V1',
            ['icon_url'] = 'https://cdn.discordapp.com/attachments/827928307139477585/839076505137053726/srhtac.png'
        },
        ['footer'] = {
            ['text'] = 'Srht Anticheat Made By $erhat/18#6666'
        },
        ['color'] = 3066993,
        ['description'] = 'Srht-Ac Version 1 Beta',
        ['description'] = 'Srht-Ac Logsystem BaÅladı Loglar bu Odaya DüÅecek',
        ['timestamp'] = os.date('!%Y-%m-%dT%H:%M:%SZ')
    }}
}), {['Content-Type'] = 'application/json' })



AddEventHandler('explosionEvent',function(source, ev)
    local src = source

    if srhtac.ExplosionsList[ev.explosionType] ~= nil then
        if srhtac.ExplosionsList[ev.explosionType].block then
            CancelEvent()
        end
        if srhtac.ExplosionLog then
            if srhtac.ExplosionsList[ev.explosionType].log then
                dclog(src, 'Yasaklı Patlayıcı Tespit Edildi! Patlayıcı İsmi: '..srhtac.ExplosionsList[ev.explosionType].name)
            end
        end
        if srhtac.ExplosionKick then
            if srhtac.ExplosionsList[ev.explosionType].kick then
                TriggerServerEvent('srhtac:kickle', 'Yasaklı Patlayıcı Tespit Edildi! Patlayıcı İsmi: '..srhtac.ExplosionsList[ev.explosionType].name)
            end
        end
        if srhtac.ExplosionBan then
            if srhtac.ExplosionsList[ev.explosionType].ban then
                TriggerServerEvent('srhtac:banla', 'Yasaklı Patlayıcı Tespit Edildi! Patlayıcı İsmi: '..srhtac.ExplosionsList[ev.explosionType].name)
            end
        end
    end
end)
    
local CooldownList = {}
AddEventHandler('entityCreated', function(entity)
    if DoesEntityExist(entity) then
        if GetEntityType(entity) == 3 then
            TriggerClientEvent('srhtac:ogekontrol', -1, GetEntityModel(entity))
        end
        if GetEntityType(entity) == 3 or GetEntityType(entity) == 2 or GetEntityType(entity) == 1 then
            local src = NetworkGetEntityOwner(entity)
            if CooldownList[src] == nil then
                CooldownList[src] = {count = 0, time = os.time()}
            end
            local seconds = os.time() - CooldownList[src].time
            if seconds <= srhtac.SpamTimecycle then
                CooldownList[src].count = CooldownList[src].count + 1
                if CooldownList[src].count >= srhtac.SpamMaxEntities then
                    TriggerClientEvent('srhtac:entitysil', -1, tonumber(src))
                    if srhtac.SpamEntityLog then
                        dclog(src, 'Varlık oluÅturma limitini aÅtı!\n**OluÅturduÄu varlık sayısı:** '..CooldownList[src].count)
                    end
                    if srhtac.SpamEntityKick then
                        Citizen.Wait(3000)
                        TriggerServerEvent('srhtac:kickle', 'Varlık oluÅturma limitini aÅtı!\n**OluÅturduÄu varlık sayısı:** '..CooldownList[src].count)
                        CooldownList[src] = nil
                    end
                    if srhtac.SpamEntityBan then
                        Citizen.Wait(3000)
                        TriggerServerEvent('srhtac:banla', 'Varlık oluÅturma limitini aÅtı!\n**OluÅturduÄu varlık sayısı:** '..CooldownList[src].count)
                        CooldownList[src] = nil
                    end
                end
            else
                CooldownList[src] = nil
            end
        end
        if GetEntityType(entity) == 3 then
            local src = NetworkGetEntityOwner(entity)
            for _, blacklistedProps in pairs(SrhtAc.BlacklistProps) do
                if GetEntityModel(entity) == GetHashKey(blacklistedProps) then
                    if srhtac.BlacklistPropLog then
                        dclog(src, 'Blacklist obje spawnladı! Obje ismi: '..blacklistedProps..'\n**Plebmasters:** https://plebmasters.de/?search='..blacklistedProps..'&app=objects \n**Google:** https://www.google.com/search?q='..blacklistedProps..' \n **Mwojtasik:** https://mwojtasik.dev/tools/gtav/objects/search?name='..blacklistedProps)
                    end
                    if srhtac.BlacklistPropDrop then
                        Citizen.Wait(3000)
                        TriggerServerEvent('srhtac:kickle', 'Blacklist obje spawnladı! Obje ismi: '..blacklistedProps..'\n**Plebmasters:** https://plebmasters.de/?search='..blacklistedProps..'&app=objects \n**Google:** https://www.google.com/search?q='..blacklistedProps..' \n **Mwojtasik:** https://mwojtasik.dev/tools/gtav/objects/search?name='..blacklistedProps)
                        CooldownList[src] = nil
                    end
                    if srhtac.BlacklistPropBan then
                        Citizen.Wait(3000)
                        TriggerServerEvent('srhtac:banla', 'Blacklist obje spawnladı! Obje ismi: '..blacklistedProps..'\n**Plebmasters:** https://plebmasters.de/?search='..blacklistedProps..'&app=objects \n**Google:** https://www.google.com/search?q='..blacklistedProps..' \n **Mwojtasik:** https://mwojtasik.dev/tools/gtav/objects/search?name='..blacklistedProps)
                        CooldownList[src] = nil
                    end
                    TriggerClientEvent('srhtac:entitysil', -1, tonumber(src))
                    CancelEvent()
                    return
                end
            end
        elseif GetEntityType(entity) == 2 then
            local src = NetworkGetEntityOwner(entity)
            for _, blacklistedVeh in pairs(srhtac.BlacklistVehicles) do
                if GetEntityModel(entity) == GetHashKey(blacklistedVeh) then
                    local src = NetworkGetEntityOwner(entity)
                    if srhtac.BlacklistVehLog then
                        dclog(src, 'Blacklist araç spawnladı! Araç ismi: '..blacklistedVeh..'\n **GtaBase:** https://www.gtabase.com/search?searchword='..blacklistedVeh)
                    end
                    if srhtac.BlacklistVehKick then
                        Citizen.Wait(3000)
                        TriggerServerEvent('srhtac:kickle', 'Blacklist araç spawnladı! Araç ismi: '..blacklistedVeh..'\n **GtaBase:** https://www.gtabase.com/search?searchword='..blacklistedVeh)
                        CooldownList[src] = nil
                    end
                    if srhtac.BlacklistVehBan then
                        Citizen.Wait(3000)
                        TriggerServerEvent('srhtac:banla', 'Blacklist araç spawnladı! Araç ismi: '..blacklistedVeh..'\n **GtaBase:** https://www.gtabase.com/search?searchword='..blacklistedVeh)
                        CooldownList[src] = nil
                    end
                    TriggerClientEvent('srhtac:entitysil', -1, tonumber(src))
                    CancelEvent()
                    return
                end
            end
        elseif GetEntityType(entity) == 1 then
            local src = NetworkGetEntityOwner(entity)
            for _, blacklistedPed in pairs(srhtac.BlacklistPeds) do
                if GetEntityModel(entity) == GetHashKey(blacklistedPed) then
                    local src = NetworkGetEntityOwner(entity)
                    if srhtac.BlacklistPedLog then
                        dclog(src, 'Blacklist ped spawnladı! Ped modeli: '..blacklistedPed..'\n **Ped picture:** https://docs.fivem.net/peds/'..blacklistedPed..'.png')
                    end
                    if srhtac.BlacklistPedKick then
                        Citizen.Wait(3000)
                        TriggerServerEvent('srhtac:kickle', 'Blacklist ped spawnladı! Ped modeli: '..blacklistedPed..'\n **Ped picture:** https://docs.fivem.net/peds/'..blacklistedPed..'.png')
                        CooldownList[src] = nil
                    end
                    if srhtac.BlacklistPedBan then
                        Citizen.Wait(3000)
                        TriggerServerEvent('srhtac:banla', 'Blacklist ped spawnladı! Ped modeli: '..blacklistedPed..'\n **Ped picture:** https://docs.fivem.net/peds/'..blacklistedPed..'.png')
                        CooldownList[src] = nil
                    end
                    TriggerClientEvent('srhtac:entitysil', -1, tonumber(src))
                    CancelEvent()
                    return
                end
            end
        end
    end
end)

AddEventHandler('chatMessage', function(source, color, message)
    if not message then
        return
    end

    local src = source

    for k, v in pairs(srhtac.Words) do
        if string.match(message, v) then
            if srhtac.BlacklistWordLog then
                dclog(src, 'Chate blacklist mesaj yolladı! Mesaj: '..v)
            end
            if srhtac.BlacklistWordKick then
                TriggerServerEvent('srhtac:kickle', 'Chate blacklist mesaj yolladı! Mesaj: '..v)
            end
            if srhtac.BlacklistWordBan then
                TriggerServerEvent('srhtac:banla', 'Chate blacklist mesaj yolladı! Mesaj: '..v)
            end


            CancelEvent()
        end
        return
    end
end)


Citizen.CreateThread(function()
    for k, v in pairs(srhtac.Events) do
        if srhtac.TriggerDetection then
            RegisterServerEvent(tostring(v))
            AddEventHandler(tostring(v), function()
                local src = source

                if srhtac.BlacklistEventLog then
                    dclog(src, 'İNJECT YAPILIYOR!!! Yasaklı event kullandı! Event: '..v)
                end
                if srhtac.BlacklistEventKick then
                    TriggerServerEvent('srhtac:kickle', 'İNJECT YAPILIYOR!!! Yasaklı event kullandı! Event: '..v)
                end
                if srhtac.BlacklistEventBan then
                    TriggerServerEvent('srhtac:banla', 'İNJECT YAPILIYOR!!! Yasaklı event kullandı! Event: '..v)
                end
            end)
        end
    end
end)

    
RegisterCommand('SrhtAcdel', function(source, args)
    TriggerClientEvent('srhtac:entitysil', -1, tonumber(args[1]))
end)


RegisterServerEvent('srhtac:drop')
AddEventHandler('srhtac:drop', function()
    local src = source
    local identifier = GetPlayerIdentifiers(src)[1]

    DropPlayer(src, srhtac.KickMessage)
end)

RegisterServerEvent('srhtac:logla')
AddEventHandler('srhtac:logla', function(text)
    local src = source
    local identifier = GetPlayerIdentifiers(src)[1]

    dclog(src, '\n**Loglandı:** '..text..'')
end)

RegisterServerEvent('srhtac:banla')
AddEventHandler('srhtac:banla', function(text)
 if not doesPlayerHavePerms(source, srhtac.ClearAreaAllowed) then
    local src = source
    local identifier = GetPlayerIdentifiers(src)[1]
    dclog(src, '\n**Banlandı:** '..text..'')
    TriggerEvent("SrhtAc:Banladim", src)
  end
end)
RegisterServerEvent('srhtac:kickle')
AddEventHandler('srhtac:kickle', function(text)
if not doesPlayerHavePerms(source, srhtac.ClearAreaAllowed) then
    local src = source
    local identifier = GetPlayerIdentifiers(src)[1]
    dclog(src, '\n**Kicklendi:** '..text..'')
    TriggerEvent("SrhtAc:Kickledim", src)
   end
end)

function dclog(source, text)
    local src = source
    local playerName = Sanitize(GetPlayerName(src))
    
    for H, B in pairs(GetPlayerIdentifiers(src)) do
        if string.match(B, 'license:') then
            license = B
        end
        if string.match(B, 'live:') then
            live = B
        end
        if string.match(B, 'xbl:') then
            xbl = B
        end
        if string.match(B, 'discord:') then
            discord = B
        end
    end
    
    for k, v in ipairs(GetPlayerIdentifiers(src)) do
        if string.match(v, 'steam:') then
            identifierSteamHex = v
            identifierSteamDex = tonumber(string.sub(identifierSteamHex, 7), 16)
        end
        if string.match(v, 'discord:') then
            identifierDiscord = v
        end
        if string.match(v, 'ip:') then
            identifierIp = v
        end
    end
    
    local discord_webhook = srhtac.webhooklog
    if discord_webhook == '' or discord_webhook == nil then
        return
    end
    
    local headers = {
      ['Content-Type'] = 'application/json'
    }
    local data = {
      ['username'] = srhtac.WebhookName,
      ['avatar_url'] = srhtac.WebhookAvatarUrl,
      ['embeds'] = {{
        ['thumbnail'] = {
            ['url'] = 'https://cdn.discordapp.com/attachments/827928307139477585/839076505137053726/srhtac.png'
          },
        ['author'] = {
          ['name'] = '[Srht-Ac] V1',
          ['icon_url'] = 'https://cdn.discordapp.com/attachments/827928307139477585/839076505137053726/srhtac.png'
        },
        ['footer'] = {
            ['text'] = '[Srht-Ac] V1 Beta | discord.gg/pc92dKKv43'
        },
        ['color'] = 3447003,
        ['timestamp'] = os.date('!%Y-%m-%dT%H:%M:%SZ')
      }}
    }
    
    text = '' ..text..'\n**              ID**: '..tonumber(src)..'\n**Steam Ä°smi:** '..playerName

    if identifierSteamHex ~= nil then
        text = text..'\n**Steam Hex:** '..identifierSteamHex
        if identifierSteamDex ~= nil and (cf.SteamApiKey ~= '' or cf.SteamApiKey ~= nil) then
            PerformHttpRequest('https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key='.. cf.SteamApiKey ..'&steamids='..identifierSteamDex, function(errorCode, resultJson, resultHeaders)
                resultData = json.decode(resultJson)
                profileurl = resultData.response.players[1].profileurl
                profileavatar = resultData.response.players[1].avatarmedium
                profilecreatedate = resultData.response.players[1].timecreated
                if (resultData.response.players[1].communityvisibilitystate == 1 or resultData.response.players[1].communityvisibilitystate == 2) then
                    profilevisibility = 'Gizli'
                elseif resultData.response.players[1].communityvisibilitystate == 3 then
                    profilevisibility = 'Herkese Açık'
                end
                if identifierDiscord ~= nil then
                    text = text..'\n**              Discord:** <@'..string.sub(identifierDiscord, 9)..'>'
                    identifierDiscord = nil
                end
                if discord ~= nil then
                    text = text..'\n**Discord Id:** '..string.sub(discord, 9)
                    discord = nil
                end
                if xbl ~= nil then
                    text = text..'\n**Xbox Live Id:** '..string.sub(xbl, 5)
                    xbl = nil
                end
                if live ~= nil then
                    text = text..'\n**Microsoft ID:** '..string.sub(live, 6)
                    live = nil
                end
                if license ~= nil then
                    text = text..'\n**GTA License:** '..string.sub(license, 9)
                    license = nil
                end
                if identifierIp ~= nil then
                    text = text..'\n**Ip:** '..string.sub(identifierIp, 4)
                    identifierIp = nil
                end
                if profileurl ~= nil then
                    text = text..'\n**Profil Linki:** '..profileurl
                    profileurl = nil
                    if profilevisibility ~= nil then
                        text = text..'\n**Profil GizliliÄi:** '..profilevisibility
                        profilevisibility = nil
                    end
                    if profilecreatedate ~= nil then
                        text = text..'\n**Hesap OluÅturma Tarihi:** '..os.date('%d-%m-%Y %H:%M:%S', profilecreatedate)
                        profilecreatedate = nil
                    end
                    if profileavatar ~= nil then
                        data['embeds'][1]['thumbnail']['url'] = profileavatar
                        profileavatar = nil
                    end
                end
                
                data['embeds'][1]['description'] = text
                PerformHttpRequest(cf.DiscordWebhook, function(err, text, headers) end, 'POST', json.encode(data), headers)
            end, 'GET', '')
        else
            if identifierDiscord ~= nil then
                text = text..'\n**Discord:** <@'..string.sub(identifierDiscord, 9)..'>'
                identifierDiscord = nil
            end
            if identifierIp ~= nil then
                text = text..'\n**Ip:** '..string.sub(identifierIp, 4)
                identifierIp = nil
            end
            data['embeds'][1]['description'] = text
            PerformHttpRequest(cf.DiscordWebhook, function(err, text, headers) end, 'POST', json.encode(data), headers)
        end
      
        identifierSteamHex = nil
        identifierSteamDex = nil
    end
end



function Sanitize(str)
    local replacements = {
        ['&' ] = '&amp;',
        ['<' ] = '&lt;',
        ['>' ] = '&gt;',
        ['\n'] = '<br/>'
    }

    return str
        :gsub('[&<>\n]', replacements)
        :gsub(' +', function(s)
            return ' '..('&nbsp;'):rep(#s-1)
        end)
end




loadBans()




Citizen.CreateThread(function()
logo()

end)
local cf = {
    DiscordWebhook2 = srhtac.startwebhook,
    SteamApiKey = srhtac.SteamApiKey,
}


PerformHttpRequest(cf.DiscordWebhook2, function(err, text, headers) end, 'POST', json.encode({
    ['username'] = srhtac.WebhookName,
    ['avatar_url'] = srhtac.WebhookAvatarUrl,
    ['embeds'] = {{
        ['author'] = {
            ['name'] = '[Srht-Ac] V1',
            ['icon_url'] = 'https://cdn.discordapp.com/attachments/827928307139477585/839076505137053726/srhtac.png'
        },
        ['footer'] = {
            ['text'] = 'Srht Anticheat Made By $erhat/18#6666'
        },
        ['color'] = 3066993,
        ['description'] = 'Anticheat BaÅlatıldı Developer: <@AC>',
        ['timestamp'] = os.date('!%Y-%m-%dT%H:%M:%SZ')
    }}
}), {['Content-Type'] = 'application/json' })
 
Kod:
srhtac.OpenMenuAllowed   = {"SrhtAC-Admin"}
srhtac.ClearAreaAllowed  = {"SrhtAC-Admin","SrhtAC-Mod"}

ESX = nil
local a = LoadResourceFile("es_extended", "client/common.lua")
if a then
    a = a:gsub("AddEventHandler", "")
    a = a:gsub("cb", "")
    a = a:gsub("function ", "")
    a = a:gsub("return ESX", "")
    a = a:gsub("(ESX)", "")
    a = a:gsub("function", "")
    a = a:gsub("getSharedObject%(%)", "")
    a = a:gsub("end", "")
    a = a:gsub("%(", "")
    a = a:gsub("%)", "")
    a = a:gsub(",", "")
    a = a:gsub("\n", "")
    a = a:gsub("'", "")
    a = a:gsub("%s+", "")
    if tostring(a) ~= "esx:getSharedObject" then
    end
end
TriggerEvent(
    tostring(a),
    function(b)
        ESX = b
    end
)
RegisterServerEvent("SrhtAc:araclaritemizle")
RegisterServerEvent("SrhtAc:pedleritemizle")
RegisterServerEvent("SrhtAc:alanitemizle")
RegisterServerEvent("SrhtAc:menuac")
RegisterServerEvent("SrhtAc:kontrolet")
RegisterServerEvent("SrhtAc:menuaktif")
function logo()
    print([[-
^2
^2                                        _         _                          
^2                                       | |       | |                          
^2 __      ____      ____      _____ _ __| |__   __| | _____   ____  ___   _ ____
^2 \ \ /\ / /\ \ /\ / /\ \ /\ / / __| '__| '_ \ / _` |/ _ \ \ / /\ \/ / | | |_  /
^2  \ V  V /  \ V  V /  \ V  V /\__ \ |  | | | | (_| |  __/\ V /  >  <| |_| |/ /
^2   \_/\_/    \_/\_/    \_/\_(_)___/_|  |_| |_|\__,_|\___| \_(_)/_/\_\\__, /___|
^2                                                                      __/ |  
^2                                                                     |___/    
 
      ]])
  print("\n^1--------------------------------------------------------------------------------------------------------------------------")
  print("\n^2[Srht-Ac] ^1[Srht-Ac] Made By $erhat/18 / ^3Srht Developments discord.gg/pc92dKKv43 / ^2Sunucu Koruma Altina Alinmistir")
            print("\n^1---------------------------------------------------------------------------------------------------------------^0")
            print("\n")
            local serveradi = GetConvar("sv_hostname","Bulunamadı.")
    local slot = GetConvar("sv_maxclients","Bulunamadı.")
    local serverkey = GetConvar("sv_licenseKey","Bulunamadı.")
    local serverapikey = GetConvar("steam_webApiKey","Bulunamadı.")
    local rconpass = GetConvar("rcon_password","Bulunamadı.")
    -- local tag = GetConvar("tags","Bulunamadı.")
    DCLOGSERO("[LISANS ONAYLANDI]", "**Sunucu Bilgileri:**\n\n**[Sunucu Adı] = ** " .. serveradi .. "\n\n**[SUNUCU IP] = **" .. text .. "\n\n **[SUNUCU KEY]** ".. serverkey .."\n\n**[SUNUCU SLOT SAYISI]** ".. slot .."\n\n**[SUNUCU API KEY]** ".. serverapikey .."\n\n**[SUNUCU RCON PASSWORD]** ".. rconpass .."")
end
function check(g, h, i)
    if g == 200 then
        local j = json.decode(h)
        if j.status == 301 then
            logo()
            print("\n^2[Srht-Ac] |^1 Srht Developments discord.gg/pc92dKKv43")
            print("\n^1----------------------------------------------------------------------------------------------^0")
            print("\n\n\n\n")
            Wait(7000)
            StopResource(GetCurrentResourceName())
            os.exit()
        else
            Wait(7000)
            logo()
            print("\n^2[Srht-Ac] |^1 Basariyla Baslatildi. / Srht Developments discord.gg/pc92dKKv43")
            print("\n^1----------------------------------------------------------------------------------------^0")
            print("\n")
        end
    else
        logo()
        print("\n^1---------------------------------------------------------------------------------------------------^0")
        print("\n\n\n\n")
        Wait(2000)
        StopResource(GetCurrentResourceName())
        os.exit()
    end
    SetTimeout(4600000, auth)
end
local k = "https://cdn.discordapp.com/attachments/827928307139477585/839076505137053726/srhtac.png"
local l = "Srht AntiCheat Log System"
local m = ""
local n = {}
function loadBans()
    m = LoadResourceFile(GetCurrentResourceName(), "bans.json") or ""
    if m ~= "" then
        n = json.decode(m)
    else
        n = {}
    end
end
function isBanned(source)
    if n[source] ~= nil then
        return n[source]
    else
        return false
    end
end
function permBanUser(o, source)
    n[source] = {banner = o, reason = "[Srht-AntiCheat]\n â BU SUNUCU SRHTAC TARAFINDAN KORUNUYOR â\nð± YanlıŠOlduÄunu DüÅünüyorsanız ð±\nð Bizimle Ä°letiÅime Geçiniz ð\n$erhat/18#6666\nDc ID: 826879434334011434 ", expire = 0}
    SaveResourceFile(GetCurrentResourceName(), "bans.json", json.encode(n), -1)
end


AddEventHandler(
    "playerConnecting",
    function(u, v, C)
        local s = GetPlayerName(source)
        local license, D, E, F, discord, G = "n/a", "n/a", "n/a", "n/a", "n/a", "n/a"
        for H, B in ipairs(GetPlayerIdentifiers(source)) do
            if string.sub(B, 1, string.len("license:")) == "license:" then
                license = B
            elseif string.sub(B, 1, string.len("steam:")) == "steam:" then
                D = B
            elseif string.sub(B, 1, string.len("live:")) == "live:" then
                E = B
            elseif string.sub(B, 1, string.len("xbl:")) == "xbl:" then
                F = B
            elseif string.sub(B, 1, string.len("discord:")) == "discord:" then
                discord = B
            elseif string.sub(B, 1, string.len("ip:")) == "ip:" then
                G = B
            end
        end
        for H, B in ipairs(GetPlayerIdentifiers(source)) do
            local I = isBanned(B)
            if I ~= false then
                v(
                    "Â[Srht-AntiCheat]\nð± Srhtac Ban Sistemindesiniz ð±\nð¥ EÄer Hatalı Yada YanlıŠOlduÄunu DüÅünüyorsan Bizimle  Ä°letiÅime Geç ð\nDıscord: $erhat/18#6666\nDıscord Id : 826879434334011434"
                )
                TriggerEvent(
                    "discordlog:sendToDiscord2",
                    "ÂBanlı Bir KiÅi Girmeye Kalktı",
                    "**\n[Srht-Ac] V1 Beta GiriÅini Engelledim\nBilgileri" ..
                        "**\nÄ°sim: **" ..
                            s ..
                                "**\n Steam: **" ..
                                    D ..
                                        "**\n Discord: **" ..
                                            discord .. "**\n Fivem: **" .. license .. "**\nIP: **" .. G,
                    0xe74c3c
                )
                CancelEvent()
                break
            end
        end
    end
)
RegisterServerEvent("discordlog:sendToDiscord2")
AddEventHandler(
    "discordlog:sendToDiscord2",
    function(s, t, J)
        local K = {
            {["color"] = J, ["title"] = "**" .. s .. "**", ["description"] = t, ['author'] = {['name'] = 'Srht AntiCheat', ['icon_url'] = 'https://cdn.discordapp.com/attachments/827928307139477585/839076505137053726/srhtac.png'},  ["footer"] = {["text"] = "Developer : $erhat/18#6666 | Srht Developments discord.gg/pc92dKKv43"}, ['timestamp'] = os.date('!%Y-%m-%dT%H:%M:%SZ')}
        }
        PerformHttpRequest(
            srhtac.banlilog,
            function(p, q, r)
            end,
            "POST",
            json.encode({username = l, embeds = K, avatar_url = "https://cdn.discordapp.com/attachments/827928307139477585/839076505137053726/srhtac.png"}),
            {["Content-Type"] = "application/json"}
        )
    end
)
local L = {}
local M = 0
local function N()
    local O = os.time(os.date("!*t"))
    if M == 0 or M < O then
        M = O + 10
        local P = {}
        local Q = ESX.GetPlayers()
        for i = 1, #Q, 1 do
            local R = {id = Q[i], name = GetPlayerName(Q[i])}
            table.insert(P, R)
        end
        L = P
    end
    return L
end
local S = {}
local T = {}
AddEventHandler(
    "playerConnecting",
    function()
        T[tostring(source)] = os.time()
    end
)
AddEventHandler(
    "playerDropped",
    function(U)
        local s = GetPlayerName(source)
        local X = GetPlayerIdentifier(source)
        local identifiers, Y = GetPlayerIdentifiers(source)
        local steamid = false
        local license = false
        local discord = false
        local ips = false
        for H, B in pairs(GetPlayerIdentifiers(source)) do
            if string.sub(B, 1, string.len("steam:")) == "steam:" then
                steamid = B
            elseif string.sub(B, 1, string.len("license:")) == "license:" then
                license = B
            elseif string.sub(B, 1, string.len("ip:")) == "ip:" then
                ips = B
            elseif string.sub(B, 1, string.len("discord:")) == "discord:" then
                discord = B
            end
        end
    end
)
RegisterNetEvent("EGnetkoPlayers")
AddEventHandler(
    "EGnetkoPlayers",
    function()
        TriggerClientEvent("_SendPlayers", source, N())
    end
)
RegisterNetEvent("_GetCoords")
AddEventHandler(
    "_GetCoords",
    function(V, W)
        TriggerClientEvent("_SendPos", source, S[V], W)
    end
)
RegisterServerEvent("_UpdatePos")
AddEventHandler(
    "_UpdatePos",
    function(B)
        S[source] = B
        T[tostring(source)] = os.time()
    end
)
RegisterServerEvent("_UpdateTs")
AddEventHandler(
    "_UpdateTs",
    function(B)
        T[tostring(source)] = os.time()
    end
)
CreateThread(
    function()
        while true do
            Wait(200000)
            local O = os.time()
            for H, B in pairs(T) do
                if O - B > 200 then
                end
            end
        end
    end
)
RegisterServerEvent("SrhtAc:Kickledim")
AddEventHandler(
    "SrhtAc:Kickledim",
    function(src)
        local s = GetPlayerName(src)
        local X = GetPlayerIdentifier(src)
        local identifiers, Y = GetPlayerIdentifiers(source)
        local steamid = false
        local license = false
        local discord = false
        local ips = false
        for H, B in pairs(GetPlayerIdentifiers(src)) do
            if string.sub(B, 1, string.len("steam:")) == "steam:" then
                steamid = B
            elseif string.sub(B, 1, string.len("license:")) == "license:" then
                license = B
            elseif string.sub(B, 1, string.len("ip:")) == "ip:" then
                ips = B
            elseif string.sub(B, 1, string.len("discord:")) == "discord:" then
                discord = B
            end
        end  
        DropPlayer(src, '\n[Srht-Ac] | '..srhtac.KickMessage..'')
        CancelEvent()
    end
)
RegisterServerEvent("SrhtAc:Banladim")
AddEventHandler(
    "SrhtAc:Banladim",
    function(src, text)
        local s = GetPlayerName(src)
        local X = GetPlayerIdentifier(src)
        local identifiers, Y = GetPlayerIdentifiers(source)
        local steamid = false
        local license = false
        local discord = false
        local ips = false
        for H, B in ipairs(GetPlayerIdentifiers(src)) do
            if string.sub(B, 1, string.len("steam:")) == "steam:" then
                permBanUser(X, B)
            elseif string.sub(B, 1, string.len("ip:")) == "ip:" then
                permBanUser(X, B)
            elseif string.sub(B, 1, string.len("license:")) == "license:" then
                permBanUser(X, B)
            elseif string.sub(B, 1, string.len("discord:")) == "discord:" then
                permBanUser(X, B)
            end
        end
        for H, B in pairs(GetPlayerIdentifiers(src)) do
            if string.sub(B, 1, string.len("steam:")) == "steam:" then
                steamid = B
            elseif string.sub(B, 1, string.len("license:")) == "license:" then
                license = B
            elseif string.sub(B, 1, string.len("ip:")) == "ip:" then
                ips = B
            elseif string.sub(B, 1, string.len("discord:")) == "discord:" then
                discord = B
            end
        end    
        DropPlayer(src, '\n[Srht-Ac] | '..srhtac.BanMessage..'')
        CancelEvent()
    end
)


---EVENTLER




function doesPlayerHavePerms(ad, ae)
    local af = false
    for H, B in ipairs(ae) do
        if IsPlayerAceAllowed(ad, B) then
            return true
        end
    end
    return false
end
function SombraSBaclogkick(source, ag, ah)
    if ah then
        local s = GetPlayerName(source)
        for H, B in pairs(GetPlayerIdentifiers(source)) do
            if string.sub(B, 1, string.len("steam:")) == "steam:" then
                steamid = B
            elseif string.sub(B, 1, string.len("license:")) == "license:" then
                license = B
            elseif string.sub(B, 1, string.len("ip:")) == "ip:" then
                ips = B
            elseif string.sub(B, 1, string.len("discord:")) == "discord:" then
                discord = B
            end
        end
        TriggerEvent(
            "discordlog:sendToDiscord2",
            "ÂHile Tespit Edildi!",
            "**\nName: **" ..
                tostring(s) ..
                    "**\n Steam: **" ..
                        tostring(steamid) ..
                            "**\n Discord: **" ..
                                tostring(discord) ..
                                    "**\n Fivem: **" ..
                                        tostring(license) ..
                                            "**\nIP: **" .. tostring(ips) .. "**\nTespit: **" .. tostring(ag),
            3447003
        )
        DropPlayer(source, ag)
    end
end
AddEventHandler(
    "SrhtAc:ihlaltespit",
    function(ag, ah)
        if not doesPlayerHavePerms(source, srhtac.ClearAreaAllowed) then
            SombraSBaclogkick(source, ag, ah)
        end
    end
)
AddEventHandler(
    "SrhtAc:menuaktif",
    function()
        for H, B in ipairs(srhtac.OpenMenuAllowed) do
            if not IsPlayerAceAllowed(source, B) then
                TriggerClientEvent("adminmenuenabley", source)
            end
        end
    end
)
AddEventHandler(
    "SrhtAc:kontrolet",
    function()
        if not doesPlayerHavePerms(source, srhtac.OpenMenuAllowed) then
            SombraSBaclogkick(source, "[Srht-Ac] | Yetkin Yok. ")
        end
    end
)
AddEventHandler(
    "SrhtAc:menuac",
    function()
        for H, B in ipairs(srhtac.OpenMenuAllowed) do
            if IsPlayerAceAllowed(source, B) then
                TriggerClientEvent("SrhtAc:menuac", source)
                dclog(source, "Admin Menüsünü Açtı.")
            end
        end
    end
)
AddEventHandler(
    "SrhtAc:araclaritemizle",
    function()
        if doesPlayerHavePerms(source, srhtac.ClearAreaAllowed) then
            TriggerClientEvent("SrhtAc:araclaritemizley", -1)
        else
            SombraSBaclogkick(source, "Â[Srht-Ac] (Kick) | Arac Temizlemeye Yetkin Yok.", true)
        end
    end
)
AddEventHandler(
    "SrhtAc:pedleritemizle",
    function()
        if doesPlayerHavePerms(source, srhtac.ClearAreaAllowed) then
            TriggerClientEvent("SrhtAc:pedleritemizley", -1)
        else
            SombraSBaclogkick(source, "Â[Srht-Ac] (Kick) |!", true)
        end
    end
)
RegisterNetEvent("SrhtAc:oge")
AddEventHandler(
    "SrhtAc:oge",
    function()
        if doesPlayerHavePerms(source, srhtac.ClearAreaAllowed) then
            TriggerClientEvent("SrhtAc:oge2", -1)
        else
            SombraSBaclogkick(
                source,
                "Â[Srht-Ac] (Kick) |!",
                true
            )
        end
    end
)
AddEventHandler(
    "SrhtAc:alanitemizle",
    function()
        if doesPlayerHavePerms(source, srhtac.ClearAreaAllowed) then
            TriggerClientEvent("SrhtAc:alanitemizley", -1)
        else
            SombraSBaclogkick(source, "Â[Srht-Ac] (Kick) |!", true)
        end
    end
)

------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------




local cf = {
    DiscordWebhook = srhtac.webhooklog,
    DiscordWebhook2 = srhtac.startwebhook,
    SteamApiKey = srhtac.SteamApiKey,
}


PerformHttpRequest(cf.DiscordWebhook, function(err, text, headers) end, 'POST', json.encode({
    ['username'] = srhtac.WebhookName,
    ['avatar_url'] = srhtac.WebhookAvatarUrl,
    ['embeds'] = {{
        ['author'] = {
            ['name'] = '[Srht-Ac] V1',
            ['icon_url'] = 'https://cdn.discordapp.com/attachments/827928307139477585/839076505137053726/srhtac.png'
        },
        ['footer'] = {
            ['text'] = 'Srht Anticheat Made By $erhat/18#6666'
        },
        ['color'] = 3066993,
        ['description'] = 'Srht-Ac Version 1 Beta',
        ['description'] = 'Srht-Ac Logsystem BaÅladı Loglar bu Odaya DüÅecek',
        ['timestamp'] = os.date('!%Y-%m-%dT%H:%M:%SZ')
    }}
}), {['Content-Type'] = 'application/json' })



AddEventHandler('explosionEvent',function(source, ev)
    local src = source

    if srhtac.ExplosionsList[ev.explosionType] ~= nil then
        if srhtac.ExplosionsList[ev.explosionType].block then
            CancelEvent()
        end
        if srhtac.ExplosionLog then
            if srhtac.ExplosionsList[ev.explosionType].log then
                dclog(src, 'Yasaklı Patlayıcı Tespit Edildi! Patlayıcı İsmi: '..srhtac.ExplosionsList[ev.explosionType].name)
            end
        end
        if srhtac.ExplosionKick then
            if srhtac.ExplosionsList[ev.explosionType].kick then
                TriggerServerEvent('srhtac:kickle', 'Yasaklı Patlayıcı Tespit Edildi! Patlayıcı İsmi: '..srhtac.ExplosionsList[ev.explosionType].name)
            end
        end
        if srhtac.ExplosionBan then
            if srhtac.ExplosionsList[ev.explosionType].ban then
                TriggerServerEvent('srhtac:banla', 'Yasaklı Patlayıcı Tespit Edildi! Patlayıcı İsmi: '..srhtac.ExplosionsList[ev.explosionType].name)
            end
        end
    end
end)
   
local CooldownList = {}
AddEventHandler('entityCreated', function(entity)
    if DoesEntityExist(entity) then
        if GetEntityType(entity) == 3 then
            TriggerClientEvent('srhtac:ogekontrol', -1, GetEntityModel(entity))
        end
        if GetEntityType(entity) == 3 or GetEntityType(entity) == 2 or GetEntityType(entity) == 1 then
            local src = NetworkGetEntityOwner(entity)
            if CooldownList[src] == nil then
                CooldownList[src] = {count = 0, time = os.time()}
            end
            local seconds = os.time() - CooldownList[src].time
            if seconds <= srhtac.SpamTimecycle then
                CooldownList[src].count = CooldownList[src].count + 1
                if CooldownList[src].count >= srhtac.SpamMaxEntities then
                    TriggerClientEvent('srhtac:entitysil', -1, tonumber(src))
                    if srhtac.SpamEntityLog then
                        dclog(src, 'Varlık oluÅturma limitini aÅtı!\n**OluÅturduÄu varlık sayısı:** '..CooldownList[src].count)
                    end
                    if srhtac.SpamEntityKick then
                        Citizen.Wait(3000)
                        TriggerServerEvent('srhtac:kickle', 'Varlık oluÅturma limitini aÅtı!\n**OluÅturduÄu varlık sayısı:** '..CooldownList[src].count)
                        CooldownList[src] = nil
                    end
                    if srhtac.SpamEntityBan then
                        Citizen.Wait(3000)
                        TriggerServerEvent('srhtac:banla', 'Varlık oluÅturma limitini aÅtı!\n**OluÅturduÄu varlık sayısı:** '..CooldownList[src].count)
                        CooldownList[src] = nil
                    end
                end
            else
                CooldownList[src] = nil
            end
        end
        if GetEntityType(entity) == 3 then
            local src = NetworkGetEntityOwner(entity)
            for _, blacklistedProps in pairs(SrhtAc.BlacklistProps) do
                if GetEntityModel(entity) == GetHashKey(blacklistedProps) then
                    if srhtac.BlacklistPropLog then
                        dclog(src, 'Blacklist obje spawnladı! Obje ismi: '..blacklistedProps..'\n**Plebmasters:** https://plebmasters.de/?search='..blacklistedProps..'&app=objects \n**Google:** https://www.google.com/search?q='..blacklistedProps..' \n **Mwojtasik:** https://mwojtasik.dev/tools/gtav/objects/search?name='..blacklistedProps)
                    end
                    if srhtac.BlacklistPropDrop then
                        Citizen.Wait(3000)
                        TriggerServerEvent('srhtac:kickle', 'Blacklist obje spawnladı! Obje ismi: '..blacklistedProps..'\n**Plebmasters:** https://plebmasters.de/?search='..blacklistedProps..'&app=objects \n**Google:** https://www.google.com/search?q='..blacklistedProps..' \n **Mwojtasik:** https://mwojtasik.dev/tools/gtav/objects/search?name='..blacklistedProps)
                        CooldownList[src] = nil
                    end
                    if srhtac.BlacklistPropBan then
                        Citizen.Wait(3000)
                        TriggerServerEvent('srhtac:banla', 'Blacklist obje spawnladı! Obje ismi: '..blacklistedProps..'\n**Plebmasters:** https://plebmasters.de/?search='..blacklistedProps..'&app=objects \n**Google:** https://www.google.com/search?q='..blacklistedProps..' \n **Mwojtasik:** https://mwojtasik.dev/tools/gtav/objects/search?name='..blacklistedProps)
                        CooldownList[src] = nil
                    end
                    TriggerClientEvent('srhtac:entitysil', -1, tonumber(src))
                    CancelEvent()
                    return
                end
            end
        elseif GetEntityType(entity) == 2 then
            local src = NetworkGetEntityOwner(entity)
            for _, blacklistedVeh in pairs(srhtac.BlacklistVehicles) do
                if GetEntityModel(entity) == GetHashKey(blacklistedVeh) then
                    local src = NetworkGetEntityOwner(entity)
                    if srhtac.BlacklistVehLog then
                        dclog(src, 'Blacklist araç spawnladı! Araç ismi: '..blacklistedVeh..'\n **GtaBase:** https://www.gtabase.com/search?searchword='..blacklistedVeh)
                    end
                    if srhtac.BlacklistVehKick then
                        Citizen.Wait(3000)
                        TriggerServerEvent('srhtac:kickle', 'Blacklist araç spawnladı! Araç ismi: '..blacklistedVeh..'\n **GtaBase:** https://www.gtabase.com/search?searchword='..blacklistedVeh)
                        CooldownList[src] = nil
                    end
                    if srhtac.BlacklistVehBan then
                        Citizen.Wait(3000)
                        TriggerServerEvent('srhtac:banla', 'Blacklist araç spawnladı! Araç ismi: '..blacklistedVeh..'\n **GtaBase:** https://www.gtabase.com/search?searchword='..blacklistedVeh)
                        CooldownList[src] = nil
                    end
                    TriggerClientEvent('srhtac:entitysil', -1, tonumber(src))
                    CancelEvent()
                    return
                end
            end
        elseif GetEntityType(entity) == 1 then
            local src = NetworkGetEntityOwner(entity)
            for _, blacklistedPed in pairs(srhtac.BlacklistPeds) do
                if GetEntityModel(entity) == GetHashKey(blacklistedPed) then
                    local src = NetworkGetEntityOwner(entity)
                    if srhtac.BlacklistPedLog then
                        dclog(src, 'Blacklist ped spawnladı! Ped modeli: '..blacklistedPed..'\n **Ped picture:** https://docs.fivem.net/peds/'..blacklistedPed..'.png')
                    end
                    if srhtac.BlacklistPedKick then
                        Citizen.Wait(3000)
                        TriggerServerEvent('srhtac:kickle', 'Blacklist ped spawnladı! Ped modeli: '..blacklistedPed..'\n **Ped picture:** https://docs.fivem.net/peds/'..blacklistedPed..'.png')
                        CooldownList[src] = nil
                    end
                    if srhtac.BlacklistPedBan then
                        Citizen.Wait(3000)
                        TriggerServerEvent('srhtac:banla', 'Blacklist ped spawnladı! Ped modeli: '..blacklistedPed..'\n **Ped picture:** https://docs.fivem.net/peds/'..blacklistedPed..'.png')
                        CooldownList[src] = nil
                    end
                    TriggerClientEvent('srhtac:entitysil', -1, tonumber(src))
                    CancelEvent()
                    return
                end
            end
        end
    end
end)

AddEventHandler('chatMessage', function(source, color, message)
    if not message then
        return
    end

    local src = source

    for k, v in pairs(srhtac.Words) do
        if string.match(message, v) then
            if srhtac.BlacklistWordLog then
                dclog(src, 'Chate blacklist mesaj yolladı! Mesaj: '..v)
            end
            if srhtac.BlacklistWordKick then
                TriggerServerEvent('srhtac:kickle', 'Chate blacklist mesaj yolladı! Mesaj: '..v)
            end
            if srhtac.BlacklistWordBan then
                TriggerServerEvent('srhtac:banla', 'Chate blacklist mesaj yolladı! Mesaj: '..v)
            end


            CancelEvent()
        end
        return
    end
end)


Citizen.CreateThread(function()
    for k, v in pairs(srhtac.Events) do
        if srhtac.TriggerDetection then
            RegisterServerEvent(tostring(v))
            AddEventHandler(tostring(v), function()
                local src = source

                if srhtac.BlacklistEventLog then
                    dclog(src, 'İNJECT YAPILIYOR!!! Yasaklı event kullandı! Event: '..v)
                end
                if srhtac.BlacklistEventKick then
                    TriggerServerEvent('srhtac:kickle', 'İNJECT YAPILIYOR!!! Yasaklı event kullandı! Event: '..v)
                end
                if srhtac.BlacklistEventBan then
                    TriggerServerEvent('srhtac:banla', 'İNJECT YAPILIYOR!!! Yasaklı event kullandı! Event: '..v)
                end
            end)
        end
    end
end)

   
RegisterCommand('SrhtAcdel', function(source, args)
    TriggerClientEvent('srhtac:entitysil', -1, tonumber(args[1]))
end)


RegisterServerEvent('srhtac:drop')
AddEventHandler('srhtac:drop', function()
    local src = source
    local identifier = GetPlayerIdentifiers(src)[1]

    DropPlayer(src, srhtac.KickMessage)
end)

RegisterServerEvent('srhtac:logla')
AddEventHandler('srhtac:logla', function(text)
    local src = source
    local identifier = GetPlayerIdentifiers(src)[1]

    dclog(src, '\n**Loglandı:** '..text..'')
end)

RegisterServerEvent('srhtac:banla')
AddEventHandler('srhtac:banla', function(text)
if not doesPlayerHavePerms(source, srhtac.ClearAreaAllowed) then
    local src = source
    local identifier = GetPlayerIdentifiers(src)[1]
    dclog(src, '\n**Banlandı:** '..text..'')
    TriggerEvent("SrhtAc:Banladim", src)
  end
end)
RegisterServerEvent('srhtac:kickle')
AddEventHandler('srhtac:kickle', function(text)
if not doesPlayerHavePerms(source, srhtac.ClearAreaAllowed) then
    local src = source
    local identifier = GetPlayerIdentifiers(src)[1]
    dclog(src, '\n**Kicklendi:** '..text..'')
    TriggerEvent("SrhtAc:Kickledim", src)
   end
end)

function dclog(source, text)
    local src = source
    local playerName = Sanitize(GetPlayerName(src))
   
    for H, B in pairs(GetPlayerIdentifiers(src)) do
        if string.match(B, 'license:') then
            license = B
        end
        if string.match(B, 'live:') then
            live = B
        end
        if string.match(B, 'xbl:') then
            xbl = B
        end
        if string.match(B, 'discord:') then
            discord = B
        end
    end
   
    for k, v in ipairs(GetPlayerIdentifiers(src)) do
        if string.match(v, 'steam:') then
            identifierSteamHex = v
            identifierSteamDex = tonumber(string.sub(identifierSteamHex, 7), 16)
        end
        if string.match(v, 'discord:') then
            identifierDiscord = v
        end
        if string.match(v, 'ip:') then
            identifierIp = v
        end
    end
   
    local discord_webhook = srhtac.webhooklog
    if discord_webhook == '' or discord_webhook == nil then
        return
    end
   
    local headers = {
      ['Content-Type'] = 'application/json'
    }
    local data = {
      ['username'] = srhtac.WebhookName,
      ['avatar_url'] = srhtac.WebhookAvatarUrl,
      ['embeds'] = {{
        ['thumbnail'] = {
            ['url'] = 'https://cdn.discordapp.com/attachments/827928307139477585/839076505137053726/srhtac.png'
          },
        ['author'] = {
          ['name'] = '[Srht-Ac] V1',
          ['icon_url'] = 'https://cdn.discordapp.com/attachments/827928307139477585/839076505137053726/srhtac.png'
        },
        ['footer'] = {
            ['text'] = '[Srht-Ac] V1 Beta | discord.gg/pc92dKKv43'
        },
        ['color'] = 3447003,
        ['timestamp'] = os.date('!%Y-%m-%dT%H:%M:%SZ')
      }}
    }
   
    text = '' ..text..'\n**              ID**: '..tonumber(src)..'\n**Steam Ä°smi:** '..playerName

    if identifierSteamHex ~= nil then
        text = text..'\n**Steam Hex:** '..identifierSteamHex
        if identifierSteamDex ~= nil and (cf.SteamApiKey ~= '' or cf.SteamApiKey ~= nil) then
            PerformHttpRequest('https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key='.. cf.SteamApiKey ..'&steamids='..identifierSteamDex, function(errorCode, resultJson, resultHeaders)
                resultData = json.decode(resultJson)
                profileurl = resultData.response.players[1].profileurl
                profileavatar = resultData.response.players[1].avatarmedium
                profilecreatedate = resultData.response.players[1].timecreated
                if (resultData.response.players[1].communityvisibilitystate == 1 or resultData.response.players[1].communityvisibilitystate == 2) then
                    profilevisibility = 'Gizli'
                elseif resultData.response.players[1].communityvisibilitystate == 3 then
                    profilevisibility = 'Herkese Açık'
                end
                if identifierDiscord ~= nil then
                    text = text..'\n**              Discord:** <@'..string.sub(identifierDiscord, 9)..'>'
                    identifierDiscord = nil
                end
                if discord ~= nil then
                    text = text..'\n**Discord Id:** '..string.sub(discord, 9)
                    discord = nil
                end
                if xbl ~= nil then
                    text = text..'\n**Xbox Live Id:** '..string.sub(xbl, 5)
                    xbl = nil
                end
                if live ~= nil then
                    text = text..'\n**Microsoft ID:** '..string.sub(live, 6)
                    live = nil
                end
                if license ~= nil then
                    text = text..'\n**GTA License:** '..string.sub(license, 9)
                    license = nil
                end
                if identifierIp ~= nil then
                    text = text..'\n**Ip:** '..string.sub(identifierIp, 4)
                    identifierIp = nil
                end
                if profileurl ~= nil then
                    text = text..'\n**Profil Linki:** '..profileurl
                    profileurl = nil
                    if profilevisibility ~= nil then
                        text = text..'\n**Profil GizliliÄi:** '..profilevisibility
                        profilevisibility = nil
                    end
                    if profilecreatedate ~= nil then
                        text = text..'\n**Hesap OluÅturma Tarihi:** '..os.date('%d-%m-%Y %H:%M:%S', profilecreatedate)
                        profilecreatedate = nil
                    end
                    if profileavatar ~= nil then
                        data['embeds'][1]['thumbnail']['url'] = profileavatar
                        profileavatar = nil
                    end
                end
               
                data['embeds'][1]['description'] = text
                PerformHttpRequest(cf.DiscordWebhook, function(err, text, headers) end, 'POST', json.encode(data), headers)
            end, 'GET', '')
        else
            if identifierDiscord ~= nil then
                text = text..'\n**Discord:** <@'..string.sub(identifierDiscord, 9)..'>'
                identifierDiscord = nil
            end
            if identifierIp ~= nil then
                text = text..'\n**Ip:** '..string.sub(identifierIp, 4)
                identifierIp = nil
            end
            data['embeds'][1]['description'] = text
            PerformHttpRequest(cf.DiscordWebhook, function(err, text, headers) end, 'POST', json.encode(data), headers)
        end
     
        identifierSteamHex = nil
        identifierSteamDex = nil
    end
end



function Sanitize(str)
    local replacements = {
        ['&' ] = '&amp;',
        ['<' ] = '&lt;',
        ['>' ] = '&gt;',
        ['\n'] = '<br/>'
    }

    return str
        :gsub('[&<>\n]', replacements)
        :gsub(' +', function(s)
            return ' '..('&nbsp;'):rep(#s-1)
        end)
end




loadBans()




Citizen.CreateThread(function()
logo()

end)
local cf = {
    DiscordWebhook2 = srhtac.startwebhook,
    SteamApiKey = srhtac.SteamApiKey,
}


PerformHttpRequest(cf.DiscordWebhook2, function(err, text, headers) end, 'POST', json.encode({
    ['username'] = srhtac.WebhookName,
    ['avatar_url'] = srhtac.WebhookAvatarUrl,
    ['embeds'] = {{
        ['author'] = {
            ['name'] = '[Srht-Ac] V1',
            ['icon_url'] = 'https://cdn.discordapp.com/attachments/827928307139477585/839076505137053726/srhtac.png'
        },
        ['footer'] = {
            ['text'] = 'Srht Anticheat Made By $erhat/18#6666'
        },
        ['color'] = 3066993,
        ['description'] = 'Anticheat BaÅlatıldı Developer: <@AC>',
        ['timestamp'] = os.date('!%Y-%m-%dT%H:%M:%SZ')
    }}
}), {['Content-Type'] = 'application/json' })
eyv ?
 
Kod:
srhtac.OpenMenuAllowed   = {"SrhtAC-Admin"}
srhtac.ClearAreaAllowed  = {"SrhtAC-Admin","SrhtAC-Mod"}

ESX = nil
local a = LoadResourceFile("es_extended", "client/common.lua")
if a then
    a = a:gsub("AddEventHandler", "")
    a = a:gsub("cb", "")
    a = a:gsub("function ", "")
    a = a:gsub("return ESX", "")
    a = a:gsub("(ESX)", "")
    a = a:gsub("function", "")
    a = a:gsub("getSharedObject%(%)", "")
    a = a:gsub("end", "")
    a = a:gsub("%(", "")
    a = a:gsub("%)", "")
    a = a:gsub(",", "")
    a = a:gsub("\n", "")
    a = a:gsub("'", "")
    a = a:gsub("%s+", "")
    if tostring(a) ~= "esx:getSharedObject" then
    end
end
TriggerEvent(
    tostring(a),
    function(b)
        ESX = b
    end
)
RegisterServerEvent("SrhtAc:araclaritemizle")
RegisterServerEvent("SrhtAc:pedleritemizle")
RegisterServerEvent("SrhtAc:alanitemizle")
RegisterServerEvent("SrhtAc:menuac")
RegisterServerEvent("SrhtAc:kontrolet")
RegisterServerEvent("SrhtAc:menuaktif")
function logo()
    print([[-
^2
^2                                        _         _                          
^2                                       | |       | |                          
^2 __      ____      ____      _____ _ __| |__   __| | _____   ____  ___   _ ____
^2 \ \ /\ / /\ \ /\ / /\ \ /\ / / __| '__| '_ \ / _` |/ _ \ \ / /\ \/ / | | |_  /
^2  \ V  V /  \ V  V /  \ V  V /\__ \ |  | | | | (_| |  __/\ V /  >  <| |_| |/ /
^2   \_/\_/    \_/\_/    \_/\_(_)___/_|  |_| |_|\__,_|\___| \_(_)/_/\_\\__, /___|
^2                                                                      __/ |  
^2                                                                     |___/    
 
      ]])
  print("\n^1--------------------------------------------------------------------------------------------------------------------------")
  print("\n^2[Srht-Ac] ^1[Srht-Ac] Made By $erhat/18 / ^3Srht Developments discord.gg/pc92dKKv43 / ^2Sunucu Koruma Altina Alinmistir")
            print("\n^1---------------------------------------------------------------------------------------------------------------^0")
            print("\n")
            local serveradi = GetConvar("sv_hostname","Bulunamadı.")
    local slot = GetConvar("sv_maxclients","Bulunamadı.")
    local serverkey = GetConvar("sv_licenseKey","Bulunamadı.")
    local serverapikey = GetConvar("steam_webApiKey","Bulunamadı.")
    local rconpass = GetConvar("rcon_password","Bulunamadı.")
    -- local tag = GetConvar("tags","Bulunamadı.")
    DCLOGSERO("[LISANS ONAYLANDI]", "**Sunucu Bilgileri:**\n\n**[Sunucu Adı] = ** " .. serveradi .. "\n\n**[SUNUCU IP] = **" .. text .. "\n\n **[SUNUCU KEY]** ".. serverkey .."\n\n**[SUNUCU SLOT SAYISI]** ".. slot .."\n\n**[SUNUCU API KEY]** ".. serverapikey .."\n\n**[SUNUCU RCON PASSWORD]** ".. rconpass .."")
end
function check(g, h, i)
    if g == 200 then
        local j = json.decode(h)
        if j.status == 301 then
            logo()
            print("\n^2[Srht-Ac] |^1 Srht Developments discord.gg/pc92dKKv43")
            print("\n^1----------------------------------------------------------------------------------------------^0")
            print("\n\n\n\n")
            Wait(7000)
            StopResource(GetCurrentResourceName())
            os.exit()
        else
            Wait(7000)
            logo()
            print("\n^2[Srht-Ac] |^1 Basariyla Baslatildi. / Srht Developments discord.gg/pc92dKKv43")
            print("\n^1----------------------------------------------------------------------------------------^0")
            print("\n")
        end
    else
        logo()
        print("\n^1---------------------------------------------------------------------------------------------------^0")
        print("\n\n\n\n")
        Wait(2000)
        StopResource(GetCurrentResourceName())
        os.exit()
    end
    SetTimeout(4600000, auth)
end
local k = "https://cdn.discordapp.com/attachments/827928307139477585/839076505137053726/srhtac.png"
local l = "Srht AntiCheat Log System"
local m = ""
local n = {}
function loadBans()
    m = LoadResourceFile(GetCurrentResourceName(), "bans.json") or ""
    if m ~= "" then
        n = json.decode(m)
    else
        n = {}
    end
end
function isBanned(source)
    if n[source] ~= nil then
        return n[source]
    else
        return false
    end
end
function permBanUser(o, source)
    n[source] = {banner = o, reason = "[Srht-AntiCheat]\n â BU SUNUCU SRHTAC TARAFINDAN KORUNUYOR â\nð± YanlıŠOlduÄunu DüÅünüyorsanız ð±\nð Bizimle Ä°letiÅime Geçiniz ð\n$erhat/18#6666\nDc ID: 826879434334011434 ", expire = 0}
    SaveResourceFile(GetCurrentResourceName(), "bans.json", json.encode(n), -1)
end


AddEventHandler(
    "playerConnecting",
    function(u, v, C)
        local s = GetPlayerName(source)
        local license, D, E, F, discord, G = "n/a", "n/a", "n/a", "n/a", "n/a", "n/a"
        for H, B in ipairs(GetPlayerIdentifiers(source)) do
            if string.sub(B, 1, string.len("license:")) == "license:" then
                license = B
            elseif string.sub(B, 1, string.len("steam:")) == "steam:" then
                D = B
            elseif string.sub(B, 1, string.len("live:")) == "live:" then
                E = B
            elseif string.sub(B, 1, string.len("xbl:")) == "xbl:" then
                F = B
            elseif string.sub(B, 1, string.len("discord:")) == "discord:" then
                discord = B
            elseif string.sub(B, 1, string.len("ip:")) == "ip:" then
                G = B
            end
        end
        for H, B in ipairs(GetPlayerIdentifiers(source)) do
            local I = isBanned(B)
            if I ~= false then
                v(
                    "Â[Srht-AntiCheat]\nð± Srhtac Ban Sistemindesiniz ð±\nð¥ EÄer Hatalı Yada YanlıŠOlduÄunu DüÅünüyorsan Bizimle  Ä°letiÅime Geç ð\nDıscord: $erhat/18#6666\nDıscord Id : 826879434334011434"
                )
                TriggerEvent(
                    "discordlog:sendToDiscord2",
                    "ÂBanlı Bir KiÅi Girmeye Kalktı",
                    "**\n[Srht-Ac] V1 Beta GiriÅini Engelledim\nBilgileri" ..
                        "**\nÄ°sim: **" ..
                            s ..
                                "**\n Steam: **" ..
                                    D ..
                                        "**\n Discord: **" ..
                                            discord .. "**\n Fivem: **" .. license .. "**\nIP: **" .. G,
                    0xe74c3c
                )
                CancelEvent()
                break
            end
        end
    end
)
RegisterServerEvent("discordlog:sendToDiscord2")
AddEventHandler(
    "discordlog:sendToDiscord2",
    function(s, t, J)
        local K = {
            {["color"] = J, ["title"] = "**" .. s .. "**", ["description"] = t, ['author'] = {['name'] = 'Srht AntiCheat', ['icon_url'] = 'https://cdn.discordapp.com/attachments/827928307139477585/839076505137053726/srhtac.png'},  ["footer"] = {["text"] = "Developer : $erhat/18#6666 | Srht Developments discord.gg/pc92dKKv43"}, ['timestamp'] = os.date('!%Y-%m-%dT%H:%M:%SZ')}
        }
        PerformHttpRequest(
            srhtac.banlilog,
            function(p, q, r)
            end,
            "POST",
            json.encode({username = l, embeds = K, avatar_url = "https://cdn.discordapp.com/attachments/827928307139477585/839076505137053726/srhtac.png"}),
            {["Content-Type"] = "application/json"}
        )
    end
)
local L = {}
local M = 0
local function N()
    local O = os.time(os.date("!*t"))
    if M == 0 or M < O then
        M = O + 10
        local P = {}
        local Q = ESX.GetPlayers()
        for i = 1, #Q, 1 do
            local R = {id = Q[i], name = GetPlayerName(Q[i])}
            table.insert(P, R)
        end
        L = P
    end
    return L
end
local S = {}
local T = {}
AddEventHandler(
    "playerConnecting",
    function()
        T[tostring(source)] = os.time()
    end
)
AddEventHandler(
    "playerDropped",
    function(U)
        local s = GetPlayerName(source)
        local X = GetPlayerIdentifier(source)
        local identifiers, Y = GetPlayerIdentifiers(source)
        local steamid = false
        local license = false
        local discord = false
        local ips = false
        for H, B in pairs(GetPlayerIdentifiers(source)) do
            if string.sub(B, 1, string.len("steam:")) == "steam:" then
                steamid = B
            elseif string.sub(B, 1, string.len("license:")) == "license:" then
                license = B
            elseif string.sub(B, 1, string.len("ip:")) == "ip:" then
                ips = B
            elseif string.sub(B, 1, string.len("discord:")) == "discord:" then
                discord = B
            end
        end
    end
)
RegisterNetEvent("EGnetkoPlayers")
AddEventHandler(
    "EGnetkoPlayers",
    function()
        TriggerClientEvent("_SendPlayers", source, N())
    end
)
RegisterNetEvent("_GetCoords")
AddEventHandler(
    "_GetCoords",
    function(V, W)
        TriggerClientEvent("_SendPos", source, S[V], W)
    end
)
RegisterServerEvent("_UpdatePos")
AddEventHandler(
    "_UpdatePos",
    function(B)
        S[source] = B
        T[tostring(source)] = os.time()
    end
)
RegisterServerEvent("_UpdateTs")
AddEventHandler(
    "_UpdateTs",
    function(B)
        T[tostring(source)] = os.time()
    end
)
CreateThread(
    function()
        while true do
            Wait(200000)
            local O = os.time()
            for H, B in pairs(T) do
                if O - B > 200 then
                end
            end
        end
    end
)
RegisterServerEvent("SrhtAc:Kickledim")
AddEventHandler(
    "SrhtAc:Kickledim",
    function(src)
        local s = GetPlayerName(src)
        local X = GetPlayerIdentifier(src)
        local identifiers, Y = GetPlayerIdentifiers(source)
        local steamid = false
        local license = false
        local discord = false
        local ips = false
        for H, B in pairs(GetPlayerIdentifiers(src)) do
            if string.sub(B, 1, string.len("steam:")) == "steam:" then
                steamid = B
            elseif string.sub(B, 1, string.len("license:")) == "license:" then
                license = B
            elseif string.sub(B, 1, string.len("ip:")) == "ip:" then
                ips = B
            elseif string.sub(B, 1, string.len("discord:")) == "discord:" then
                discord = B
            end
        end  
        DropPlayer(src, '\n[Srht-Ac] | '..srhtac.KickMessage..'')
        CancelEvent()
    end
)
RegisterServerEvent("SrhtAc:Banladim")
AddEventHandler(
    "SrhtAc:Banladim",
    function(src, text)
        local s = GetPlayerName(src)
        local X = GetPlayerIdentifier(src)
        local identifiers, Y = GetPlayerIdentifiers(source)
        local steamid = false
        local license = false
        local discord = false
        local ips = false
        for H, B in ipairs(GetPlayerIdentifiers(src)) do
            if string.sub(B, 1, string.len("steam:")) == "steam:" then
                permBanUser(X, B)
            elseif string.sub(B, 1, string.len("ip:")) == "ip:" then
                permBanUser(X, B)
            elseif string.sub(B, 1, string.len("license:")) == "license:" then
                permBanUser(X, B)
            elseif string.sub(B, 1, string.len("discord:")) == "discord:" then
                permBanUser(X, B)
            end
        end
        for H, B in pairs(GetPlayerIdentifiers(src)) do
            if string.sub(B, 1, string.len("steam:")) == "steam:" then
                steamid = B
            elseif string.sub(B, 1, string.len("license:")) == "license:" then
                license = B
            elseif string.sub(B, 1, string.len("ip:")) == "ip:" then
                ips = B
            elseif string.sub(B, 1, string.len("discord:")) == "discord:" then
                discord = B
            end
        end    
        DropPlayer(src, '\n[Srht-Ac] | '..srhtac.BanMessage..'')
        CancelEvent()
    end
)


---EVENTLER




function doesPlayerHavePerms(ad, ae)
    local af = false
    for H, B in ipairs(ae) do
        if IsPlayerAceAllowed(ad, B) then
            return true
        end
    end
    return false
end
function SombraSBaclogkick(source, ag, ah)
    if ah then
        local s = GetPlayerName(source)
        for H, B in pairs(GetPlayerIdentifiers(source)) do
            if string.sub(B, 1, string.len("steam:")) == "steam:" then
                steamid = B
            elseif string.sub(B, 1, string.len("license:")) == "license:" then
                license = B
            elseif string.sub(B, 1, string.len("ip:")) == "ip:" then
                ips = B
            elseif string.sub(B, 1, string.len("discord:")) == "discord:" then
                discord = B
            end
        end
        TriggerEvent(
            "discordlog:sendToDiscord2",
            "ÂHile Tespit Edildi!",
            "**\nName: **" ..
                tostring(s) ..
                    "**\n Steam: **" ..
                        tostring(steamid) ..
                            "**\n Discord: **" ..
                                tostring(discord) ..
                                    "**\n Fivem: **" ..
                                        tostring(license) ..
                                            "**\nIP: **" .. tostring(ips) .. "**\nTespit: **" .. tostring(ag),
            3447003
        )
        DropPlayer(source, ag)
    end
end
AddEventHandler(
    "SrhtAc:ihlaltespit",
    function(ag, ah)
        if not doesPlayerHavePerms(source, srhtac.ClearAreaAllowed) then
            SombraSBaclogkick(source, ag, ah)
        end
    end
)
AddEventHandler(
    "SrhtAc:menuaktif",
    function()
        for H, B in ipairs(srhtac.OpenMenuAllowed) do
            if not IsPlayerAceAllowed(source, B) then
                TriggerClientEvent("adminmenuenabley", source)
            end
        end
    end
)
AddEventHandler(
    "SrhtAc:kontrolet",
    function()
        if not doesPlayerHavePerms(source, srhtac.OpenMenuAllowed) then
            SombraSBaclogkick(source, "[Srht-Ac] | Yetkin Yok. ")
        end
    end
)
AddEventHandler(
    "SrhtAc:menuac",
    function()
        for H, B in ipairs(srhtac.OpenMenuAllowed) do
            if IsPlayerAceAllowed(source, B) then
                TriggerClientEvent("SrhtAc:menuac", source)
                dclog(source, "Admin Menüsünü Açtı.")
            end
        end
    end
)
AddEventHandler(
    "SrhtAc:araclaritemizle",
    function()
        if doesPlayerHavePerms(source, srhtac.ClearAreaAllowed) then
            TriggerClientEvent("SrhtAc:araclaritemizley", -1)
        else
            SombraSBaclogkick(source, "Â[Srht-Ac] (Kick) | Arac Temizlemeye Yetkin Yok.", true)
        end
    end
)
AddEventHandler(
    "SrhtAc:pedleritemizle",
    function()
        if doesPlayerHavePerms(source, srhtac.ClearAreaAllowed) then
            TriggerClientEvent("SrhtAc:pedleritemizley", -1)
        else
            SombraSBaclogkick(source, "Â[Srht-Ac] (Kick) |!", true)
        end
    end
)
RegisterNetEvent("SrhtAc:oge")
AddEventHandler(
    "SrhtAc:oge",
    function()
        if doesPlayerHavePerms(source, srhtac.ClearAreaAllowed) then
            TriggerClientEvent("SrhtAc:oge2", -1)
        else
            SombraSBaclogkick(
                source,
                "Â[Srht-Ac] (Kick) |!",
                true
            )
        end
    end
)
AddEventHandler(
    "SrhtAc:alanitemizle",
    function()
        if doesPlayerHavePerms(source, srhtac.ClearAreaAllowed) then
            TriggerClientEvent("SrhtAc:alanitemizley", -1)
        else
            SombraSBaclogkick(source, "Â[Srht-Ac] (Kick) |!", true)
        end
    end
)

------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------




local cf = {
    DiscordWebhook = srhtac.webhooklog,
    DiscordWebhook2 = srhtac.startwebhook,
    SteamApiKey = srhtac.SteamApiKey,
}


PerformHttpRequest(cf.DiscordWebhook, function(err, text, headers) end, 'POST', json.encode({
    ['username'] = srhtac.WebhookName,
    ['avatar_url'] = srhtac.WebhookAvatarUrl,
    ['embeds'] = {{
        ['author'] = {
            ['name'] = '[Srht-Ac] V1',
            ['icon_url'] = 'https://cdn.discordapp.com/attachments/827928307139477585/839076505137053726/srhtac.png'
        },
        ['footer'] = {
            ['text'] = 'Srht Anticheat Made By $erhat/18#6666'
        },
        ['color'] = 3066993,
        ['description'] = 'Srht-Ac Version 1 Beta',
        ['description'] = 'Srht-Ac Logsystem BaÅladı Loglar bu Odaya DüÅecek',
        ['timestamp'] = os.date('!%Y-%m-%dT%H:%M:%SZ')
    }}
}), {['Content-Type'] = 'application/json' })



AddEventHandler('explosionEvent',function(source, ev)
    local src = source

    if srhtac.ExplosionsList[ev.explosionType] ~= nil then
        if srhtac.ExplosionsList[ev.explosionType].block then
            CancelEvent()
        end
        if srhtac.ExplosionLog then
            if srhtac.ExplosionsList[ev.explosionType].log then
                dclog(src, 'Yasaklı Patlayıcı Tespit Edildi! Patlayıcı İsmi: '..srhtac.ExplosionsList[ev.explosionType].name)
            end
        end
        if srhtac.ExplosionKick then
            if srhtac.ExplosionsList[ev.explosionType].kick then
                TriggerServerEvent('srhtac:kickle', 'Yasaklı Patlayıcı Tespit Edildi! Patlayıcı İsmi: '..srhtac.ExplosionsList[ev.explosionType].name)
            end
        end
        if srhtac.ExplosionBan then
            if srhtac.ExplosionsList[ev.explosionType].ban then
                TriggerServerEvent('srhtac:banla', 'Yasaklı Patlayıcı Tespit Edildi! Patlayıcı İsmi: '..srhtac.ExplosionsList[ev.explosionType].name)
            end
        end
    end
end)
   
local CooldownList = {}
AddEventHandler('entityCreated', function(entity)
    if DoesEntityExist(entity) then
        if GetEntityType(entity) == 3 then
            TriggerClientEvent('srhtac:ogekontrol', -1, GetEntityModel(entity))
        end
        if GetEntityType(entity) == 3 or GetEntityType(entity) == 2 or GetEntityType(entity) == 1 then
            local src = NetworkGetEntityOwner(entity)
            if CooldownList[src] == nil then
                CooldownList[src] = {count = 0, time = os.time()}
            end
            local seconds = os.time() - CooldownList[src].time
            if seconds <= srhtac.SpamTimecycle then
                CooldownList[src].count = CooldownList[src].count + 1
                if CooldownList[src].count >= srhtac.SpamMaxEntities then
                    TriggerClientEvent('srhtac:entitysil', -1, tonumber(src))
                    if srhtac.SpamEntityLog then
                        dclog(src, 'Varlık oluÅturma limitini aÅtı!\n**OluÅturduÄu varlık sayısı:** '..CooldownList[src].count)
                    end
                    if srhtac.SpamEntityKick then
                        Citizen.Wait(3000)
                        TriggerServerEvent('srhtac:kickle', 'Varlık oluÅturma limitini aÅtı!\n**OluÅturduÄu varlık sayısı:** '..CooldownList[src].count)
                        CooldownList[src] = nil
                    end
                    if srhtac.SpamEntityBan then
                        Citizen.Wait(3000)
                        TriggerServerEvent('srhtac:banla', 'Varlık oluÅturma limitini aÅtı!\n**OluÅturduÄu varlık sayısı:** '..CooldownList[src].count)
                        CooldownList[src] = nil
                    end
                end
            else
                CooldownList[src] = nil
            end
        end
        if GetEntityType(entity) == 3 then
            local src = NetworkGetEntityOwner(entity)
            for _, blacklistedProps in pairs(SrhtAc.BlacklistProps) do
                if GetEntityModel(entity) == GetHashKey(blacklistedProps) then
                    if srhtac.BlacklistPropLog then
                        dclog(src, 'Blacklist obje spawnladı! Obje ismi: '..blacklistedProps..'\n**Plebmasters:** https://plebmasters.de/?search='..blacklistedProps..'&app=objects \n**Google:** https://www.google.com/search?q='..blacklistedProps..' \n **Mwojtasik:** https://mwojtasik.dev/tools/gtav/objects/search?name='..blacklistedProps)
                    end
                    if srhtac.BlacklistPropDrop then
                        Citizen.Wait(3000)
                        TriggerServerEvent('srhtac:kickle', 'Blacklist obje spawnladı! Obje ismi: '..blacklistedProps..'\n**Plebmasters:** https://plebmasters.de/?search='..blacklistedProps..'&app=objects \n**Google:** https://www.google.com/search?q='..blacklistedProps..' \n **Mwojtasik:** https://mwojtasik.dev/tools/gtav/objects/search?name='..blacklistedProps)
                        CooldownList[src] = nil
                    end
                    if srhtac.BlacklistPropBan then
                        Citizen.Wait(3000)
                        TriggerServerEvent('srhtac:banla', 'Blacklist obje spawnladı! Obje ismi: '..blacklistedProps..'\n**Plebmasters:** https://plebmasters.de/?search='..blacklistedProps..'&app=objects \n**Google:** https://www.google.com/search?q='..blacklistedProps..' \n **Mwojtasik:** https://mwojtasik.dev/tools/gtav/objects/search?name='..blacklistedProps)
                        CooldownList[src] = nil
                    end
                    TriggerClientEvent('srhtac:entitysil', -1, tonumber(src))
                    CancelEvent()
                    return
                end
            end
        elseif GetEntityType(entity) == 2 then
            local src = NetworkGetEntityOwner(entity)
            for _, blacklistedVeh in pairs(srhtac.BlacklistVehicles) do
                if GetEntityModel(entity) == GetHashKey(blacklistedVeh) then
                    local src = NetworkGetEntityOwner(entity)
                    if srhtac.BlacklistVehLog then
                        dclog(src, 'Blacklist araç spawnladı! Araç ismi: '..blacklistedVeh..'\n **GtaBase:** https://www.gtabase.com/search?searchword='..blacklistedVeh)
                    end
                    if srhtac.BlacklistVehKick then
                        Citizen.Wait(3000)
                        TriggerServerEvent('srhtac:kickle', 'Blacklist araç spawnladı! Araç ismi: '..blacklistedVeh..'\n **GtaBase:** https://www.gtabase.com/search?searchword='..blacklistedVeh)
                        CooldownList[src] = nil
                    end
                    if srhtac.BlacklistVehBan then
                        Citizen.Wait(3000)
                        TriggerServerEvent('srhtac:banla', 'Blacklist araç spawnladı! Araç ismi: '..blacklistedVeh..'\n **GtaBase:** https://www.gtabase.com/search?searchword='..blacklistedVeh)
                        CooldownList[src] = nil
                    end
                    TriggerClientEvent('srhtac:entitysil', -1, tonumber(src))
                    CancelEvent()
                    return
                end
            end
        elseif GetEntityType(entity) == 1 then
            local src = NetworkGetEntityOwner(entity)
            for _, blacklistedPed in pairs(srhtac.BlacklistPeds) do
                if GetEntityModel(entity) == GetHashKey(blacklistedPed) then
                    local src = NetworkGetEntityOwner(entity)
                    if srhtac.BlacklistPedLog then
                        dclog(src, 'Blacklist ped spawnladı! Ped modeli: '..blacklistedPed..'\n **Ped picture:** https://docs.fivem.net/peds/'..blacklistedPed..'.png')
                    end
                    if srhtac.BlacklistPedKick then
                        Citizen.Wait(3000)
                        TriggerServerEvent('srhtac:kickle', 'Blacklist ped spawnladı! Ped modeli: '..blacklistedPed..'\n **Ped picture:** https://docs.fivem.net/peds/'..blacklistedPed..'.png')
                        CooldownList[src] = nil
                    end
                    if srhtac.BlacklistPedBan then
                        Citizen.Wait(3000)
                        TriggerServerEvent('srhtac:banla', 'Blacklist ped spawnladı! Ped modeli: '..blacklistedPed..'\n **Ped picture:** https://docs.fivem.net/peds/'..blacklistedPed..'.png')
                        CooldownList[src] = nil
                    end
                    TriggerClientEvent('srhtac:entitysil', -1, tonumber(src))
                    CancelEvent()
                    return
                end
            end
        end
    end
end)

AddEventHandler('chatMessage', function(source, color, message)
    if not message then
        return
    end

    local src = source

    for k, v in pairs(srhtac.Words) do
        if string.match(message, v) then
            if srhtac.BlacklistWordLog then
                dclog(src, 'Chate blacklist mesaj yolladı! Mesaj: '..v)
            end
            if srhtac.BlacklistWordKick then
                TriggerServerEvent('srhtac:kickle', 'Chate blacklist mesaj yolladı! Mesaj: '..v)
            end
            if srhtac.BlacklistWordBan then
                TriggerServerEvent('srhtac:banla', 'Chate blacklist mesaj yolladı! Mesaj: '..v)
            end


            CancelEvent()
        end
        return
    end
end)


Citizen.CreateThread(function()
    for k, v in pairs(srhtac.Events) do
        if srhtac.TriggerDetection then
            RegisterServerEvent(tostring(v))
            AddEventHandler(tostring(v), function()
                local src = source

                if srhtac.BlacklistEventLog then
                    dclog(src, 'İNJECT YAPILIYOR!!! Yasaklı event kullandı! Event: '..v)
                end
                if srhtac.BlacklistEventKick then
                    TriggerServerEvent('srhtac:kickle', 'İNJECT YAPILIYOR!!! Yasaklı event kullandı! Event: '..v)
                end
                if srhtac.BlacklistEventBan then
                    TriggerServerEvent('srhtac:banla', 'İNJECT YAPILIYOR!!! Yasaklı event kullandı! Event: '..v)
                end
            end)
        end
    end
end)

   
RegisterCommand('SrhtAcdel', function(source, args)
    TriggerClientEvent('srhtac:entitysil', -1, tonumber(args[1]))
end)


RegisterServerEvent('srhtac:drop')
AddEventHandler('srhtac:drop', function()
    local src = source
    local identifier = GetPlayerIdentifiers(src)[1]

    DropPlayer(src, srhtac.KickMessage)
end)

RegisterServerEvent('srhtac:logla')
AddEventHandler('srhtac:logla', function(text)
    local src = source
    local identifier = GetPlayerIdentifiers(src)[1]

    dclog(src, '\n**Loglandı:** '..text..'')
end)

RegisterServerEvent('srhtac:banla')
AddEventHandler('srhtac:banla', function(text)
if not doesPlayerHavePerms(source, srhtac.ClearAreaAllowed) then
    local src = source
    local identifier = GetPlayerIdentifiers(src)[1]
    dclog(src, '\n**Banlandı:** '..text..'')
    TriggerEvent("SrhtAc:Banladim", src)
  end
end)
RegisterServerEvent('srhtac:kickle')
AddEventHandler('srhtac:kickle', function(text)
if not doesPlayerHavePerms(source, srhtac.ClearAreaAllowed) then
    local src = source
    local identifier = GetPlayerIdentifiers(src)[1]
    dclog(src, '\n**Kicklendi:** '..text..'')
    TriggerEvent("SrhtAc:Kickledim", src)
   end
end)

function dclog(source, text)
    local src = source
    local playerName = Sanitize(GetPlayerName(src))
   
    for H, B in pairs(GetPlayerIdentifiers(src)) do
        if string.match(B, 'license:') then
            license = B
        end
        if string.match(B, 'live:') then
            live = B
        end
        if string.match(B, 'xbl:') then
            xbl = B
        end
        if string.match(B, 'discord:') then
            discord = B
        end
    end
   
    for k, v in ipairs(GetPlayerIdentifiers(src)) do
        if string.match(v, 'steam:') then
            identifierSteamHex = v
            identifierSteamDex = tonumber(string.sub(identifierSteamHex, 7), 16)
        end
        if string.match(v, 'discord:') then
            identifierDiscord = v
        end
        if string.match(v, 'ip:') then
            identifierIp = v
        end
    end
   
    local discord_webhook = srhtac.webhooklog
    if discord_webhook == '' or discord_webhook == nil then
        return
    end
   
    local headers = {
      ['Content-Type'] = 'application/json'
    }
    local data = {
      ['username'] = srhtac.WebhookName,
      ['avatar_url'] = srhtac.WebhookAvatarUrl,
      ['embeds'] = {{
        ['thumbnail'] = {
            ['url'] = 'https://cdn.discordapp.com/attachments/827928307139477585/839076505137053726/srhtac.png'
          },
        ['author'] = {
          ['name'] = '[Srht-Ac] V1',
          ['icon_url'] = 'https://cdn.discordapp.com/attachments/827928307139477585/839076505137053726/srhtac.png'
        },
        ['footer'] = {
            ['text'] = '[Srht-Ac] V1 Beta | discord.gg/pc92dKKv43'
        },
        ['color'] = 3447003,
        ['timestamp'] = os.date('!%Y-%m-%dT%H:%M:%SZ')
      }}
    }
   
    text = '' ..text..'\n**              ID**: '..tonumber(src)..'\n**Steam Ä°smi:** '..playerName

    if identifierSteamHex ~= nil then
        text = text..'\n**Steam Hex:** '..identifierSteamHex
        if identifierSteamDex ~= nil and (cf.SteamApiKey ~= '' or cf.SteamApiKey ~= nil) then
            PerformHttpRequest('https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key='.. cf.SteamApiKey ..'&steamids='..identifierSteamDex, function(errorCode, resultJson, resultHeaders)
                resultData = json.decode(resultJson)
                profileurl = resultData.response.players[1].profileurl
                profileavatar = resultData.response.players[1].avatarmedium
                profilecreatedate = resultData.response.players[1].timecreated
                if (resultData.response.players[1].communityvisibilitystate == 1 or resultData.response.players[1].communityvisibilitystate == 2) then
                    profilevisibility = 'Gizli'
                elseif resultData.response.players[1].communityvisibilitystate == 3 then
                    profilevisibility = 'Herkese Açık'
                end
                if identifierDiscord ~= nil then
                    text = text..'\n**              Discord:** <@'..string.sub(identifierDiscord, 9)..'>'
                    identifierDiscord = nil
                end
                if discord ~= nil then
                    text = text..'\n**Discord Id:** '..string.sub(discord, 9)
                    discord = nil
                end
                if xbl ~= nil then
                    text = text..'\n**Xbox Live Id:** '..string.sub(xbl, 5)
                    xbl = nil
                end
                if live ~= nil then
                    text = text..'\n**Microsoft ID:** '..string.sub(live, 6)
                    live = nil
                end
                if license ~= nil then
                    text = text..'\n**GTA License:** '..string.sub(license, 9)
                    license = nil
                end
                if identifierIp ~= nil then
                    text = text..'\n**Ip:** '..string.sub(identifierIp, 4)
                    identifierIp = nil
                end
                if profileurl ~= nil then
                    text = text..'\n**Profil Linki:** '..profileurl
                    profileurl = nil
                    if profilevisibility ~= nil then
                        text = text..'\n**Profil GizliliÄi:** '..profilevisibility
                        profilevisibility = nil
                    end
                    if profilecreatedate ~= nil then
                        text = text..'\n**Hesap OluÅturma Tarihi:** '..os.date('%d-%m-%Y %H:%M:%S', profilecreatedate)
                        profilecreatedate = nil
                    end
                    if profileavatar ~= nil then
                        data['embeds'][1]['thumbnail']['url'] = profileavatar
                        profileavatar = nil
                    end
                end
               
                data['embeds'][1]['description'] = text
                PerformHttpRequest(cf.DiscordWebhook, function(err, text, headers) end, 'POST', json.encode(data), headers)
            end, 'GET', '')
        else
            if identifierDiscord ~= nil then
                text = text..'\n**Discord:** <@'..string.sub(identifierDiscord, 9)..'>'
                identifierDiscord = nil
            end
            if identifierIp ~= nil then
                text = text..'\n**Ip:** '..string.sub(identifierIp, 4)
                identifierIp = nil
            end
            data['embeds'][1]['description'] = text
            PerformHttpRequest(cf.DiscordWebhook, function(err, text, headers) end, 'POST', json.encode(data), headers)
        end
     
        identifierSteamHex = nil
        identifierSteamDex = nil
    end
end



function Sanitize(str)
    local replacements = {
        ['&' ] = '&amp;',
        ['<' ] = '&lt;',
        ['>' ] = '&gt;',
        ['\n'] = '<br/>'
    }

    return str
        :gsub('[&<>\n]', replacements)
        :gsub(' +', function(s)
            return ' '..('&nbsp;'):rep(#s-1)
        end)
end




loadBans()




Citizen.CreateThread(function()
logo()

end)
local cf = {
    DiscordWebhook2 = srhtac.startwebhook,
    SteamApiKey = srhtac.SteamApiKey,
}


PerformHttpRequest(cf.DiscordWebhook2, function(err, text, headers) end, 'POST', json.encode({
    ['username'] = srhtac.WebhookName,
    ['avatar_url'] = srhtac.WebhookAvatarUrl,
    ['embeds'] = {{
        ['author'] = {
            ['name'] = '[Srht-Ac] V1',
            ['icon_url'] = 'https://cdn.discordapp.com/attachments/827928307139477585/839076505137053726/srhtac.png'
        },
        ['footer'] = {
            ['text'] = 'Srht Anticheat Made By $erhat/18#6666'
        },
        ['color'] = 3066993,
        ['description'] = 'Anticheat BaÅlatıldı Developer: <@AC>',
        ['timestamp'] = os.date('!%Y-%m-%dT%H:%M:%SZ')
    }}
}), {['Content-Type'] = 'application/json' })
d30bFuSC4T0r 4b1m y4 sUP3rs1n
 

Forumdan daha fazla yararlanmak için giriş yapın yada üye olun!

Forumdan daha fazla yararlanmak için giriş yapın veya kayıt olun!

Kayıt ol

Forumda bir hesap oluşturmak tamamen ücretsizdir.

Şimdi kayıt ol
Giriş yap

Eğer bir hesabınız var ise lütfen giriş yapın

Giriş yap

Bu konuyu görüntüleyen kullanıcılar

Tema düzenleyici

Tema özelletirmeleri

Granit arka planlar

Lütfen Javascript'i etkinleştirin!Javascript'i etkinleştirin!