🚘
EXPLORE
  • 👋Welcome
  • 🏦Bank Robbery
    • ➡️Install
    • Configuration
    • Client Functions
  • 🎯Target Menu
    • Configuration
    • Client Functions
  • 🚂Train Heist
    • ➡️Install
    • Configuration
    • Client Functions
  • 🚩Turf Wars
    • Configuration
  • 🏎️Car Heist
    • Configuration
  • 🎴Card Menu
    • Client Exports
  • 💻Hack
    • ➡️Install
    • Configuration
Powered by GitBook
On this page
  • OpenMenu
  • Example
  • Options
  • CloseMenu
  • Example
  1. Card Menu

Client Exports

OpenMenu

This export opens the card menu with the given options.

Example

local cards = {
    {
        image = "https://cfx-nui-oss_cardmenu/images/families.png",
        label = "Families",
    },
    {
        image = "https://cfx-nui-oss_cardmenu/images/vagos.webp",
        label = "Vagos",
    },
    {
        image = "https://cfx-nui-oss_cardmenu/images/ballas.webp",
        label = "Ballas",
    },
    {
        image = "https://cfx-nui-oss_cardmenu/images/lostmc.webp",
        label = "Lost MC",
    }
}

exports.oss_cardmenu:OpenCardMenu({
    line = 2,
    canClose = true,
    cards = cards,
    color = "white",
    callback = function (data)
        ShowNotification("Gang Selection", data.label, "You're now a member of ~b~"..data.label.."~s~.")
    end
})

Options

Mandatory
Option
Type
Purpose

line

integer

Maximum number of cards per line.

cards

table (array)

Cards data containing label and image as mandatory data, and any additional data for callback.

callback

function

Function called with the selected card data as argument.

canClose

boolean

Allows the player to close the menu with Esc.

color

string

Any CSS color (hex, color, rgba, ect.)

CloseMenu

This export closes the card menu.

Example

exports.oss_cardmenu()

Last updated 1 year ago

🎴