RVT Banners

Configuración

Las opciones principales de shared/config.lua y el archivo completo.

Todo está en shared/config.lua. Reinicia el resource después de cambiarlo.

OpciónPor defectoQué hace
Config.Framework'standalone'Framework usado para identidad y nombre: standalone, creative, vrp, qb, qbox o esx. Nunca cambia solo.
Config.Resources{ vrp = 'vrp', qb = 'qb-core', qbox = 'qbx_core', esx = 'es_extended' }Nombres de los resources de cada framework, si difieren de los predeterminados.
Config.Permissions.mode'ace'Cómo se concede el acceso: ace (solo ACE), framework (grupos del framework) o either (cualquiera de los dos). Standalone exige ace o either.
Config.Permissions.accessAce'rvt_banner.access'Permiso ACE que abre el estudio.
Config.Permissions.managerAce'rvt_banner.manage'Permiso ACE de gestor: edita y borra banners de cualquiera e ignora el límite por jugador.
Config.Permissions.accessGroups{}Grupos que abren el estudio en QB y ESX (nombres exactos), en modo framework o either.
Config.Permissions.managerGroups{}Grupos de gestor en QB y ESX (nombres exactos), en modo framework o either.
Config.Notification'auto'Avisos en pantalla: auto (Notify en Creative, notificación de GTA en los demás), native o creative.
Config.Command'banners'Comando que abre el estudio, sin la barra.
Config.Access{}Grupos Creative/vRP que abren el estudio en modo framework o either. Creative: { grupo, nivel mínimo }; vRP clásico: { permiso }. Vacío por defecto.
Config.Managers{}Grupos de gestor Creative/vRP: editan, mueven y borran banners de cualquiera e ignoran el límite por jugador. Vacío por defecto.
Config.Limits.total300Máximo de banners en todo el servidor.
Config.Limits.perPlayer40Máximo de banners por jugador (los gestores lo ignoran).
Config.Limits.perVehicle4Máximo de banners en la misma matrícula de vehículo.
Config.Content.maxItems8Elementos por lista.
Config.Content.maxUploadKB512Tamaño máximo, en KB, de una imagen subida desde el PC. Se comprime hasta que quepa.
Config.Content.allowUploadstruePermite subir imágenes desde el PC. En false, solo enlaces.
Config.Content.allowedHosts{}Dominios permitidos en los enlaces. Vacío acepta cualquier https. YouTube siempre pasa.
Config.Render.slots6Banners dibujados a la vez. Cada slot cuesta un navegador integrado.
Config.Render.hdSlots2Cuántos slots usan resolución HD (los banners más cercanos).
Config.Render.resolution{ 1280, 720 }Resolución de los slots HD.
Config.Render.lowResolution{ 640, 360 }Resolución de los demás slots.
Config.Render.defaultDistance300.0Distancia de visualización sugerida en el estudio, en metros.
Config.Render.maxDistance1500.0Mayor distancia que permite el estudio, en metros.
Config.Render.ecoDistance90.0Más allá de esta distancia el vídeo se pausa y la animación se congela.
Config.Render.occlusiontrueNo dibuja banners ocultos tras el mapa.
Config.Audio.fullDistance12.0Distancia (m) hasta donde el sonido suena a volumen completo.
Config.Audio.maxDistance60.0Distancia (m) a partir de la cual el sonido queda mudo.
Config.Creator.maxCamDistance0Limita la cámara libre del estudio a esta distancia del jugador. 0 = sin límite.
Config.Vehicles.enabledtrueActiva los banners en vehículos.
Config.Vehicles.scanRadius150.0Radio (m) en que el script busca las matrículas de banners de vehículo.

Framework y permisos

Config.Framework define cómo el script identifica al jugador. No hay detección automática: la elección es siempre explícita. Config.Permissions.mode define quién tiene acceso: "ace" (por defecto, solo permisos ACE), "framework" (grupos del framework) o "either" (cualquiera de los dos). Los gestores editan los banners de todos e ignoran el límite por jugador; concédelo con cuidado.

  • standalone (por defecto): el propietario es el identificador license: del jugador; sin licencia no hay acceso. Los personajes de la misma licencia comparten los banners. Exige ace o either.
  • creative: pasaporte del vRP Creative (Proxy). Grupos en Config.Access y Config.Managers: { { "Grupo", nivel } }.
  • vrp: vRP clásico (Proxy). Config.Access = { { "banner.use" } } y Config.Managers = { { "banner.manage" } }. Los forks con otras firmas y vRP 2 exigen ajustar open/bridge.lua.
  • qb: qb-core; propietario qb:<citizenid>. En modo framework/either, accessGroups y managerGroups se comprueban con HasPermission.
  • qbox: qbx_core; propietario qbox:<citizenid>. El acceso es siempre por ACE; el empleo y la banda no dan acceso.
  • esx: ESX Legacy; propietario esx:<identificador del personaje>. accessGroups y managerGroups comparan el grupo exacto del jugador.

Cambiar de framework

Cambiar de framework no transfiere propietarios. Los banners antiguos siguen en la base de datos y visibles, pero la nueva identidad no obtiene acceso a ellos; un gestor puede administrarlos. Conserva la copia de la base de datos.

El puente open/bridge.lua (identidad, nombre, autorización y avisos) es editable para adaptar forks. La identidad y el permiso se resuelven solo en el servidor.

Restringir sitios

Para aceptar imágenes solo de alojamientos de confianza, rellena allowedHosts. Los subdominios también valen.

Config.Content.allowedHosts = { 'i.imgur.com', 'cdn.discordapp.com' }
-- Subdomains match too. YouTube links are always accepted.

Servidor cargado

Cada slot de render es un navegador integrado. En servidores con muchos jugadores, baja Config.Render.slots y hdSlots.

Archivo completo (shared/config.lua)
shared/config.lua
Config = {}

-- Framework-independent install. Options: standalone, creative, vrp, qb, qbox or esx.
Config.Framework = 'standalone'
Config.Resources = { vrp = 'vrp', qb = 'qb-core', qbox = 'qbx_core', esx = 'es_extended' }
-- framework: groups below; ace: ACE only; either: any of the two.
-- Standalone requires ace/either. Qbox uses ACE in framework mode too.
Config.Permissions = {
    mode = 'ace',
    accessAce = 'rvt_banner.access', managerAce = 'rvt_banner.manage',
    accessGroups = {}, managerGroups = {}, -- QB/ESX: fill in exact names when using framework/either mode.
}
-- auto uses Notify on Creative and the GTA notification elsewhere. native/creative force one.
Config.Notification = 'auto'

-- Command that opens the studio (create and manage banners)
Config.Command = 'banners'

-- Optional Creative/vRP groups. Empty by default; set only when using framework/either mode.
-- Creative: { { 'YourGroup', level } }; classic vRP: { { 'your.permission' } }.
Config.Access = {}

-- Managers edit, move and delete anyone's banners and ignore the per-player limit
Config.Managers = {}

Config.Limits = {
    total = 300,          -- banners on the whole server
    perPlayer = 40,       -- banners per persistent owner (managers ignore it)
    perVehicle = 4,       -- banners on the same plate
}

Config.Content = {
    maxItems = 8,               -- items per playlist
    maxUploadKB = 512,          -- images uploaded from the PC are compressed to fit here
    allowUploads = true,
    allowedHosts = {},          -- empty = any https link. Example: { 'i.imgur.com', 'cdn.discordapp.com' }
}

Config.Render = {
    slots = 6,                   -- banners drawn at the same time (one embedded browser per slot)
    resolution = { 1280, 720 },  -- resolution of the HD slots (nearest banners)
    hdSlots = 2,                 -- how many slots are HD; the rest use lowResolution
    lowResolution = { 640, 360 },-- resolution of the other slots
    defaultDistance = 300.0,     -- default display distance (m)
    maxDistance = 1500.0,
    ecoDistance = 90.0,          -- beyond this the video pauses and the animation freezes
    visibilityEvery = 100,       -- ms between visibility checks
    occlusion = true,            -- do not draw banners hidden behind the map
    sleepAfter = 500,            -- ms out of sight until video and animation pause
    parkAfter = 10000,           -- ms out of sight until the media is released from memory
    assignEvery = 500,           -- ms between slot reassignments
    lodGuard = 0.004,            -- far away, pushes the banner off the wall (m per m) so building LOD does not cover it; 0 = off
    lodStart = 80.0,             -- from this distance (m)
    lodMax = 0.6,                -- maximum offset (m)
}

Config.Audio = {
    fullDistance = 12.0,  -- full volume up to here
    maxDistance = 60.0,   -- silent from here
}

Config.Creator = {
    maxRay = 200.0,       -- crosshair reach in the free camera
    maxCamDistance = 0,   -- 0 = unlimited free camera; e.g. 400.0 keeps it near the player
    speed = 0.6,
    boostMultiplier = 4.0,
}

Config.Vehicles = {
    enabled = true,
    scanEvery = 1000,     -- ms between nearby-plate scans
    scanRadius = 150.0,
}