Jump to content
MakeWebGames

Recommended Posts

Posted

Ok, i decided to make this mod where users can host their own competition for a set length of time and they set what the reward will be from their own money/crystals. They set a fee to enter the competition and any profit made they recieve.

Users can enter as many times as they wish

Contains:

- 4 PHP

- 1 Cron Edit

- 2 D/B tables

- 1 D/B table Edit

First Create compentry.php

You're unable to view this code.

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

Save that file

 

Create comps.php

You're unable to view this code.

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

Save comps.php

 

Create createcomp.php

You're unable to view this code.

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

Save createcomp.php

 

Create viewcomp.php

You're unable to view this code.

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

Save that file.

 

Run these querys on phpMyAdmin

You're unable to view this code.

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

 

Open cron_hour.php

find

You're unable to view this code.

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

 

After that add

You're unable to view this code.

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

 

Add this link somewhere

You're unable to view this code.

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

 

Thats all

Need any help then please post here,

I havent tested it yet so any bugs please post back and ill try to fix them.

:-D :-D :-D

Posted

Re: [MCCODE V2] User Competitions

Seems a "hourly" version of a raffle, simple enough, though at a glance, it seems you don't end the competition (truncate the table when prizes are delivered).

Besides that, without testing... can't find anything else. Nice move :)

Posted

Re: [MCCODE V2] User Competitions

 

Seems a "hourly" version of a raffle, simple enough, though at a glance, it seems you don't end the competition (truncate the table when prizes are delivered).

Besides that, without testing... can't find anything else. Nice move :)

Thanks for pointing that out,

It can last as long as the creator want by setting the time to say 48hrs or 24hrs so it can go on as long as the user wants.

Posted

Re: [MCCODE V2] User Competitions

 

Thanks for pointing that out,

It can last as long as the creator want by setting the time to say 48hrs or 24hrs so it can go on as long as the user wants.

Agree on that but you still need to close the competitions :P ;)

Posted

Re: [MCCODE V2] User Competitions

 

Thanks for pointing that out,

It can last as long as the creator want by setting the time to say 48hrs or 24hrs so it can go on as long as the user wants.

Agree on that but you still need to close the competitions :P ;)

Ive edited it,

should work now.

Posted

Re: [MCCODE V2] User Competitions

 

You have a error in comps.php

Here is the fix:

 

You're unable to view this code.

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

 

I didnt notice that,

thanks :lol:

Not criticising my work for once :lol: :lol: :lol:

Posted

Re: [MCCODE V2] User Competitions

 

Parse error: syntax error, unexpected '(', expecting T_STRING or T_VARIABLE or '{' or '$' in /home/jds137/ml/public/comps.php on line 4

I also found the cron not working out.

Posted

Re: [MCCODE V2] User Competitions

seems no one noticed this one too... on comps.php

<?php

include "globals.php";

$q=$db->("SELECT * FROM competitions ORDER BY id");

should be

<?php

include "globals.php";

$q=$db->query("SELECT * FROM competitions ORDER BY id");

Posted

Re: [MCCODE V2] User Competitions

 

seems no one noticed this one too... on comps.php

<?php

include "globals.php";

$q=$db->("SELECT * FROM competitions ORDER BY id");

should be

<?php

include "globals.php";

$q=$db->query("SELECT * FROM competitions ORDER BY id");

Cheers, didnt notice that

:mrgreen: :mrgreen: :mrgreen:

Posted

Re: [MCCODE V2] User Competitions

 

This Mod Sucks :wink:

Why not re-code then re-post the hole lot :) :wink:

If you can do a better job, then feel free to post it. Otherwise don't criticize other peoples work.

Posted

Re: [MCCODE V2] User Competitions

 

This Mod Sucks :wink:

Why not re-code then re-post the hole lot :) :wink:

If you can do a better job, then feel free to post it. Otherwise don't criticize other peoples work.

I cannot do a better Job, However I was suggesting taking the mod and re-coding and testing every bit to ensure it work's

No "Criticize" Was Intended :-)

Posted

Re: [MCCODE V2] User Competitions

 

This Mod Sucks :wink:

Why not re-code then re-post the hole lot :) :wink:

If you can do a better job, then feel free to post it. Otherwise don't criticize other peoples work.

I cannot do a better Job, However I was suggesting taking the mod and re-coding and testing every bit to ensure it work's

No "Criticize" Was Intended :-)

Its fixed now so :P

Posted

Re: [MCCODE V2] User Competitions

Here is the fixed files: :-D

Create createcomp.php

You're unable to view this code.

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

Save createcomp.php

 

Create createcomp.php

You're unable to view this code.

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

Save createcomp.php

Posted

Re: [MCCODE V2] User Competitions

 

You're unable to view this code.

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

This will work!

 

Sorry but no it doesnt. This mod has allot of bugs and im working my way through them. This is the createcomp.php page working below (and tested). Ive got some of the others working but they need more work. Will post the rest if I can sort it out.

 

You're unable to view this code.

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

Posted

Re: [MCCODE V2] User Competitions

 

You're unable to view this code.

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

This will work!

 

Sorry but no it doesnt. This mod has allot of bugs and im working my way through them. This is the createcomp.php page working below (and tested). Ive got some of the others working but they need more work. Will post the rest if I can sort it out.

 

You're unable to view this code.

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

 

I'll think you find it does...I have it running on my game so..

So Go Again..

Posted

Re: [MCCODE V2] User Competitions

 

You're unable to view this code.

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

This will work!

No it wont first off

You're unable to view this code.

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

 

2 totally different amounts

secondly

You're unable to view this code.

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

This is going to create a gang page :P

Posted

Re: [MCCODE V2] User Competitions

Blackdog nice notice of the amounts didnt spot that.

Im going to be busy the next few days so will not have time to sort the rest out, I will post what Ive got so far tonight.

But if nobody can get it working I should be able to do it next week.

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.

×
×
  • Create New...