Real Wallet / Configuration
Cards
Config.Cards
Every item listed here is a card. Only label is needed.
Lua
Config.Cards = {
id_card = { label = 'ID card', design = 'id' },
driver_license = { label = 'Driver license', design = 'license' },
weaponlicense = { label = 'Weapon license', design = 'weapon' },
bank_card = { label = 'Bank card', design = 'credit', bank = 'Fleeca', kind = 'Debit' },
credit_card = { label = 'Credit card', design = 'credit', bank = 'Maze Bank', kind = 'Credit', colors = { '#3a0c12', '#a02233', '#fbf1ec' } },
-- QBCore's bank card items (uncomment if your server has them):
-- visa = { label = 'Visa card', design = 'credit', bank = 'Fleeca', kind = 'Debit' },
-- mastercard = { label = 'Master card', design = 'credit', bank = 'Maze Bank', kind = 'Credit', colors = { '#3a0c12', '#a02233', '#fbf1ec' } },
}
The key is the item name in ox_inventory (not its label).
Options
| Option | What it does |
|---|---|
label |
The card's name: on the tag, in messages, in the card viewer. Needed. |
design |
The built-in look when the card has no art: 'id', 'license', 'weapon', 'credit' (a bank card) or 'plain' (the placeholder, the default). |
title |
The words across the top of an id, license, weapon or plain card. Default: the design's title from Config.CardText (the label for plain). |
art |
Your own image of the card's front: 'cards/<file>.png'. See Your own card art. |
photo |
With art: where the holder's photo goes, { x =, y =, w =, h =, r = corner radius }. false = no photo. |
text |
With art: what is written where. A list of { field, x =, y =, size =, color =, bold =, upper =, max = }. |
bank |
A bank card's bank name. It wins over the card's metadata: leave it out to show the bank your bank script stored on the card (Config.CardFields.bank), then Config.CardText.bank. |
kind |
A bank card's word at the top right, e.g. 'Debit' or 'Credit'. |
brand |
A bank card's word at the bottom right. nil = two rings. |
colors |
A bank card's colours: { from, to, text } (a gradient and the text colour). |
show |
false: it can not be held out to someone. |
hand |
false: it can not be handed over. |
enabled |
false: not a card any more. It stays an ordinary item in the pockets; one already in a wallet stays there until you turn it back on. |
Examples
Lua
-- any other card, with the placeholder design until you give it art
gym_pass = { label = 'Gym pass' },
-- a pass drawn with the ID design and its own title
lawyerpass = { label = 'Lawyer pass', design = 'id', title = 'STATE BAR LICENSE' },
-- a bank card nobody can hand over
black_card = { label = 'Black card', design = 'credit', bank = 'Maze Bank', kind = 'Credit', brand = 'BLACK', hand = false },
-- your own art (put the image in ryan-wallet/cards/)
business_card = {
label = 'Business card', art = 'cards/business_card.png',
photo = { x = 40, y = 150, w = 260, h = 330, r = 8 },
text = {
{ 'fullname', x = 340, y = 250, size = 40, bold = true, upper = true, max = 620 },
{ 'number', x = 340, y = 320, size = 30, color = '#b8202a' },
},
},
Config.CardFields
Where a card item keeps each detail in its metadata. For each detail the wallet tries every name in its list, in order, and uses the first one found. Add your ID script's names to the lists.
| Detail | Names looked for (default) |
|---|---|
owner |
citizenid, identifier, owner, cid, charid, charId, citizenId, id |
firstname |
firstname, firstName, first_name, fname, forename, PlayerName |
lastname |
lastname, lastName, last_name, lname, surname, PlayerSurname |
fullname |
fullname, fullName, full_name, firstAndLastName, name, holder (split into first and last name when there is no first / last name) |
dob |
birthdate, dob, dateofbirth, dateOfBirth, date_of_birth, birthDate, birthday, PlayerDob |
sex |
sex, gender, PlayerSex |
nationality |
nationality, country, origin |
height |
height |
number |
number, cardNumber, cardnumber, card_number, cardId, license_id, licenseId, licenseNumber, document_id, IdCard, serial, cref |
issued |
issued, issueDate, issue_date, issued_at, issuedAt, issuedOn, Released |
expires |
expires, expiry, expiration, Expiration, expirationDate, expireDate, expire_date, expires_at, expiresAt, exp |
class |
class, licenseClass, license_class |
bank |
bank, bankName, bank_name, issuer |
photo |
mugShot, mugshot, photo, photoUrl, photo_url, imageURL, imageUrl, Screen, picture, headshot |
What the values may look like:
- Dates:
YYYY-MM-DD,MM/DD/YYYY,DD/MM/YYYYor a Unix timestamp (seconds or milliseconds). They print asMM/DD/YYYY. - Sex:
0/1,'m'/'f','male'/'female'. They print asM/F. - Photo: an
https://link, adata:image, or plain base64. - Empty values,
'none'and'unknown'count as missing.
Config.CardText
What the built-in designs say. A card's own title / bank in Config.Cards comes first.
Lua
Config.CardText = {
state = 'SAN ANDREAS',
id = 'IDENTIFICATION CARD',
dl = 'DRIVER LICENSE',
weapon = 'FIREARM PERMIT',
weaponIssuer = 'Office of the Sheriff',
bank = 'Fleeca',
validYears = { id = 8, dl = 5, weapon = 2, credit = 4, plain = 5 },
}
| Setting | What it does |
|---|---|
state |
The state name across the top of the ID, license and permit. |
id, dl, weapon |
The titles of the three designs. |
weaponIssuer |
Who issued the firearm permit. |
bank |
The bank of a bank card that names none. |
validYears |
A card that carries no expiry date expires this many years after its issue date, per design. |
Config.RealCards
The real card faces drawn on the cards in your own hand.
Lua
Config.RealCards = { enabled = true, size = 1024, paintMs = 500, photo = 'auto' }
| Setting | What it does |
|---|---|
enabled |
false = the plain card props only, no details on your own cards. |
size |
The size of the drawn card texture, in pixels. |
paintMs |
How long a card face gets to draw before it goes on the prop. |
photo |
Your photo on your own cards: 'auto' (MugShotBase64 when it runs, else the game's headshot), 'headshot', 'mugshot', or false (a silhouette). |
Config.Show
A card held out to someone.
Lua
Config.Show = { ms = 6000, maskNumber = true }
| Setting | What it does |
|---|---|
ms |
How long the card stays on their screen, in milliseconds. |
maskNumber |
true: a bank card shown to someone shows only its last 4 digits. false: the whole number. |
Still stuck? Open a ticket in the Ryan Studios Discord and we'll help you out.