STG ScriptsDocumentation
Wallet System

Configuration

Every option in STG Wallet System config.lua, from the wallet item, card style and ID photo upload to driver licenses, job cards, badges and texts.

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

Language

STG.Language = "en"

Available: en, de, fr. The texts are in the STG.Locale table at the bottom of config.lua. To add a language, copy the en block, rename its key, translate it and set STG.Language to that key.

Besides the messages, each language block holds the text printed on the cards:

KeyWhere it shows
title1 to title4Header lines of the EU identity card
title5Title of the EU driver license
nationCountry code next to the EU flag
usaTitle1, usaTitle2Titles of the USA identity card and job card

General

STG.webhook = ""
STG.showTime = 5000
STG.itemName = "wallet"
STG.CardType = "eu"

Prop

Type

ID photo

Players open their own identity card in the wallet and click the photo. They can paste an image link, or press Camera to take a picture with the phone camera. Camera pictures are uploaded to STG.webhook through screenshot-basic, so the button needs both. The photo is saved in the stg_wallet table and shows on all of the player's cards.

Cards

STG.Cards controls which driver licenses and job cards appear in the wallet. Each entry can describe a driver license, a job card, or both:

STG.Cards = {
    [1] = {
        jobLicense = false,
        jobName = "",
        driverLicense = true,
        driverLicenseName = "drive_bike",
        driverLicenseLabel = "Bike"
    },
    -- ...
}

Prop

Type

Driver license names

driverLicenseName must match the license name your server gives out:

  • ESX: license types from esx_license. The defaults are drive_bike, drive and drive_truck.
  • QBCore and QBOX: keys in the player's licences metadata that are set to true. The default is driver.
  • bit-driverschool: when the bit-driverschool resource is running, licenses are read from its bit_driverschool table instead, on every framework. Use its license types as names.

The player gets one card for every license they hold that has a matching entry.

Adding a job card

The default entries have no job cards. Add an entry for each job that should carry one:

[5] = {
    jobLicense = true,
    jobName = "police",
    jobLabel = "Los Santos Police Department",
    driverLicense = false,
},

The card shows the player's job grade and the job logo from stg_wallet/html/images/logo/: <job>.png for EU cards and <job>-usa.png for USA cards. Logos for police and ambulance are included. For any other job, add both images with the job name as the file name.

Badges

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

Players with one of these jobs see their badge inside the wallet. The image is loaded from stg_wallet/html/images/badges/<job>.png. Badges for police and ambulance are included, add an image for every other job you list.

Cash actions

Players click the euro bill in the wallet to open the cash actions. They all work on the nearest player within 3 metres:

  • Show Money: the other player sees your cash on their screen for STG.showTime.
  • Give Money: enter an amount of at least 100 and hand it over.
  • Money Rain: hold a cash pile and press E to throw 100 cash at the nearest player per press, X to stop.

Cash is always shown in euro.

Notifications

Messages use your framework's own notification, ESX.ShowNotification on ESX and QBCore.Functions.Notify on QBCore and QBOX. To use another system, edit the notify function in stg_wallet/notify.lua. This file also stays editable in the escrow version.

Still having trouble?

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

Get help on Discord

On this page