⚙️Config

TIPOS DE BOTONES

 type = "toggle", --Checkbox
 type = "mixed", --large buttons
 type = "buttons", -- small buttons
 type = "info", -- info

The resource comes with several default examples

Agregar Acción a Botón

1. En tu pestaña, define el action:

{
    label = "MY BUTTON",
    icon = "fa-solid fa-star",
    action = "miAccion",  // <-- Este es el nombre
    col = 6
}

2. En client.lua, busca RegisterNUICallback('buttonAction'

3. Agrega tu código:

if action == "miAccion" then
    -- Tu código aquí
    TriggerEvent('tu-evento')
    QBCore.Functions.Notify('Acción ejecutada!', 'success')
end

Agregar Acción a Toggle

1. En tu pestaña, define el action:

{
    label = "MI TOGGLE",
    action = "miToggle",  // <-- Este es el nombre
    default = false
}

2. En client.lua, busca RegisterNUICallback('toggleAction'

3. Agrega tu código:

if action == "miToggle" then
    Settings.miToggle = enabled
    -- Tu código aquí
    QBCore.Functions.Notify('Toggle: ' .. (enabled and 'ON' or 'OFF'), 'success')
end

Cambiar Iconos

Visita: https://fontawesome.com/icons

Busca tu ícono y usa el formato: fa-solid fa-NOMBRE

Ejemplos:

  • fa-solid fa-car → 🚗

  • fa-solid fa-star → ⭐

  • fa-solid fa-heart → ❤️

  • fa-solid fa-user → 👤

  • fa-solid fa-gun → 🔫

Tamaños de Columnas

Para botones, usa col para definir el ancho:

col = 12  // Un botón por fila (100%)
col = 6   // Dos botones por fila (50%)
col = 4   // Tres botones por fila (33%)
col = 3   // Cuatro botones por fila (25%)

Última actualización