STG ScriptsDocumentation
Wallet System V2

Configuration

Every option in STG Wallet System V2 config.lua, from wallet items, keybind and money actions to ID cards, licenses, the admin panel and license control.

All settings live in stg-walletv2/config.lua. The file stays editable in the escrow version. Restart the resource after a change.

Language

Config.Language = "en"

Available: en, de, fr, es, pt, it, nl, pl, sv, ar, jp, zh, he, fi, bg, cs, ko. To change a text, edit the matching file in stg-walletv2/locales/. The staticCards block in each locale file sets the names and titles of the identity, job, driver and weapon license cards.

General

Config.Debug = false
Config.MoneyActions = true
Config.Nationality = "UNITED STATES"
Config.MoneyType = "dollar"
Config.WalletSize = 1.3

Prop

Type

To use another currency picture, replace money-dollar.png and money2-dollar.png (or the euro pair) in stg-walletv2/html/images/.

Card header

Config.CountryName = "UNITED STATES OF AMERICA"
Config.CountryFlag = "us"

Prop

Type

Wallet items

Config.WalletItems = {
    "black_wallet",
    "purple_wallet",
    "brown_wallet"
}

Items that open the wallet when used. The item name also picks the wallet picture: html/images/wallets/<item name>.png.

Adding a wallet

Add the new item name, for example red_wallet, to Config.WalletItems.

Put a red_wallet.png in stg-walletv2/html/images/wallets/.

Add the item to your inventory the same way as the default wallets in Installation. On ox_inventory, set client.color to red_wallet.

Keybind

Config.Key = {
    active = false,
    key = "F3",
    needItem = true,
    no_item_notify = true,
    defaultColor = "black"
}

Prop

Type

Admin panel

Config.Panel = {
    command = "panel",
    groupPermissions = {
        "god",
        "admin"
    },
    identifierPermissions = {
        "steam:110000112345678",
        "license:1234567890abcdef1234567890abcdef12345678",
        "discord:397358061548863498",
    }
}

Prop

Type

The panel has three tabs:

  • Players: pick an online player to see every custom license card and give or remove it.
  • Create Card: design a new card. A License Card needs a license name (the license type a player must own, for example fishing), a label, a title, a background, a logo and a header color. A Job Card needs a job name instead of the license fields and shows up for every player with that job.
  • Edit Card: change or delete the cards you created.

Backgrounds and logos accept an image URL or a path inside html/, such as images/backgrounds/city.png. Custom cards are saved in the stg_wallet table.

License control

Config.LicenseMenu = {
    active = true,
    command = "licensecontrol",
    distance = 5.0,
    jobs = {
        "police",
        "sast",
        "sheriff"
    },
    licenses = {
        { name = "drive_a", label = "A Class License" },
        { name = "drive_b", label = "B Class License" },
        { name = "drive_c", label = "C Class License" },
        { name = "drive_h", label = "Helicopter License" },
        { name = "drive_p", label = "Pilot License" },
        { name = "drive_boat", label = "Boat License" },
        { name = "weapon", label = "Weapon License" },
        { name = "heavy_weapon", label = "Heavy Weapon License" },
    }
}

A menu for the listed jobs to give or take licenses from nearby players. With ox_target running, the jobs also get a License Control option when they target a player.

Prop

Type

Static cards

Config.StaticCards sets the four built in cards: identity, job, driver_license and weapon_license.

Config.StaticCards = {
    ["identity"] = {
        active = true,
        name = "identity",
        background = "images/backgrounds/city.png",
        logo = "images/cityLogo.png",
        defaultColor = "#1a1a1a"
    },
    ["job"] = {
        active = true,
        name = "job",
        hideIfCustomExists = true,
        background = "images/backgrounds/city.png",
        logo = "images/cityLogo.png",
        defaultColor = "#2c3e50",
    },
    ["driver_license"] = {
        active = true,
        name = "driver_license",
        background = "images/backgrounds/city.png",
        logo = "images/logos/ls.png",
        defaultColor = "#3e2723",
        licenses = {
            { label = "A", license_name = false },
            { label = "B", license_name = "drive_b" },
            { label = "C", license_name = "drive_c" },
            { label = "H", license_name = "drive_h" },
            { label = "P", license_name = "drive_p" },
            { label = "S", license_name = "drive_boat" }
        }
    },
    ["weapon_license"] = {
        active = true,
        name = "weapon_license",
        background = "images/backgrounds/city.png",
        logo = "images/logos/ls.png",
        defaultColor = "#4a6c55ff",
        licenses = {
            { label = "Pistol", license_name = "weapon" },
            { label = "Heavy Weapons", license_name = "heavy_weapon" }
        }
    }
}

Prop

Type

License classes

Each entry in licenses is one class:

ValueMeaning
labelText on the card. On the driver license every class is shown and the owned ones light up. The weapon license lists only the owned ones.
license_nameLicense type the player must own, as given by your driving school, gun shop or the license menu. Set to false to treat the class as owned by everyone.

The driver and weapon license cards only appear when the player owns at least one of their classes. The default A class is false, so every player carries a driver license card.

On ESX, licenses are read from the user_licenses table of esx_license. On QBCore and QBOX they are read from the player's licences metadata, where the default types are driver and weapon. Set license_name to the types your server really uses.

Display times

Config.Time = {
    show_card = 5000,
    show_money = 5000,
    animation = 300
}

Prop

Type

Props

Config.Props = {
    show_card = "prop_cs_swipe_card",
    show_money = "prop_cash_pile_01"
}

Props the player holds for three seconds while showing a card or money to someone.

Badges

Config.Badges = {
    "police",
    "ambulance"
}

Jobs that see a badge inside their wallet. The badge image is html/images/badges/<job>.png, so add a picture with the job name when you add a job.

Money rain

Config.RainMoney = {
    active = true,
    amount = 100
}

Prop

Type

Send money, show money and money rain all go to the nearest player within 3 metres.

Notifications

Config.Functions = {
    ["helpNotify"] = function(message, icon)
        lib.showTextUI(message, { position = "right-center", icon = icon })
    end,

    ["hideHelpNotify"] = function()
        lib.hideTextUI()
    end,

    ["notify"] = function(type, message)
        lib.notify({ title = getMessage('notify_title'), description = message, type = type, duration = 5000 })
    end
}
  • helpNotify / hideHelpNotify: the key hint shown during money rain.
  • notify: every other message. Replace the bodies to use your own notification system.

Walking

Config.CanWalk = {
    active = true,
    disabledControls = {
        32, 33, 34, 35,
        24, 25, 140, 141, 142,
        1, 2,
        21, 22, 23, 44, 36, 37, 322,
    }
}

Prop

Type

Interface colors

The accent colors of the wallet are CSS variables in stg-walletv2/html/config.css:

:root {
    --main-color: #18fff3;
    --main-color-2: #83ffe6;
    --main-color-3: rgba(63, 120, 112, 0.95);
    --main-color-4: rgba(39, 67, 62, 0.58);
    --main-color-5: rgba(74, 174, 161, 0.95);
}

Still having trouble?

Open a ticket on our Discord. Our team answers around 15 hours a day.

Get help on Discord

On this page