[FREE] [ESX + QBCORE] Scratch Tickets 🎫

Welcome to dr-scratching! [v3.1.0]
After scrolling a bit through the releases I found a couple of scratch card resources which looked fairly simple to make. So, I decided to make my own one.

Features

  • ESX and QBCore
  • NUI included. Not just a boring ‘use item’ and get money
  • Language configuration for ESX (includes currency, notifications, …)
  • Really customizable! (Change e.g. win/lose changes, price money, notifications, scratch amount, …)
  • Included .sql file. Easily addable to existing items (so you could add it to your shop)
  • Built-in debug mode
  • Built-in cooldown system, gamble responsible kids :relieved:
  • Lightweight resource!
  • Discord Webhook

Config

  • Cooldown timer (can be set to 0, so disabled)
  • Show notification on active cooldown?
  • Show notification when using a ticket?
  • Show notification of your winnings?
  • Required scratching surface which has to be removed in order for price to be detected
  • Debug mode
  • Win chances, prices & messages of prices
  • Webhook options (display only wins, only losses, both? …)

Installation
[ESX] dr-scratching Installation Wiki
[QBCore] dr-scratching Installation Wiki

Showcase

Preview

Download

GitHub
GitHub QBCore

If you find any issues, please report them via GitHub Issues, GitHub Issues QBCore or below in the replies. Cheers

xDreamLand aka Ruwbix :mascot:

32 Likes

Great release! Works very well, good work! :slight_smile:

1 Like

Very cool, thanks to share free

2 Likes

Hey every time I use a scratch card I can’t move my mouse any more. How can I fix the error?

add it to close inventory items that should fix the issue.

How cann i do this ?

I have this problem too.
I also added it to the inventory config
The inventory also closes.

Where do i get these scratch cards

2 Likes

I like this script also has Good UI, but the script has Security flow players that can change the value of the money and send the server. I post a pull request if you guys are interested.

Pull request

1 Like

Cool UI. Very nice. Good job

1 Like

V1.1 Bug Fixes & Security Flaws fixes! :mascot:

  • Issues with the scratch card not dissapearing after usage have now been fixed. This was due to post requests being made which required the resourcename to be identical. Script is now checking for the resource name instead of to assume it’s still the same.
  • Thanks to @Electwix certain possible/unlikely security flaws have been resolved.

Old source code has been replaced. I recommend to update the resource if you have already downloaded it. No progress is saved locally so you can just go ahead and replace all the old files with the new ones.

If you have any concerns, improvements or recommendations, please say so and I’ll get to work.

xDreamLand aka Ruwbix :mascot:

2 Likes

@KilianYT @XarocTV

Hey every time I use a scratch card I can’t move my mouse any more. How can I fix the error?

I have this problem too.

Issue has been resolved. This was due to you changing the resourcename. Please update to the latest version and you’re able to freely change the resourcename!

@P691

Where do i get these scratch cards

Follow the installation guide: /giveitem [your_playerid] scratch_ticket 1

Great script i love it.

1 Like

This is an awesome addon! I will be using on my server! Thank you!

1 Like

Great ui !

1 Like

Very awesome! Was looking for something like this! Well done !

1 Like

Hey sweet job, is it possible to configure it that people can win items too?

1 Like

Its open source so you can probably change the code a bit if you know what your doing. Its not a configurable option as of now, if you want to I can probably add it in a new update?

1 Like

That would be amazing if you did :smiling_face_with_three_hearts:

1 Like

V1.2 Items as prices, cleaner logs, security layers and more! :mascot:

  • You can now choose between money and items as a price! It works the exact same, you will just receive an item instead of money. Thank you @Muwah for the suggestion!
  • Easy Config, ya that’s right. I made the config more readable and I added the ability to add items. Also each element in an object (price) now has a key in front of it so It is more easy to see what you are actually changing instead of guessing what it’s supposed to do.
  • Even more security layers. Uhuh! It’ll do some more checks to see if a legit scratch card is being used.
  • Cleaner logs! Debug & important (abuse/duping/…) logs will be a bit cleaner and have a little colored prefix.
  • Cleaner code. Just did some small adjustments which I saw which will hopefully make it more easy for y’all to change it however you like.

No major security flaws have been found so If you want to stick to an older version, please do so. If you want to be up-to-date and have the ability to add items as prices you can just replace your old files with the new ones. NOTE: Your old prices will be reset as a new/cleaner method is used within the config file, sorry! You can however just take the values of your old prices and paste them in, concept is the same.

If you have any concerns, improvements or recommendations, please say so and I’ll get to work.

xDreamLand aka Ruwbix :mascot:

1 Like