Jump to content
MakeWebGames

[mccode v2] Lottery


Akash
 Share

Recommended Posts

This mod basically allows you to purchase upto 100 lottery tickets, which can be easily changed. Each ticket is x amount, $100 in my case, and everytime a user buys a ticket, $x is added to the jackpot. Then a weekly cron chooses a random winner and credits them with the jackpot.

Please note I did create this myself :). Hope you all enjoy. Screenshots are unnecessary. I have posted for V1+V2 but not 100% if V1 is fully working. I'm testing it now.

 

For V2 ONLY!

1. Create a file called lottery.php

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

2. Then add the following sql:

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

3. Finally create a weekly cron file (cron_weekly.php) and add the following:

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

 

ENJOY :wink:

Sorry if something similar has been made before, but I assure you the code style is different. Please report any bugs :).

Link to comment
Share on other sites

  • Replies 89
  • Created
  • Last Reply

Top Posters In This Topic

Re: [Free V2] Lottery

i have found a error

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/chrisell/public_html/lottery.php:2) in /home/chrisell/public_html/globals.php on line 6

Link to comment
Share on other sites

Re: [Free V2] Lottery

It's not MCCodes? Well obviously it's not going to work then :|.

Joker, I already told you on MSN that it works fine on V2 must be something you've edited elsewhere.

The Jackpot goes out whenever you set it. I run that cron_weekly.php every week so the jackpot goes out weekly but you can do it daily or every few days.

Link to comment
Share on other sites

Re: [Free V2] Lottery

lol i heard jokers using his knowledge of injections to hack games... bad idea mate i'd stop since you did it to the wrong site and their after your balls on a silver platter :-D

they even asked me to help them but i don't get involved in crimes...

have fun

also nice mod Akash,

Joker is a little dumb so give him time to understand why it doesn't work mate... he's slow...

Link to comment
Share on other sites

Re: [Free V2] Lottery

 

lol i heard jokers using his knowledge of injections to hack games... bad idea mate i'd stop since you did it to the wrong site and their after your balls on a silver platter :-D

they even asked me to help them but i don't get involved in crimes...

have fun

also nice mod Akash,

Joker is a little dumb so give him time to understand why it doesn't work mate... he's slow...

hmm yeah, I just happen to notice Joker is a bit stupid. Not only does he attempt to hack games but apparently he hacked some guys email/msn... :-P (Course he did :wink:). I get MSN messages from him saying "try n hack my game". And he thinks it's impossible...well he's wrong.

LOL

Link to comment
Share on other sites

Re: [Free V2] Lottery

i was on a game earlier he threated to hack everyone i showed him my ip turned off my firewall n av's and give him the telnet command he still couldn't do it... now that shows how much of a noob he is.

i personally hate posting stuff on ce cause of him being here i wont be posting free mods anymore anyways not for him to use,

he actually got his msn accounts owned lol all 4 of them the other week.

Karma sucks doesn't it ellis :wink:

lmfao

Link to comment
Share on other sites

Re: [Free V2] Lottery

 

hmm yeah, I just happen to notice Joker is a bit stupid. Not only does he attempt to hack games but apparently he hacked some guys email/msn... :-P (Course he did :wink:). I get MSN messages from him saying "try n hack my game". And he thinks it's impossible...well he's wrong.

LOL

Thats very true i have people mailing me on msn saying he hacked their games using sql injections i wonder were he was taught them...

lmao he actually threatened to kill someone when he comes to england with his gun...<~he doesn't know england then huh we should tell him to goto Nottingham or Manchester maybe Liverpool that would be hilarious.

Link to comment
Share on other sites

Re: [Free V2] Lottery

Ummm....I think I have found a slight problem: (this is from my DB)

Full Texts id userid amount jackpot

Edit Delete 1 1 100 1800

Edit Delete 2 1 100 1700

Edit Delete 3 1 100 1600

Edit Delete 4 1 100 1500

Edit Delete 5 1 100 1400

Edit Delete 6 1 100 1300

Edit Delete 7 1 100 1200

Edit Delete 8 1 100 1100

Edit Delete 9 1 100 1000

Edit Delete 10 1 100 900

Edit Delete 11 1 100 800

Edit Delete 12 1 100 700

Edit Delete 13 1 100 600

Edit Delete 14 1 100 500

Edit Delete 15 1 100 400

Edit Delete 16 1 100 300

Edit Delete 17 1 100 200

Edit Delete 18 2 100 1600

Edit Delete 19 2 100 1500

Edit Delete 20 2 100 1400

Edit Delete 21 2 100 1300

Edit Delete 22 2 100 1200

Edit Delete 23 2 100 1100

Edit Delete 24 2 100 1000

Edit Delete 25 2 100 900

Edit Delete 26 2 100 800

Edit Delete 27 2 100 700

Edit Delete 28 2 100 600

Edit Delete 29 2 100 500

Edit Delete 30 2 100 400

I have highlighted the problem in RED

I am ID 1, and I bought 15 tickets, so the jackpot read £1500. Then when ID 2 bought a few tickets, it didn't change in the actual game. It seems that each user has their own jackpot....anyone know how to fix this...? :-P

The ID for the ticket bought, I think is wrong.... ID 1 should have a jackpot of £100...therefore ID 18 should have a jackpot of £1,800.... :)

Link to comment
Share on other sites

Re: [Free V2] Lottery

 

i was on a game earlier he threated to hack everyone i showed him my ip turned off my firewall n av's and give him the telnet command he still couldn't do it... now that shows how much of a noob he is.

i personally hate posting stuff on ce cause of him being here i wont be posting free mods anymore anyways not for him to use,

he actually got his msn accounts owned lol all 4 of them the other week.

Karma sucks doesn't it ellis :wink:

lmfao

ha zero yes i new it was u

and ps

where u scared to show ur name..?...

Link to comment
Share on other sites

Re: [Free V2] Lottery

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNIX_TIMESTAMP(),0,'You won the weekly lottery and were credited $')' at line 1

INSERT INTO events VALUES('',,UNIX_TIMESTAMP(),0,'You won the weekly lottery and were credited $')

Link to comment
Share on other sites

  • 2 weeks later...

Re: [Free V2] Lottery

Guys...I spologise for the error. However, there is only two main errors,

1. Money is not being credited

2. A new jackpot starts for every person.

I'm editing and fixing them...give me a bit.

Thanks and enjoy the completed mod soon.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


×
×
  • Create New...