Saltar al contenidoSkip to content

Newspaper Job

Recursos:Resources: lt-newspaper (v1.0.0) · lt-printshop (v1.0.0, opcionaloptional).

Note: the script's in-game texts are in Spanish by default. You can translate them in locales/es.lua.

RequisitosRequirements

TipoTypeRecursosResources
ObligatoriosRequiredox_lib, oxmysql
Frameworkqs-core, qb-core oor es_extended (se detecta solo)(auto-detected)
InventarioInventoryqs-inventory uor ox_inventory (se detecta solo)(auto-detected)
OpcionalesOptionalox_target, qs-smartphone, qb-management / esx_society, qs-banking, qs-corevehiclekeys / qb-vehiclekeys
Solo paraOnly for lt-printshopqs-smartphone

InstalaciónInstallation

  1. Descarga el script desde Keymaster → Granted Assets con la cuenta de Cfx.re que compró.Download the script from Keymaster → Granted Assets with the Cfx.re account that bought it.
  2. Copia las carpetas lt-newspaper y lt-printshop dentro de resources/, sin cambiarles el nombre.Copy the lt-newspaper and lt-printshop folders into resources/, without renaming them.
  3. Crea los items (ver Items).Create the items (see Items).
  4. Instala el trabajo según tu framework (ver Trabajo).Install the job for your framework (see Job).
  5. Añade al server.cfg, siempre después del framework, el inventario y el móvil:Add to server.cfg, always after your framework, inventory and phone:
ensure ox_lib
ensure oxmysql
ensure lt-newspaper
ensure lt-printshop   # opcional / optional (qs-smartphone)

add_ace group.admin lt_newspaper.admin allow

Las tablas de la base de datos se crean solas al arrancar (newspaper.sql y printshop.sql); importarlas a mano es opcional. Si actualizas el script, las columnas nuevas también se añaden solas.

Database tables are created automatically on start (newspaper.sql and printshop.sql); importing them manually is optional. When you update the script, new columns are added automatically too.

Items

El script usa dos items: newspaper y poster. Los nombres se cambian en Config.Items. Peso, imagen y texto son ejemplos: ajústalos a tu servidor.

The script uses two items: newspaper and poster. Names can be changed in Config.Items. Weight, image and label are examples: adjust them to your server.

ox_inventory · ox_inventory/data/items.lua

['newspaper'] = {
    label = 'Periódico',
    weight = 100,
    stack = true,
},
['poster'] = {
    label = 'Cartel',
    weight = 200,
    stack = true,
},

qs-inventory

Créalos con /inventorycreator. Para que el periódico se pueda lanzar desde el inventario, pon en el campo object del item newspaper el modelo prop_cs_rolled_paper (es uno de los modelos que el script busca en Config.Throw.models).

Create them with /inventorycreator. To be able to throw the newspaper from the inventory, set the object field of the newspaper item to prop_cs_rolled_paper (one of the models the script looks for in Config.Throw.models).

Trabajo "Reparto de prensa""Newspaper delivery" job

El trabajo newspaper (3 grados: Repartidor, Repartidor senior y Jefe de reparto) se define en Config.WorkJob.

The newspaper job (3 grades: delivery worker, senior worker and delivery boss) is defined in Config.WorkJob.

  • QS Core: se registra solo al arrancar. No hay que hacer nada.QS Core: registered automatically on start. Nothing to do.
  • ESX: importa lt-newspaper/newspaper_job.sql (se puede ejecutar varias veces).ESX: import lt-newspaper/newspaper_job.sql (safe to run more than once).
  • QBCore: añádelo a qb-core/shared/jobs.lua:QBCore: add it to qb-core/shared/jobs.lua:
newspaper = {
    label = 'Reparto de prensa',
    defaultDuty = true,
    offDutyPay = false,
    grades = {
        ['0'] = { name = 'Repartidor', payment = 120 },
        ['1'] = { name = 'Repartidor senior', payment = 170 },
        ['2'] = { name = 'Jefe de reparto', isboss = true, payment = 240 },
    },
},

Si prefieres que cualquier jugador pueda hacer rutas y pedidos sin tener el trabajo, desactívalo en el editor, pestaña Configuración.

If you'd rather let any player run routes and orders without the job, turn it off in the editor, Configuración (Settings) tab.

Primeros pasos: crear una rutaGetting started: create a route

  1. Entra en el servidor con un usuario que tenga el permiso lt_newspaper.admin y escribe /newspaperadmin.Join the server with a user that has the lt_newspaper.admin permission and type /newspaperadmin.
  2. En la pestaña Configuración, coloca el NPC que da las rutas, los puntos de aparcamiento de la furgoneta y el punto de recogida de cajas. Mientras no los coloques, se usan las posiciones de config.lua.In the Configuración (Settings) tab, place the route NPC, the van parking spots and the box pickup point. Until you place them, the positions from config.lua are used.
  3. En la pestaña Rutas, pulsa Nueva ruta y rellena nombre, pago, tiempos, requisitos y blip.In the Rutas (Routes) tab, click Nueva ruta (New route) and fill in name, payment, times, requirements and blip.
  4. Añade paradas: entras en el modo edición y colocas buzones, carteles en paredes o zonas de lanzamiento con las teclas de abajo.Add stops: enter edit mode and place mailboxes, wall posters or throw zones using the keys below.
  5. Pulsa F para terminar y Guardar. La ruta queda disponible en el NPC.Press F to finish and Guardar (Save). The route is now available at the NPC.

Teclas del modo ediciónEdit mode keys

TeclaKeyAcciónAction
ENTERColocar el puntoPlace the point
ESCSalir (pulsa otra vez para descartar los puntos sin terminar)Exit (press again to discard unfinished points)
BACKSPACEDeshacer el último puntoUndo the last point
FTerminarFinish
GCambiar tipo de paradaChange stop type
HSiguiente modeloNext model
KVoltear el cartelFlip the poster
PAGE UP / PAGE DOWNSeparar o acercar el cartel a la paredMove the poster away from / closer to the wall
RUEDA (ALT + RUEDA)WHEEL (ALT + WHEEL)Girar / cambiar lo que ajusta la ruedaRotate / switch what the wheel adjusts
FLECHASARROWSMover el puntoMove the point

Todas se cambian enAll of them can be changed in Config.Keys.

Cómo lo juegan los jugadoresHow players use it

  1. Hablan con el NPC (blip en el mapa) y eligen una ruta. Pueden invitar a jugadores cercanos (hasta 4).They talk to the NPC (map blip) and pick a route. They can invite nearby players (up to 4).
  2. Recogen la caja en el punto de cajas y la cargan en la furgoneta de la ruta.They pick up the box at the box point and load it into the route van.
  3. En cada viaje sacan periódicos o carteles del maletero.On each trip they take newspapers or posters from the trunk.
  4. Entregan en buzones, pegan carteles o lanzan el periódico: a pie (apuntar y clic) o desde la furgoneta (G).They deliver to mailboxes, put up posters or throw the newspaper: on foot (aim and click) or from the van (G).
  5. Al terminar cobran (efectivo, banco o item) y ganan XP para subir de nivel.When done they get paid (cash, bank or item) and earn XP to level up.

Para abandonar una ruta:To quit a route: /canceldelivery.

Publicidad de negociosBusiness advertising

  1. Prepara las zonas: en el editor, pestaña Encargos negocios, crea zonas y marca en ellas los huecos de pared donde se podrán pegar carteles.Set up zones: in the editor, Encargos negocios (Business orders) tab, create zones and mark the wall slots where posters can be put up.
  2. El negocio encarga: el jefe de un negocio abre la app Print Shop en el móvil, crea su PIN la primera vez y pide carteles con la URL de su imagen, la zona y la cantidad.The business orders: a business boss opens the Print Shop phone app, creates a PIN the first time and orders posters with their image URL, zone and quantity.
  3. Aprobación: por defecto los pedidos se aprueban antes de publicarse, y solo se aceptan imágenes https de los dominios permitidos (i.imgur.com y cdn.discordapp.com).Approval: by default orders are approved before going live, and only https images from allowed domains (i.imgur.com and cdn.discordapp.com) are accepted.
  4. Los repartidores lo cumplen: cogen el pedido, recogen los carteles y los pegan en los huecos marcados. Cobran su parte (por defecto, el 40 %). El resto va a la cuenta de sociedad del trabajo, si existe.Workers fulfil it: they claim the order, pick up the posters and put them up in the marked slots. They get their share (40% by default). The rest goes to the job's society account, if there is one.
  5. Si nadie coge el pedido en 24 h, se devuelve el dinero (configurable).If nobody claims the order within 24 h, the money is refunded (configurable).

Aviso: las imágenes las descarga el juego de todos los jugadores que pasen cerca. Mantén activadas la aprobación y la lista de dominios.

Warning: images are downloaded by the game client of every player passing nearby. Keep approval and the domain list enabled.

ComandosCommands

ComandoCommandQuiénWhoQué haceWhat it does
/newspaperadminAdmin (ACE)Abre el editorOpens the editor
/canceldeliveryJugadorPlayerAbandona la ruta actualQuits the current route
/testorderAdmin (ACE)Crea un encargo sin la appCreates an order without the app
/test orderAdmin (ACE)Crea un pedido de prueba ya aprobadoCreates an already approved test order
/printshoppin <trabajo>Admin (ACE)Borra el PIN de un negocio (PIN olvidado)Resets a business PIN (forgotten PIN)
/printshopstatusJugadorPlayerExplica por qué la app Print Shop se ve o noExplains why the Print Shop app is or isn't visible

Teclas de jugador (cada uno puede cambiarlas en Ajustes → Asignación de teclas → FiveM): E interactuar, G lanzar desde el vehículo.

Player keys (each player can rebind them in Settings → Key Bindings → FiveM): E interact, G throw from the vehicle.

Importante: /test order paga al repartidor con dinero que no sale de nadie. En un servidor abierto, desactívalo con Config.Ads.test.command = ''.

Important: /test order pays the worker with money that doesn't come from anyone. On a public server, disable it with Config.Ads.test.command = ''.

Configuración principalMain configuration

Todo está comentado en config.lua. Lo más habitual:Everything is commented in config.lua. The most common options:

OpciónOptionPara quéPurpose
Config.DebugMensajes de diagnóstico en la consola. Ponlo en false en producción.Diagnostic console messages. Set it to false in production.
Config.Framework / Config.Inventory'auto' o forzar uno concreto'auto' or force a specific one
Config.DefaultsValores con los que nace cada ruta nuevaDefault values for each new route
Config.LevelsXP por nivel y nivel máximoXP per level and max level
Config.GroupTamaño del grupo y si el pago se reparteGroup size and whether pay is split
Config.Vehicles / Config.VehicleFurgonetas disponibles y formato de matrículaAvailable vans and plate format
Config.ThrowLanzamiento a pie y desde el vehículoThrowing on foot and from the vehicle
Config.TrunkUnidades por viaje y qué pasa sin stockUnits per trip and what happens when out of stock
Config.Interaction'auto', 'target' (ox_target) oor 'key'
Config.AdsPrecios, aprobación, dominios, reparto del dinero y webhook de DiscordPrices, approval, domains, revenue split and Discord webhook

Los textos están en locales/es.lua. Para traducir, edita ese archivo. Para usar otros recursos (otro móvil, banco o inventario), adapta los archivos de bridge/.

Texts live in locales/es.lua. To translate, edit that file. To use other resources (another phone, bank or inventory), adapt the files in bridge/.

Problemas comunesTroubleshooting

No se abre el editor conThe editor doesn't open with /newspaperadmin

Falta el permiso. Comprueba el add_ace del server.cfg y que tu usuario pertenece a ese grupo.Missing permission. Check the add_ace line in server.cfg and that your user belongs to that group.

"No se pudo leer la lista de items del inventario"

El inventario no está arrancado antes que lt-newspaper, o no es qs-inventory ni ox_inventory. Revisa el orden del server.cfg.("Could not read the inventory item list") The inventory isn't started before lt-newspaper, or it isn't qs-inventory or ox_inventory. Check your server.cfg order.

"No se pudo registrar el trabajo newspaper"

Solo pasa en QS Core: qs-core debe arrancar antes que el script.("Could not register the newspaper job") QS Core only: qs-core must start before the script.

El periódico lanzado desde el inventario no cuentaA newspaper thrown from the inventory doesn't count

En qs-inventory, el item newspaper debe tener como object un modelo de Config.Throw.models.In qs-inventory, the newspaper item's object must be one of the models in Config.Throw.models.

No veo la app Print Shop en el móvilI can't see the Print Shop app on the phone

Escribe /printshopstatus: te dice el motivo. Solo la ven los jefes de negocio con acceso a los encargos, y necesita qs-smartphone.Type /printshopstatus: it tells you why. Only business bosses with access to orders can see it, and it requires qs-smartphone.

Un cartel sale del revésA poster appears backwards

En el modo edición, pulsa K para voltearlo. Para dejarlo fijo, añade front a ese modelo en Config.PosterModels.In edit mode, press K to flip it. To fix it permanently, add front to that model in Config.PosterModels.

Errores de Escrow (entitlement, verify, parsing)Escrow errors (entitlement, verify, parsing)

Mira la FAQ general.See the general FAQ.

SoporteSupport

¿No lo resuelves? Abre un ticket en nuestro Discord con la versión del script, tu framework e inventario y el error completo de la consola.

Still stuck? Open a ticket on our Discord with the script version, your framework and inventory, and the full console error.