Current Version: 1.5
Notes: Thanks to [url=https://facepunch.com/member.php?u=225670]Netheous[/url] for helping me when fixing exploits!
WARNING THIS IS ONLY FOR DARKRP AT THE MOMENT!
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 [url=https://github.com/XxLMM13xXgaming/lmm_lottery_ticket]here[/url]
[url=https://www.youtube.com/watch?v=Frlm3qKmP6I]Youtube Video[/url]
[code]
Change Log
V1.5
+ Fixed the way things were being done thanks to JamesxX
V1.2
+ Fixed when a player does not have enough money it will go into -'s
V1.0:
+ Release
[/code]
Want to suggest a feature? Simply post in the comments below!
Check out my other addons:
[url=https://facepunch.com/showthread.php?t=1514106]NPC Store Robbary[/url]
[url=https://facepunch.com/showthread.php?t=1513148]Version check[/url]
[url=https://facepunch.com/showthread.php?t=1512132]LMM's in-game and emai report system[/url]
[url=https://facepunch.com/showthread.php?t=1496159]Bail NPC[/url]
[url=https://facepunch.com/showthread.php?t=1501856]Lottery Tickets[/url]
[url=https://facepunch.com/showthread.php?t=1503818]Shoutbox[/url]
[url=https://facepunch.com/showthread.php?t=1501445]Mayor Menu/Console[/url]
[url=https://facepunch.com/showthread.php?t=1497384]Bind Menu[/url]
[url=https://facepunch.com/showthread.php?t=1487374]PrivKeys[/url]
[QUOTE=XxLMM13xXx;49544066]
Notes: Thanks to [url=https://facepunch.com/member.php?u=225670]Netheous[/url] for helping me when fixing exploits!
[/QUOTE]
This made me feel a lot better.
I'm to afraid this will have a John Cena backdoor in it.
[QUOTE=The Commander;49553241]I'm to afraid this will have a John Cena backdoor in it.[/QUOTE]
Ya caught me XD nope this addon is John cena free lol
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:
[url]https://github.com/XxLMM13xXgaming/lmm_lottery_ticket/blob/master/lua/autorun/server/sv_lmml.lua#L129[/url]
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).
[QUOTE=VeXan;49554177]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.[/QUOTE]
Added to the OP!
[editline]18th January 2016[/editline]
[QUOTE=ms333;49557048]You should probably look up how string.sub works before you use it :v:
[url]https://github.com/XxLMM13xXgaming/lmm_lottery_ticket/blob/master/lua/autorun/server/sv_lmml.lua#L129[/url]
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).[/QUOTE]
I will look into all of that! Thanks
Small bug fix (1.2 check changelog)
New version!
Sorry, you need to Log In to post a reply to this thread.