Lottery Tickets

Current Version: 1.5

Notes: Thanks to Netheous for helping me when fixing exploits!


What is this?
This is a lottery system that people can type !lottery and pay (your set price) to buy a ticket! They then see a gui (nice looking on too :)) that they have to click a button to scratch off the ticket… They then see the numbers they got! If there numbers match the winning numbers they win a cash prize! (you set the price) Also there is no way to exploit this… (that i know of) and if they do… they get banned! (you can enable/disable this in the config)

How does the lottery system work?
Well the server automatically generates 3 random numbers from 1-10 and then it generates 3 more random numbers for the client… After both of the numbers are picked you can then see if your numbers matched with the servers and if so you get a prize for every set of numbers you match!

Where can i download this?
You can download the github here

Youtube Video

Change Log

+ Fixed the way things were being done thanks to JamesxX

+ Fixed when a player does not have enough money it will go into -'s

+ Release

Want to suggest a feature? Simply post in the comments below!

Check out my other addons:
NPC Store Robbary
Version check
LMM’s in-game and emai report system
Bail NPC
Lottery Tickets
Mayor Menu/Console
Bind Menu

This made me feel a lot better.

I’m to afraid this will have a John Cena backdoor in it.

Ya caught me XD nope this addon is John cena free lol


  • Blur


How does the number system work? Does it give a random number between 1 and 10? If they get 2 of the same numbers, do they get $1,000? You may want to outline the addon a bit more in the OP.

You should probably look up how string.sub works before you use it :v:

And ditch the net.Receive’s inside SendLotteryTicket. Move them outside the function and you’ll probably need to rewrite a good portion of sv_lmml.
Instead of validating user inputs against the correct values, just use the values you know on the serverside. Unless of course you’re trying to make some kind of trap for people.
Don’t let the user tell the server when to take money for a lottery ticket (LMMLRemoveMoney).

Added to the OP!

[editline]18th January 2016[/editline]

I will look into all of that! Thanks

Small bug fix (1.2 check changelog)

New version!