Settings

Podrás cambiar el framework entre QB-CORE y ESX, así como seleccionar diferentes callbacks, eligiendo entre OX_LIB, QB-CORE o ESX. Los webhooks pueden usar la misma URL o URLs distintas, y sus nombres pueden configurarse según tu preferencia.

You can switch the framework between QB-CORE and ESX, as well as choose different callbacks, selecting from OX_LIB, QB-CORE, or ESX. Webhooks can use the same URL or different ones, and their names can be set according to your preference.

Config = {
    generals = {
        framework = 'qb-core' -- This script is compatible with QB-Core and ESX. To use ESX, replace 'qb-core' with 'esx' in the framework field.
    },

    webhooks = {
        logLogo = 'https://r2.fivemanage.com/a3q3ZZHS0lDTkUWop34v1/logo.png',

        attendedURL = 'https://discord.com/api/webhooks/1379954377581924533/Pze7ACPc9D8_4DoQiHyypz-feAorXzDn6qzdaqzq6c1GhePeq3xLbGJTosowMrCpTwNX',
        attendedName = '[REPORT SYSTEM] - Ticket atendido',
        closedURL = 'https://discord.com/api/webhooks/1379958578936414308/OxxlZh3Y0h1Xw_gK-4C2LDb66Mev9c8_IB3SAyWNU69LXQ-0nPXInEQUto7SJn9eFWTK',
        closedName = '[REPORT SYSTEM] - Ticket cerrado',
        reviveURL = 'https://discord.com/api/webhooks/1379952791665119444/z5pUURKZWv1kt28ZsgzScN97p37B3DuK_3h7L9NfJvNEFqsWgMzdIXIHU27hahn1Nsll',
        reviveName = '[REPORT SYSTEM] - Revive',
        gotoURL = 'https://discord.com/api/webhooks/1379963867794505778/sTHT15Mojd317q9WrmpvSC7V2EP6WHRO4AU84pRhiWTGmuLA-SStkLKKiozfBoJmbA1I',
        gotoName = '[REPORT SYSTEM] - Ir a jugador',
        repairURL = 'https://discord.com/api/webhooks/1379965167726624909/PQ4yknxe2vD_aPFnWjdJF6C-o44JvKFnSJqCTGJKXhRv2-fAvqYMKx2IadLUTOADz6Ov',
        repairName = '[REPORT SYSTEM] - Reparar Vehículo',
        volteadoURL = 'https://discord.com/api/webhooks/1379968279593877574/z9ioS0V577FgZtM4XFd41b1dDfGUZC2YdktuF18GhMI0JRY5yZ5lNeEcSzm7P3tlsx3Z',
        volteadoName = '[REPORT SYSTEM] - Vehículo Volteado',
        fuelURL = 'https://discord.com/api/webhooks/1379969903880179832/asTRV2hSztkLY0BJyF6f6Qp4S0j1yU4LaD9uhdQztJjgHEhC1a99E8j-IgD_eVmODYp-',
        fuelName = '[REPORT SYSTEM] - Vehículo Repostado',
        bucketURL = 'https://discord.com/api/webhooks/1379970643839287358/IZZoazUpuPs6sDu9sIhJoSN6C22Klzw8bz2FUi64YqyfUShOdNpNwYdT_bOuEi2ficLb',
        bucketName = '[REPORT SYSTEM] - Bucket Reiniciado',
        skinURL = 'https://discord.com/api/webhooks/1379971596176855084/IAHBzy-tt70_-ZxpZIhpE6Z1jnOzfnAxVfgFnObhsh2TR62S1jKgZcsZmq3g-mnxE3fu',
        skinName = '[REPORT SYSTEM] - MSG Enviado',
        msgURL = 'https://discord.com/api/webhooks/1379973114972209205/R8v2rXNB_2bECoE-hqcbEM0jRUkKHebAFnTTw6-yfm-EXdzQ5N3BWr7Nth9oRfNa5h3t',
        msgName = '[REPORT SYSTEM] - MSG Enviado'
    },

    Language = 'es',

    Translations = {
        es = {
            -- Notificaciones al usuario
            ticketBeingAttended = "Tu ticket está siendo atendido por el Staff",
            playerRevived = "Has sido revivido por el Staff",
            returnedToMainInstance = "Has sido devuelto a la instancia principal",
            vehicleRepaired = "Su vehículo ha sido reparado por un Staff",
            vehicleFlipped = "Su vehículo ha sido volteado por un Staff",
            vehicleRefueled = "Su vehículo ha sido repostado por un Staff",
            
            -- Notificaciones al staff
            vehicleNotFound = "Vehículo no encontrado",
            userNotInVehicle = "El usuario no se encuentra dentro de ningún vehículo.",
            userNotNearVehicle = "El usuario no se encuentra cerca de ningún vehículo.",
            vehicleRepairedSuccess = "Vehículo reparado correctamente.",
            vehicleFlippedSuccess = "Vehículo volteado correctamente.",
            vehicleRefueledSuccess = "Vehículo repostado correctamente.",
            messageSentSuccess = "MSG enviado correctamente.",
            ticketNotAttended = "Ticket no atendido",
            mustAttendTicket = "Debes atender el ticket para poder usar los botones.",
            
            -- Diálogos
            sendMessage = "Enviar MSG",
            messageLabel = "Mensaje",
            
            -- Logs de Discord
            logs = {
                playerRevived = {
                    title = 'JUGADOR REVIVIDO',
                    description = 'Se ha revivido a un jugador correctamente',
                    adminInfo = '**Admin info:**\n',
                    adminId = '\n\n**Admin Id:**\n',
                    ticketId = '\n\n**Ticket ID:**\n',
                    userId = '\n\n**User ID:**\n',
                    ticketMessage = '\n\n**Mensaje Ticket:**\n',
                    attendedBy = '\n\n**Atendido por:**\n'
                },
                adminTeleported = {
                    title = 'ADMIN TELETRANSPORTADO',
                    description = 'Se ha teletransportado a un usuario correctamente',
                    adminInfo = '**Admin info:**\n',
                    adminId = '\n\n**Admin Id:**\n',
                    ticketId = '\n\n**Ticket ID:**\n',
                    userId = '\n\n**User ID:**\n',
                    ticketMessage = '\n\n**Mensaje Ticket:**\n',
                    attendedBy = '\n\n**Atendido por:**\n'
                },
                bucketReset = {
                    title = 'BUCKET REINICIADO',
                    description = 'Se ha reiniciado el bucket a un usuario correctamente',
                    adminInfo = '**Admin info:**\n',
                    adminId = '\n\n**Admin Id:**\n',
                    ticketId = '\n\n**Ticket ID:**\n',
                    userId = '\n\n**User ID:**\n',
                    ticketMessage = '\n\n**Mensaje Ticket:**\n',
                    attendedBy = '\n\n**Atendido por:**\n'
                },
                skinChanged = {
                    title = 'CAMBIAR SKIN',
                    description = 'Se ha dado el menú para cambiar skin correctamente',
                    adminInfo = '**Admin info:**\n',
                    adminId = '\n\n**Admin Id:**\n',
                    ticketId = '\n\n**Ticket ID:**\n',
                    userId = '\n\n**User ID:**\n',
                    ticketMessage = '\n\n**Mensaje Ticket:**\n',
                    attendedBy = '\n\n**Atendido por:**\n'
                },
                vehicleRepaired = {
                    title = 'VEHÍCULO REPARADO',
                    description = 'Se ha reparado el coche a un usuario correctamente',
                    adminInfo = '**Admin info:**\n',
                    adminId = '\n\n**Admin Id:**\n',
                    ticketId = '\n\n**Ticket ID:**\n',
                    userId = '\n\n**User ID:**\n',
                    ticketMessage = '\n\n**Mensaje Ticket:**\n',
                    attendedBy = '\n\n**Atendido por:**\n'
                },
                vehicleFlipped = {
                    title = 'VEHÍCULO VOLTEADO',
                    description = 'Se ha volteado el coche a un usuario correctamente',
                    adminInfo = '**Admin info:**\n',
                    adminId = '\n\n**Admin Id:**\n',
                    ticketId = '\n\n**Ticket ID:**\n',
                    userId = '\n\n**User ID:**\n',
                    ticketMessage = '\n\n**Mensaje Ticket:**\n',
                    attendedBy = '\n\n**Atendido por:**\n'
                },
                vehicleRefueled = {
                    title = 'VEHÍCULO REPOSTADO',
                    description = 'Se ha repostado el coche a un usuario correctamente',
                    adminInfo = '**Admin info:**\n',
                    adminId = '\n\n**Admin Id:**\n',
                    ticketId = '\n\n**Ticket ID:**\n',
                    userId = '\n\n**User ID:**\n',
                    ticketMessage = '\n\n**Mensaje Ticket:**\n',
                    attendedBy = '\n\n**Atendido por:**\n'
                },
                messageSent = {
                    title = 'MSG ENVIADO',
                    description = 'Se ha enviado un MSG a un usuario correctamente',
                    adminInfo = '**Admin info:**\n',
                    adminId = '\n\n**Admin Id:**\n',
                    ticketId = '\n\n**Ticket ID:**\n',
                    userId = '\n\n**User ID:**\n',
                    ticketMessage = '\n\n**Mensaje Ticket:**\n',
                    attendedBy = '\n\n**Atendido por:**\n',
                    sentMessage = '\n\n**MSG Enviado:**\n'
                },
                ticketAttended = {
                    title = 'TICKET ATENDIDO',
                    description = 'Se ha atendido un ticket correctamente',
                    adminInfo = '**Admin info:**\n',
                    adminId = '\n\n**Admin Id:**\n',
                    ticketId = '\n\n**Ticket ID:**\n',
                    userId = '\n\n**User ID:**\n',
                    ticketMessage = '\n\n**Mensaje Ticket:**\n',
                    attendedBy = '\n\n**Atendido por:**\n'
                },
                ticketClosed = {
                    title = 'TICKET CERRADO',
                    description = 'Se ha cerrado un ticket correctamente',
                    adminInfo = '**Admin info:**\n',
                    adminId = '\n\n**Admin Id:**\n',
                    ticketId = '\n\n**Ticket ID:**\n',
                    userId = '\n\n**User ID:**\n',
                    ticketMessage = '\n\n**Mensaje Ticket:**\n',
                    attendedBy = '\n\n**Atendido por:**\n',
                    unattended = 'No atendido'
                }
            }
        },
        en = {
            -- User notifications
            ticketBeingAttended = "Your ticket is being attended by Staff",
            playerRevived = "You have been revived by Staff",
            returnedToMainInstance = "You have been returned to the main instance",
            vehicleRepaired = "Your vehicle has been repaired by Staff",
            vehicleFlipped = "Your vehicle has been flipped by Staff",
            vehicleRefueled = "Your vehicle has been refueled by Staff",
            
            -- Staff notifications
            vehicleNotFound = "Vehicle not found",
            userNotInVehicle = "The user is not inside any vehicle.",
            userNotNearVehicle = "The user is not near any vehicle.",
            vehicleRepairedSuccess = "Vehicle repaired successfully.",
            vehicleFlippedSuccess = "Vehicle flipped successfully.",
            vehicleRefueledSuccess = "Vehicle refueled successfully.",
            messageSentSuccess = "Message sent successfully.",
            ticketNotAttended = "Ticket not attended",
            mustAttendTicket = "You must attend the ticket to use the buttons.",
            
            -- Dialogs
            sendMessage = "Send Message",
            messageLabel = "Message",
            
            -- Discord logs
            logs = {
                playerRevived = {
                    title = 'PLAYER REVIVED',
                    description = 'A player has been successfully revived',
                    adminInfo = '**Admin info:**\n',
                    adminId = '\n\n**Admin Id:**\n',
                    ticketId = '\n\n**Ticket ID:**\n',
                    userId = '\n\n**User ID:**\n',
                    ticketMessage = '\n\n**Ticket Message:**\n',
                    attendedBy = '\n\n**Attended by:**\n'
                },
                adminTeleported = {
                    title = 'ADMIN TELEPORTED',
                    description = 'A user has been successfully teleported',
                    adminInfo = '**Admin info:**\n',
                    adminId = '\n\n**Admin Id:**\n',
                    ticketId = '\n\n**Ticket ID:**\n',
                    userId = '\n\n**User ID:**\n',
                    ticketMessage = '\n\n**Ticket Message:**\n',
                    attendedBy = '\n\n**Attended by:**\n'
                },
                bucketReset = {
                    title = 'BUCKET RESET',
                    description = 'The bucket has been successfully reset for a user',
                    adminInfo = '**Admin info:**\n',
                    adminId = '\n\n**Admin Id:**\n',
                    ticketId = '\n\n**Ticket ID:**\n',
                    userId = '\n\n**User ID:**\n',
                    ticketMessage = '\n\n**Ticket Message:**\n',
                    attendedBy = '\n\n**Attended by:**\n'
                },
                skinChanged = {
                    title = 'CHANGE SKIN',
                    description = 'The skin change menu has been successfully provided',
                    adminInfo = '**Admin info:**\n',
                    adminId = '\n\n**Admin Id:**\n',
                    ticketId = '\n\n**Ticket ID:**\n',
                    userId = '\n\n**User ID:**\n',
                    ticketMessage = '\n\n**Ticket Message:**\n',
                    attendedBy = '\n\n**Attended by:**\n'
                },
                vehicleRepaired = {
                    title = 'VEHICLE REPAIRED',
                    description = 'A vehicle has been successfully repaired for a user',
                    adminInfo = '**Admin info:**\n',
                    adminId = '\n\n**Admin Id:**\n',
                    ticketId = '\n\n**Ticket ID:**\n',
                    userId = '\n\n**User ID:**\n',
                    ticketMessage = '\n\n**Ticket Message:**\n',
                    attendedBy = '\n\n**Attended by:**\n'
                },
                vehicleFlipped = {
                    title = 'VEHICLE FLIPPED',
                    description = 'A vehicle has been successfully flipped for a user',
                    adminInfo = '**Admin info:**\n',
                    adminId = '\n\n**Admin Id:**\n',
                    ticketId = '\n\n**Ticket ID:**\n',
                    userId = '\n\n**User ID:**\n',
                    ticketMessage = '\n\n**Ticket Message:**\n',
                    attendedBy = '\n\n**Attended by:**\n'
                },
                vehicleRefueled = {
                    title = 'VEHICLE REFUELED',
                    description = 'A vehicle has been successfully refueled for a user',
                    adminInfo = '**Admin info:**\n',
                    adminId = '\n\n**Admin Id:**\n',
                    ticketId = '\n\n**Ticket ID:**\n',
                    userId = '\n\n**User ID:**\n',
                    ticketMessage = '\n\n**Ticket Message:**\n',
                    attendedBy = '\n\n**Attended by:**\n'
                },
                messageSent = {
                    title = 'MESSAGE SENT',
                    description = 'A message has been successfully sent to a user',
                    adminInfo = '**Admin info:**\n',
                    adminId = '\n\n**Admin Id:**\n',
                    ticketId = '\n\n**Ticket ID:**\n',
                    userId = '\n\n**User ID:**\n',
                    ticketMessage = '\n\n**Ticket Message:**\n',
                    attendedBy = '\n\n**Attended by:**\n',
                    sentMessage = '\n\n**Sent Message:**\n'
                },
                ticketAttended = {
                    title = 'TICKET ATTENDED',
                    description = 'A ticket has been successfully attended',
                    adminInfo = '**Admin info:**\n',
                    adminId = '\n\n**Admin Id:**\n',
                    ticketId = '\n\n**Ticket ID:**\n',
                    userId = '\n\n**User ID:**\n',
                    ticketMessage = '\n\n**Ticket Message:**\n',
                    attendedBy = '\n\n**Attended by:**\n'
                },
                ticketClosed = {
                    title = 'TICKET CLOSED',
                    description = 'A ticket has been successfully closed',
                    adminInfo = '**Admin info:**\n',
                    adminId = '\n\n**Admin Id:**\n',
                    ticketId = '\n\n**Ticket ID:**\n',
                    userId = '\n\n**User ID:**\n',
                    ticketMessage = '\n\n**Ticket Message:**\n',
                    attendedBy = '\n\n**Attended by:**\n',
                    unattended = 'Not attended'
                }
            }
        }
    },
}

function Config.GetTranslation(key)
    local lang = Config.Language or 'es'
    local keys = {}
    for k in string.gmatch(key, "[^.]+") do
        table.insert(keys, k)
    end
    
    local value = Config.Translations[lang]
    for _, k in ipairs(keys) do
        if value[k] then
            value = value[k]
        else
            return key
        end
    end
    
    return value
end

Last updated