webster2001 Posted February 9, 2009 Posted February 9, 2009 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 Quote
Lithium Posted February 9, 2009 Posted February 9, 2009 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 :) Quote
webster2001 Posted February 9, 2009 Author Posted February 9, 2009 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. Quote
Lithium Posted February 9, 2009 Posted February 9, 2009 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 ;) Quote
webster2001 Posted February 9, 2009 Author Posted February 9, 2009 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. Quote
Haunted Dawg Posted February 9, 2009 Posted February 9, 2009 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. Quote
webster2001 Posted February 9, 2009 Author Posted February 9, 2009 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: Quote
webster2001 Posted February 9, 2009 Author Posted February 9, 2009 Re: [MCCODE V2] User Competitions Tell me what you think of this mod. Quote
jds137 Posted February 9, 2009 Posted February 9, 2009 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. Quote
Lithium Posted February 9, 2009 Posted February 9, 2009 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"); Quote
webster2001 Posted February 10, 2009 Author Posted February 10, 2009 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: Quote
jds137 Posted February 11, 2009 Posted February 11, 2009 Re: [MCCODE V2] User Competitions Parse error: syntax error, unexpected T_VARIABLE in /home/jds137/ml/public/createcomp.php on line 34 Quote
Karlos Posted February 11, 2009 Posted February 11, 2009 Re: [MCCODE V2] User Competitions print "<h3> Create A Competition </h3> <form action='creategang.php Though this was comp mod... not a gang mod.... Quote
BradBoy08 Posted February 13, 2009 Posted February 13, 2009 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. Should be You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Jordan Palmer Posted February 14, 2009 Posted February 14, 2009 Re: [MCCODE V2] User Competitions This Mod Sucks :wink: Why not re-code then re-post the hole lot :) :wink: Quote
Mark F Posted February 16, 2009 Posted February 16, 2009 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. Quote
Jordan Palmer Posted February 16, 2009 Posted February 16, 2009 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 :-) Quote
webster2001 Posted February 17, 2009 Author Posted February 17, 2009 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 Quote
webster2001 Posted February 17, 2009 Author Posted February 17, 2009 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 Quote
Jordan Palmer Posted February 17, 2009 Posted February 17, 2009 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! Quote
bob324 Posted February 17, 2009 Posted February 17, 2009 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. Quote
Jordan Palmer Posted February 17, 2009 Posted February 17, 2009 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.. Quote
Blackdogg Posted February 18, 2009 Posted February 18, 2009 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 Quote
SpEcKs Posted February 18, 2009 Posted February 18, 2009 Re: [MCCODE V2] User Competitions This looks pretty good Quote
bob324 Posted February 18, 2009 Posted February 18, 2009 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.