Posts: 1,679
Threads: 232
Joined: Nov 2009
Reputation:
0
Hello fellahs i had an idea of making a lottery system based on random prizes and random ids
Basically my idea is every 60 minutes lotto will have a random prize between 1m-5m and will pick a random id any idea of how i could make it?
Posts: 1,679
Threads: 232
Joined: Nov 2009
Reputation:
0
I want to make it so it will be a random id of max players of the server
Example if the server has 200 max players it will pick random ids between 0-200 if the one of hte ids which is chosen is online he will get prize
Posts: 515
Threads: 5
Joined: Jun 2007
Reputation:
0
It depends what you want, you could use that code but if MAX_PLAYERS is defined at 200 but there are only 5 players online, there's only 2,5% chance anyone will win. In theory it might take up to 40 hours before someone will win the lottery.
If you use the code i've posted in post #6, there will always be a winner.