Garry's Mod Leaks

Lottery system

Submitted by georgemare, , Thread ID: 166988

Thread Closed
14-04-2020, 01:45 PM
#1
Description
This script comes with a full lottery system that allows players to buy a ticket, increasing the lottery pot and get a chance to win the lottery pot. Each ticket even has a unique barcode(for looks). The interval between lotteries and the cost of tickets is easily adjustable. Players that win while being offline get their won lottery money upon joining.
For TTT, pointshop points are used instead.
Other gamemodes than DarkRP or TTT
Currently supports TTT(should work for any gamemode with pointshop), DarkRP 2.6+ and any older version.
I can edit the addon to work with any gamemode for a small fee.
Installation (FOR DarkRP)
To install, simply download the zip file and extract the DarkRP folder (USE lottery system darkrp2.5 folder if your DarkRP version is above 2.5) to your server's addon folder. Once extracted proceed to step 1 if you'd like to change the npc model, lottery interval or ticket prices or skip to step 2.
Step 1.
Go to the extracted folder and open this file: \Lottery system\lua\entities\npc_lottery_sys\init.lua
Once open, in the first few lines you will see a model like "models/Humans/Group02/male_02.mdl", you can replace this to use a different model.
Ticket Price: in the line where it says TicketPrice there are two numbers encased in { } with a comma in between. This means that the lottery system will use all numbers in between them each lottery. Ex. {1, 100} would make the ticket price anywhere from 1 to 100 each lottery round. Setting 2 exact same numbers will make it not use random numbers.
Ticket Time: in the line where it says TicketTime there are two numbers encased in { } with a comma in between. This is the interval for the lottery system to pick how long the lottery will last. These numbers are in SECONDS, meaning if you want the lottery to be between 1 to 2 days, you would use {86400, 172800}. Using two of the same numbers will make it use an exact interval.
Step 2.
Start your server up and go to the place where you desire the NPC to stand at. Make sure to aim where you want it to aim. Type lottery_setpos in console to set the lottery NPC position. The NPC will keep using that position and angle every restart unless you change it with "lottery_setpos".
Installation (FOR TTT)
Open \ttt lottery system\lua\autorun\server\sv_lottery.lua
Line 3 you can edit the chat command.
Line 4 is the starting pot size.
Line 5 is the ticket price.


download
https://anonymousfiles.io/irAZVvLL/
Line 6 is the duration time for each lottery.

RE: Lottery system

This post was last modified: 18-12-2020, 04:01 AM by jiger21
Warned
#2
14-04-2020, 01:45 PM
georgemare Wrote:
Description
This script comes with a full lottery system that allows players to buy a ticket, increasing the lottery pot and get a chance to win the lottery pot. Each ticket even has a unique barcode(for looks). The interval between lotteries and the cost of tickets is easily adjustable. Players that win while being offline get their won lottery money upon joining.
For TTT, pointshop points are used instead.
Other gamemodes than DarkRP or TTT
Currently supports TTT(should work for any gamemode with pointshop), DarkRP 2.6+ and any older version.
I can edit the addon to work with any gamemode for a small fee.
Installation (FOR DarkRP)
To install, simply download the zip file and extract the DarkRP folder (USE lottery system darkrp2.5 folder if your DarkRP version is above 2.5) to your server's addon folder. Once extracted proceed to step 1 if you'd like to change the npc model, lottery interval or ticket prices or skip to step 2.
Step 1.
Go to the extracted folder and open this file: \Lottery system\lua\entities\npc_lottery_sys\init.lua
Once open, in the first few lines you will see a model like "models/Humans/Group02/male_02.mdl", you can replace this to use a different model.
Ticket Price: in the line where it says TicketPrice there are two numbers encased in { } with a comma in between. This means that the lottery system will use all numbers in between them each lottery. Ex. {1, 100} would make the ticket price anywhere from 1 to 100 each lottery round. Setting 2 exact same numbers will make it not use random numbers.
Ticket Time: in the line where it says TicketTime there are two numbers encased in { } with a comma in between. This is the interval for the lottery system to pick how long the lottery will last. These numbers are in SECONDS, meaning if you want the lottery to be between 1 to 2 days, you would use {86400, 172800}. Using two of the same numbers will make it use an exact interval.
Step 2.
Start your server up and go to the place where you desire the NPC to stand at. Make sure to aim where you want it to aim. Type lottery_setpos in console to set the lottery NPC position. The NPC will keep using that position and angle every restart unless you change it with "lottery_setpos".
Installation (FOR TTT)
Open \ttt lottery system\lua\autorun\server\sv_lottery.lua
Line 3 you can edit the chat command.
Line 4 is the starting pot size.
Line 5 is the ticket price.


download
https://anonymousfiles.io/irAZVvLL/
Line 6 is the duration time for each lottery.




It says file deleted, please please hook me up with the file

File says deleted, please please hook me up with it

Users browsing this thread: 1 Guest(s)