red40_punchcard
Preview Video
Features
- Customizable card designs (template included along with three card layouts)
- Customizable punch designs (use any svg, ~20 stamps included)
- Customizable punch sounds (two included)
- Punch information is stored in item metadata
- Punch tools also store information in metadata allowing players to have different stamps from different businesses
- Built in ped spawns to purchase/get cards/punch tools
- Locales for translations
Requirements
- ox_lib
- QBX/QB/ESX
- Bridge files are open for other frameworks
Installation
- Unzip resource to your server resources
- For
ox_inventory
add the following to yourdata\items.lua
punchcard = {
label = 'Loyalty Punchcard',
description = 'Show your business loyalty',
weight = 5,
stack = false,
close = true,
consume = 0,
server = {
export = 'red40_punchcard.punchcard',
}
},
punchtool = {
label = 'Punchcard Tool',
description = 'Add punches to punch cards',
weight = 10,
consume = 0,
stack = false,
close = false,
}
Usage
- Use
punchcard
item from inventory to view punch card. Press escape to close the UI - Swap
punchcard
andpunchtool
in inventory to start punching with that tool. Press escape to close the UI
Exports
-- Replace uwu with type defined in config
exports.red40_punchcard:createPunchCard(source, 'uwu')
exports.red40_punchcard:createPunchTool(source, 'uwu')
Example item for store
{
name = "punchcard",
price = 1000,
count = 100,
metadata = {
label = 'UwU Loyalty Card',
description = 'A special card for UwU enthusiasts.',
maxPunches = 10,
cardImage = './cards/uwu_card.png',
imageurl = 'https://cfx-nui-red40_punchcard/web/build/inventory/loyalty_card.png'
},
type = 'item'
},
{
name = "punchtool",
price = 1000,
count = 100,
metadata = {
label = 'UwU Punch Tool',
description = 'A special punch tool for UwU employees.',
imageurl = 'https://cfx-nui-red40_punchcard/web/build/inventory/stamp_tool.png',
image = './tools/cat.svg',
style = 'stamp',
width = 2,
scale = 3,
strokeColor = '#FFFF00',
sound = './sounds/stamp.ogg'
},
type = 'item'
},
server.cfg
ensure red40_punchcard
or
ensure [red40]
Requirements
Last updated on