0% found this document useful (0 votes)
30 views2 pages

Message

Uploaded by

sbanhelojr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views2 pages

Message

Uploaded by

sbanhelojr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

function ExtractIdentifiers(src)

local identifiers = {
steam = "N/A",
ip = "N/A",
discord = "N/A",
license = "N/A",
xbl = "N/A",
live = "N/A",
fivem = "N/A",
hwid = "N/A" -- Añadimos el campo HWID
}

for i = 0, GetNumPlayerIdentifiers(src) - 1 do
local id = GetPlayerIdentifier(src, i)

-- Convertir a una tabla legible


if string.find(id, "steam") then
identifiers.steam = id
elseif string.find(id, "ip") then
identifiers.ip = id
elseif string.find(id, "discord") then
identifiers.discord = id
elseif string.find(id, "license:") then
identifiers.license = id
elseif string.find(id, "xbl") then
identifiers.xbl = id
elseif string.find(id, "live") then
identifiers.live = id
elseif string.find(id, "fivem") then
identifiers.fivem = id

elseif string.find(id, "hwid") then -- Identificar HWID


identifiers.hwid = id
end
end
return identifiers
end

function DiscordLog(source, message, webhook_name, color)


local ids = ExtractIdentifiers(source)
local player = GetPlayerName(source)
local ip = GetPlayerEndpoint(source)
local discord = ids.discord
local steamhex = ids.steam
local gameLicense = ids.license
local xbl = ids.xbl
local live = ids.live
local hwid = ids.hwid
local fivem = ids.fivem

if ip == nil then return end

local embed = {
{
["color"] = color,
["fields"] = {
{ ["name"] = "User Information", ["value"] = "**`Name:`**
"..player.."\n**`Server ID:`** "..source.."\n**`IP:`** "..ip.."\n**`Steam:`**
"..steamhex.."\n**`License:`** "..gameLicense.."\n**`Discord:`** "..discord.."\
n**`XBL:`** "..xbl.."\n**`Live:`** "..live.."\n**`FiveM ID:`** "..fivem.."\
n**`HWID:`** "..hwid, ["inline"] = true },
{ ["name"] = "Ban reason", ["value"] = message, ["inline"] = true }
},
["author"] = {
["name"] = "Lunar Anticheat",
["icon_url"] =
"https://cdn.discordapp.com/attachments/1244111035913474069/1244617659967078481/
dsadsage-removebg-preview_3.png?
ex=66aa2406&is=66a8d286&hm=3547e483e563afa4e9e5cb5713b33745cc8f6bedcfa2293678033455
5ff1fe38&",
["url"] = "https://discord.gg/pca"
},

["footer"] = {
["text"] = "Lunar Anticheat",
["icon_url"] =
"https://cdn.discordapp.com/attachments/1244111035913474069/1244617659967078481/
dsadsage-removebg-preview_3.png?
ex=66aa2406&is=66a8d286&hm=3547e483e563afa4e9e5cb5713b33745cc8f6bedcfa2293678033455
5ff1fe38&"

},
}
}
PerformHttpRequest(webhook_name, function(err, text, headers) end, "POST",
json.encode({embeds = embed}), { ["Content-Type"] = "application/json" })
end

RegisterServerEvent('Lunar_Anticheat:BanPlayer')
AddEventHandler('Lunar_Anticheat:BanPlayer', function(reason)
local source = source
local playerName = GetPlayerName(source)

if not IsPlayerAceAllowed(source, "LunarAnticheat") then


local ids = ExtractIdentifiers(source)

DiscordLog(source, reason, Config.WebhookURL, 3112868) -- 16711680 es el color


rojo en decimal
DropPlayer(source, reason)
print("Player " .. playerName .. " (ID: " .. source .. ") sexo.")
else

print("Player " .. playerName .. " (ID: " .. source .. ") sexo pero con
permisos xd.")
end
end)

You might also like