local communityname = "3DME-LOG"
local Loggerlogo = ""
local Webhooks = ""
-- Command
RegisterCommand('me', function(source, args)
    local name = getIdentity(source)
    local adsoyad = name.firstname .. ' ' .. name.lastname
    local text = "" .. Languages[Config.language].prefix .. table.concat(args, " ") .. ""
    TriggerClientEvent('3dme:shareDisplay', -1, text, source)
    TriggerClientEvent("sendProximityMessageMe", -1, source, adsoyad, table.concat(args, " "))
    
    local connect = {
        {
            ["color"] = "697551",
            ["title"] = 'Me Komutunu Kullandı',
            ["description"] = "Ad Soyad: **"..name.firstname.." "..name.lastname.."\n**Yazı: **"..text.."\n**Yazan ID: **"..source.."**",
            ["footer"] = {
                ["text"] = communityname,
                ["icon_url"] = Loggerlogo,
            },
        }
    }
PerformHttpRequest(Webhooks, function(err, text, headers) end, 'POST', json.encode({username = "3DME Log", embeds = connect}), {['Content-Type'] = 'application/json'})
end)
RegisterCommand('do', function(source, args)
    local name = getIdentity(source)
    local adsoyad = name.firstname .. ' ' .. name.lastname
    local text = "" .. Languages[Config.language].prefix .. table.concat(args, " ") .. ""
    TriggerClientEvent('3dme:shareDisplayDo', -1, text, source)
    TriggerClientEvent("sendProximityMessageDo", -1, source, adsoyad, table.concat(args, " "))
    
    local connect = {
        {
            ["color"] = "697551",
            ["title"] = 'Do Komutunu Kullandı',
            ["description"] = "Ad Soyad: **"..name.firstname.." "..name.lastname.."\n**Yazı: **"..text.."\n**Yazan ID: **"..source.."**",
            ["footer"] = {
                ["text"] = communityname,
                ["icon_url"] = Loggerlogo,
            },
        }
    }
PerformHttpRequest(Webhooks, function(err, text, headers) end, 'POST', json.encode({username = "3DME Log", embeds = connect}), {['Content-Type'] = 'application/json'})
end)
function getIdentity(source)
    local identifier = GetPlayerIdentifiers(source)[1]
    local result = MySQL.Sync.fetchAll("SELECT * FROM users WHERE identifier = @identifier", {['@identifier'] = identifier})
    if result[1] ~= nil then
        local identity = result[1]
        return {
            identifier = identity['identifier'],
            firstname = identity['firstname'],
            lastname = identity['lastname'],
            dateofbirth = identity['dateofbirth'],
            sex = identity['sex'],
            height = identity['height']
        }
    else
        return nil
    end
end