FiveM introductions script

Introductions documentation

Nobody knows your name until you introduce yourself. Everyone shows as Stranger over their head until you meet them in character. Realistic roleplay: masks, helmets and tinted windows make you a stranger again.

  • Version 1.0.2
  • Requirements: FXServer build 35245+, OneSync (the manifest declares /onesync), ox_lib and oxmysql.
  • Frameworks: QBCore · Qbox Legacy · 'custom' (see Integrations / Custom)
  • Languages: es · en
  • No lock-in: rolo_notify and every other ROLO SCRIPT resource are optional. Without rolo_notify the script uses its own built-in bubble, ox_lib or the base game.
  • No tickets needed: everything you may want to adapt is in open files (see Escrow: what is open).

What's new in 1.0.2: Qbox usable items work (CreateUseableItem); the business_card item comes ready to paste for ox_inventory / origen_inventory and QBCore / Qbox, with its export set, and with its picture; Config.Phone ('auto' or 'custom') to connect another phone script; Config.Inventory ('auto' or 'custom') for business cards with your own inventory; Config.Interaction = 'custom' to use another target script; 'custom' framework. New keys to merge in your config.lua: Config.Inventory = 'auto', Config.Phone = 'auto'.

Features

  • 🤝 Introductions with a handshake animation and automatic /me; the name is saved forever (or give a fake name, optional).
  • 🪪 Business card item: hand your card to someone and they know you (one way) — optionally with your phone number.
  • 👥 Introduce a friend: introduce two people you know to each other; both accept.
  • 🏷️ Nicknames for anyone, known or not.
  • 👮 Coworker badges: colleagues of the same job group (police, EMS, mechanics...) see a small badge over each other.
  • 🎭 Masks, helmets and tinted windows hide who you are; crouching / stealth can hide the tag completely.
  • 📱 Phone contacts saved on introduction or with a card (lb-phone / qb-phone out of the box, any phone via the bridge).
  • 📒 Tablet with your acquaintances, search, recent encounters and an admin log; /vernombres shows real names for admins.
  • 🎨 Tag colors fully configurable, talking indicator, line of sight, distance.
  • 🔔 Discord logs of introductions and cards.
  • 🌍 Spanish and English, QBCore / Qbox / custom, ox_target / qb-target / your own or the E key.

Dependencies

  • ox_lib
  • oxmysql
  • A framework: QBCore or Qbox (or 'custom')
  • Optional: ox_target or qb-target, a phone script (qs-smartphone, lb-phone, qb-phone), rolo_notify

Installation

  1. Put rolo_introductions in your resources folder and add ensure rolo_introductions after your framework, ox_lib and oxmysql.
  2. The database table is created automatically (install.sql is included too).
    • qb-inventory: registered automatically as usable.
    • ox_inventory / origen_inventory: the line in ox_origen_items.lua already has client = { export = 'rolo_introductions.business_card' }.
    • Image: copy items/images/business_card.png into your inventory's images folder.
  3. Admins: framework groups in Config.AdminGroups, or the ace rolo_introductions.admin.

Commands

Command
/conocidos your tablet
/etiquetas hide / show name tags for yourself
/vernombres admins: real names + ids over heads
/persona menu of the person in front of you (known or not); players can bind a key to it

Accept / decline requests: Y / X (rebindable in Settings > Key Bindings > FiveM).

Interaction: with ox_target / qb-target the player gets one option, "Conocidos", that opens the script's own menu (introduce, business card, introduce a friend, nickname); Config.TargetOpensMenu = false lists every action in the target menu instead. Without a target (or Config.Interaction = 'key') a discreet [E] shows only when you stand still right in front of a stranger (Config.KeyPrompt). Another target script: Config.Interaction = 'custom' (bridge/client.lua).

Phone number (business card): the number comes from the phone script (Quasar Smartphone / Pro, LB Phone) and falls back to the framework's only when no phone script runs. Server console: introphone <id> prints what each phone export returns. Another phone: Config.Phone = 'custom' (bridge/).

Your own systems: Config.Framework, Config.Inventory (business cards), Config.Notify, TextUI and Progress take 'auto' or 'custom' (your code in the open bridge/ files).

Exports (client)

exports['rolo_introductions']:GetKnownName(serverId) -- name or nickname you know them by, or nil
exports['rolo_introductions']:IsKnown(serverId)      -- true if you know their name

Integrations / Custom

Everything you may want to adapt is in open files (config.lua, locales/, bridge/, items/): you never need the escrowed code.

Item export (ox_inventory / origen_inventory, client side): client = { export = 'rolo_introductions.business_card' } (already in items/ox_origen_items.lua). qb-inventory / Qbox / ESX register the item as usable by themselves. If you rename the item in Config.BusinessCard.item, rename it in your item definition too.

Exports: see Exports (client) above. Example, show the name you know someone by in your own UI:

local name = exports['rolo_introductions']:GetKnownName(GetPlayerServerId(PlayerId()))

Console command: introphone <id> (admins and the server console) prints what each phone export returns, to set up the phone number on business cards.

Where to plug in your own system ('custom')

System config.lua Open file and function
Framework: character, admin check, usable items Config.Framework = 'custom' bridge/server.lua: Bridge.GetChar(src) (return { id, name, job, onDuty, phone }), Bridge.IsAdmin(src), Bridge.RegisterUsableItem(item, cb); also fill CustomOnCharLoaded / CustomOnCharUnloaded / CustomOnJobChange (call cb(src) from your framework's events). Client, bridge/client.lua: Bridge.PlayerInfo() (return { name, citizenid, job }), CustomOnLoaded(cb), CustomOnUnloaded(cb) (call cb() from your events)
Inventory (business card item) Config.Inventory = 'custom' Bridge.ItemCount(src, item) and Bridge.RemoveItem(src, item, count) in bridge/server.lua
Phone number on the card Config.Phone = 'custom' Bridge.PhoneNumber(src, char) in bridge/server.lua (return the number, or nil); or force the phone table with Config.PhoneTable
Phone contacts Config.Phone = 'custom' Bridge.AddPhoneContact(name, number) in bridge/client.lua
Target Config.Interaction = 'custom' Bridge.AddPlayerTargets(options, distance) in bridge/client.lua (add the options on every player and set usedTarget; leave it nil to use the E key)
Notifications, "[E]" texts, progress Config.Notify / TextUI / Progress = 'custom' Bridge.Notify, Bridge.ShowText / Bridge.HideText, Bridge.Progress in bridge/client.lua
Dialogs Bridge.TextInput, Bridge.Pick in bridge/client.lua
Discord logs config_server.lua Bridge.Log(title, description) in bridge/server.lua
Coworker badges, tag colours, distances, masks, tints, cooldowns config.lua (Config.JobBadges, TagColors, MaskHidesName, MaskPedModels (ped models whose mask counts), HiddenTints, Handshake...)
Texts (also the Discord log texts: log_* keys) locales/*.lua

Examples:

-- bridge/server.lua  (Config.Phone = 'custom')
function Bridge.PhoneNumber(src, char) return exports['my_phone']:GetNumber(src) end

-- bridge/client.lua  (Config.Phone = 'custom')
function Bridge.AddPhoneContact(name, number) exports['my_phone']:AddContact(name, number) end

Anything you leave empty is skipped and the script keeps working without that part.

Escrow: what is open

These files stay open (editable) when the resource is escrowed, exactly as escrow_ignore in fxmanifest.lua says:

  • config.lua and config_server.lua (Discord webhook, server only);
  • locales/*.lua: every text (game, tablet, kit);
  • bridge/*.lua: bridge/client.lua (notifications, target systems, dialogs, phone contacts) and bridge/server.lua (framework, permissions, items, phone number, offline names, Discord logs);
  • items/*: the business_card item for every inventory and its picture.

The rest of the Lua code (client/, server/, shared/) is encrypted. Everything a buyer may need to adapt has a 'custom' hook in the open files above.

Compatibility

  • Frameworks: QBCore, Qbox, ESX Legacy, 'custom'.
  • Inventories (business cards): ox_inventory, origen_inventory, QBCore / Qbox inventory, ESX, 'custom' (Config.Inventory).
  • Phones: qs-smartphone / qs-smartphone-pro, lb-phone, qb-phone, 'custom' (Config.Phone).
  • Target: ox_target, qb-target, the E key, 'custom' (Config.Interaction).
  • Optional ROLO SCRIPT resources (rolo_notify): used when they run, never required.

Tablet look (Config.TabletCase)

The tablet comes in a rugged case: rubber bumpers in the job's colour, a riveted nameplate on the top, screws, side buttons, status LEDs and the ROLO SCRIPT logo on the bottom bezel (the only logo), and the job's emblem (icon in the case colour + name) on the top-left of the screen. Change the colour, the nameplate text, its icon and the wear ('grease' stains, 'dust'), or use style = 'classic' for the thin frame. How it opens (Config.TabletView): 'hands' = the character takes a real tablet out (everyone sees it), the camera goes first person and the screen rises from below over it, with the game still visible around; closing puts it away and gives the camera back. 'screen' = only the screen.

Notes

  • It only controls the names it draws itself, not names shown by other scripts (phone, chat, HUD...).
  • Phone contacts depend on your phone's API: check Bridge.AddPhoneContact in bridge/client.lua.

ROLO SCRIPT · Support and updates on our Discord.

Secrets: config_server.lua

Discord webhooks and API keys go in config_server.lua, not in config.lua. config.lua is sent to every player's game (FiveM shares it), so anything in it can be read by a cheater; config_server.lua is loaded only by the server. Paste your webhooks there and leave config.lua without secrets.

Stuck?

Write to us in the Discord support channel with the script, your framework and the console error.