Legends: Business Menu Script

Legends: Business Menu Script

Welcome to the Legends: Business Menu Script for RedM. This script enhances roleplaying by allowing players to create, view, and manage custom business menus. Built on the VORP framework, it integrates various utilities to provide a seamless experience.

Price: 10 USD

Features at a Glance

:art: Custom Business Menus: Players can set up business menus with custom images.

:world_map: Location-Based Menus: Menus are linked to specific locations in the game world.

:hammer_and_wrench: Admin Controls: Only the creator or an admin can remove a business menu.

:speech_balloon: Interactive Prompts: Utilize advanced input prompts to manage menus.

:framed_picture: 3D Text and Sprites: Displays customizable 3D text and sprites at the menu location.

:scroll: Webhook Logging: Logs menu creation and removal events to a Discord webhook.

:lock: Job Restrictions: Only certain jobs can use the business menu item.

Dependencies

  • vorp_core
  • bcc-utils
  • oxmysql
  • vorp_inventory

Installation

  1. Download and Extract: Download the Legends: Business Menu Script and extract it to your server’s resource directory.
  2. Add to Server Config: Add start legends-bmenu to your server.cfg file.
  3. Database Setup: Ensure you have a table set up for storing business menu data. The table name should match Config.DatabaseTable in config.lua.

Configuration

Open the config.lua file and adjust the following settings as needed:

Config = {}

Config.Debug = true -- Developer Mode
Config.DatabaseTable = "legends_businessmenu" -- the DB table name you want to use
Config.Webhook = "YOUR_DISCORD_WEBHOOK_URL" -- Add your webhook URL here

Config.locale = 'en_lang' -- Language currently English so keep it
Config.UseableItem = "flyer" -- The item you want to use for the menu

Config.keys = { -- Prompts keys https://github.com/femga/rdr3_discoveries/tree/master/Controls
    E = 0x41AC83D1,
    R = 0xE3BF959B
}

Config.JobsEnabled = true -- Enable/Disable Jobs

Config.Jobs = {
    ["val_saloon"] = true,
    ["realstate"] = true,
    ["builder"] = true,
    ["val_horsetrainer"] = true,
    ["doctor"] = true,
}

Config.AdminGroup = "admin" -- The admin group name
Config.UserGroups = { "user", "supporter" } -- List of user groups

Config.Texture = {
    Streamed = "generic_textures",
    Name = "selection_box_bg_1c",
    Width = 0.160,
    Height = 0.090,
    R = 0,
    G = 0,
    B = 0,
    A = 180,
    Distance = 3.0 -- Radius to show the menu
}

Config.Text = {
    X = 3.5,
    Y = 3.5,
    Scale = 0.3,
    R = 255,
    G = 255,
    B = 255,
    A = 255,
    Font = 1, -- 0 is the default font
    Centered = true,
    Text = "MENU"
}

Video: Watch Demo

Buy it here: Legends Business Menu

1 Like

Update Details

Client Side Changes

  • Removed manual fetching of character ID, job, and group.
  • Utilized state bags to access LocalPlayer.state for character information.
  • Updated prompt handling logic to use LocalPlayer.state for checking if the player is an admin, user, or any other group you want.
  • Added a helper function to check if the player’s group is a user group.
  • Removed Unnecessary Functions
  • Combined the languages in one file

Server-Side Changes

  • Simplified the fetching logic to remove redundant user group checks since the client now handles these with state bags.
  • Removed the isAdmin function and related checks for user groups.
  • Added Config.AdminGroup to define the admin group name.
  • Added Config.UserGroups to list the user groups (e.g., “user”, “supporter”)

New Feature

  • 3D Scene with Sprites.
  • Added Webhooks for discord.
    Version 1.0.8