
webster2001
Members-
Posts
98 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by webster2001
-
Can someone tell me how to make each dropdown menu on its own seperate line? Ive been playing with this code now for about 2 hours trying to figure this out Thanks so muchh :)
-
Nice idea to close all pages in one press, Ill add this into my mod later if you dont mind? ;)
-
I have re worked my close page system to make it easier to close pages and open them. staff_pages.php <?php include "sglobals.php"; switch($_GET['action']) { case 'closepagesub': close_page_submit(); break; case 'openpagesub': open_page_submit(); break; case 'pagelist': page_list(); break; default: print "Error: This script requires an action.[url='staff.php']Staff[/url]"; break; } function close_page_submit() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } $d=$db->query("SELECT * FROM closedpages WHERE page='{$_POST['page']}'"); $page=$db->fetch_row($d); $db->query("UPDATE `closedpages` SET closed=1 WHERE page='{$_POST['page']}'"); print "The page {$page['page']} was blocked from public access."; stafflog_add("Closed page {$page['page']}"); } function open_page_submit() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } $d=$db->query("SELECT * FROM closedpages WHERE page='{$_POST['page']}'"); $page=$db->fetch_row($d); $db->query("UPDATE `closedpages` SET closed=0 WHERE page='{$_POST['page']}'"); print "The page {$page['page']} was unblocked from public access."; stafflog_add("Opened page {$page['page']}"); } function page_list() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } print "<table width='80%' class='table'> <tr><th>Page Address</th><th>Status</th><th>Links</th></tr>"; $q=$db->query("SELECT * FROM closedpages ORDER BY closed DESC, page ASC"); while($r=$db->fetch_row($q)) { print " <tr><td>{$r['page']}</td><td>"; if($r['closed'] == 1) { print "[b]<font color=red>Closed[/b]</font></td><td> <form action='staff_pages.php?action=openpagesub' method='post'> <input type='hidden' name='page' value='{$r['page']}'> <input type='submit' value='Open Page' /></form> "; } else { print "[b]<font color=green>Open</font>[/b]</td><td> <form action='staff_pages.php?action=closepagesub' method='post'> <input type='hidden' name='page' value='{$r['page']}'> <input type='submit' value='Close Page' /></form>"; } print" </td> </tr>"; } print "</table>"; } $h->endpage(); ?> Add this into smenu.php if($ir['user_level'] == 2) { print "<hr /> [b]Pages[/b] [url='staff_pages.php?action=pagelist']Page List[/url] "; } In header.php find if($ir['fedjail']) { $q=$db->query("SELECT * FROM fedjail WHERE fed_userid=$userid"); $r=$db->fetch_row($q); die("[b]<font color=red size=+1>You have been put in the {$set['game_name']} Federal Jail for {$r['fed_days']} day(s). Reason: {$r['fed_reason']}</font>[/b]</body></html>"); } add before $php_self=$_SERVER['PHP_SELF']; $closedpage=$db->query("SELECT * FROM `closedpages` WHERE page='$php_self'"); $cp=$db->fetch_row($closedpage); if(!$cp['page']) { $db->query("INSERT INTO `closedpages` VALUES ('$php_self', 0)"); print "[b]PAGE ADDED TO THE CLOSED PAGES LIST[/b]"; } if ($cp['closed'] == 1) { die ("[b]<center><font color=red>This Page is not open to the Public</font> [url='index.php']Go Home[/url][/b]</center>"); } Finally run this SQL in phpmyadmin CREATE TABLE `closedpages` ( `page` text NOT NULL, `closed` smallint(1) NOT NULL default '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO `closedpages` VALUES('/index.php', 0); INSERT INTO `closedpages` VALUES('/loggedin.php', 0); INSERT INTO `closedpages` VALUES('/explore.php', 0); INSERT INTO `closedpages` VALUES('/preferences.php', 0); INSERT INTO `closedpages` VALUES('/criminal.php', 0); INSERT INTO `closedpages` VALUES('/viewuser.php', 0); INSERT INTO `closedpages` VALUES('/search.php', 0); INSERT INTO `closedpages` VALUES('/announcements.php', 0); INSERT INTO `closedpages` VALUES('/gamerules.php', 0); INSERT INTO `closedpages` VALUES('/gym.php', 0); INSERT INTO `closedpages` VALUES('/newspaper.php', 0); INSERT INTO `closedpages` VALUES('/forums.php', 0); INSERT INTO `closedpages` VALUES('/helptutorial.php', 1); INSERT INTO `closedpages` VALUES('/education.php', 0); INSERT INTO `closedpages` VALUES('/preport.php', 0); INSERT INTO `closedpages` VALUES('/inventory.php', 0); INSERT INTO `closedpages` VALUES('/job.php', 0); INSERT INTO `closedpages` VALUES('/halloffame.php', 0); INSERT INTO `closedpages` VALUES('/friendslist.php', 0); INSERT INTO `closedpages` VALUES('/blacklist.php', 0); INSERT INTO `closedpages` VALUES('/staff.php', 0); INSERT INTO `closedpages` VALUES('/yourgang.php', 0); INSERT INTO `closedpages` VALUES('/docrime.php', 0); INSERT INTO `closedpages` VALUES('/bank.php', 0); INSERT INTO `closedpages` VALUES('/jail.php', 0); INSERT INTO `closedpages` VALUES('/jailbust.php', 0); INSERT INTO `closedpages` VALUES('/jailbail.php', 0); INSERT INTO `closedpages` VALUES('/stafflist.php', 0); INSERT INTO `closedpages` VALUES('/searchname.php', 0); Any problems please post them below. Please post feedback as well as i always like to know what you think. :)
-
<option value="">Choose a reason<option value="">Do not understand the work<option value="">Im not active enough<option value="">Abused staff powers<option value="">I want to play normally<option value="">Too much responsibilty<option value="">Other</select></td></tr><tr><td><input type="submit" name="doit" value="Submit Reason" /></td></tr></form></table>';$h->endpage();exit();};echo'Are you sure you would like to resign from being a staff member? <table width="60%" class="table"><form action="" method="get"><tr><td><input type="submit" name="resign" value="Yes" /></td></tr><tr><td><input type="submit" value="No" onmouseclick="document.location.href=\''index.php'" /></td></tr></form></table>';$h->endpage();?> Ive now updated the code to include a reason, Just requires someone to test it now :) Cheers people PS Why when i post a code in here does it compress it all to just like 4 lines? :S
-
Thanks danny, havent done coding for a while but i been using bbcode :S Thanks for fixing it up though :) ;) And Renkia, Im working on the reason now :)
-
Create a file called staffresign.php <?phpinclude "globals.php"if($ir['user_level']==1){ print "[b]You should not be on this page[/b] [url='index.php']> Go Back[/url]";}switch($_GET['action']){case 'do':do();break; default:resign();break;} function resign(){global $db,$ir,$c,$userid,$h;print "[b]Your current staff level is:[/b]";if($ir['user_level'] == 2){print "Admin";}elseif($ir['user_level'] == 3){print "Secretary";}elseif($ir['user_level'] == 5){print "Assistant";}print "[b]Are you sure you want to resign from being a staff member?[/b] [url='staffresign.php?action=do']> Yes[/url] [url='index.php']> No[/url]";} function do(){global $db,$ir,$c,$userid,$h;stafflog_add("Resigned from being a staff member");$db->query("UPDATE users SET user_level='1' WHERE userid='$userid'");print "You have resigned from being a staff member.";}?> I have not tested this yet as i do not have a game to try it on. I will be testing it out later and hopefully it works. Please post what you think and any errors.
-
Re: April Fools Joke [MCCODE V2] Thanks Congrats on 200 Posts :)
-
Re: April Fools Joke [MCCODE V2] OK then :( LOL Also remember guys, dont put this up till April 1st and also remove it at Midday :)
-
I decided to make a little April fools joke for the members of my game, just to annoy them :P Contains: - 1 D/B Query - 1 PHP file - 1 PHP file Edit Run this in phpMyAdmin: ALTER TABLE `users` ADD `aprilfools` smallint(1) NOT NULL default '0'; Create file "reward.php": <?php include "globals.php"; if ($ir['aprilfools']) { die (" You have already done this!. [url='explore.php']Back[/url]<hr width='90%'>"); } switch ($_GET['action']) { case 'fools': april_fools(); break; default: index(); break; } function index() { global $db,$ir,$c,$h,$userid; print " <table width='70%' class='table'> <tr><th width='33%'>Reward Number</th><th width='34%'>What you gain</th><th width='33%'>Get!</th></tr> <tr><td>#1</td><td>\$100,000!</td><td>[url='reward.php?action=fools']> Get reward number 1[/url]</td></tr> <tr><td>#2</td><td>100 Crystals!</td><td>[url='reward.php?action=fools']> Get reward number 2[/url]</td></tr> <tr><td>#3</td><td>\$50,000 & 50 Crystals!</td><td>[url='reward.php?action=fools']> Get reward number 3[/url]</td></tr> <tr><td>#4</td><td>1,000 in every stat!</td><td>[url='reward.php?action=fools']> Get reward number 4[/url]</td></tr>"; } function april_fools() { global $db,$ir,$c,$h,$userid; $db->query("UPDATE users SET aprilfools=aprilfools+1 WHERE userid='$userid'"); print " [b]<font size=8 color=red>APRIL FOOLS!</font>[/b] [url='index.php']> Go home[/url]"; } $h->endpage; ?> Save Reward.php Open header.php and find: if($ir['fedjail']) { $q=$db->query("SELECT * FROM fedjail WHERE fed_userid=$userid"); $r=$db->fetch_row($q); die("[b]<font color=red size=+1>You have been put in the {$set['game_name']} Federal Jail for {$r['fed_days']} day(s). Reason: {$r['fed_reason']}</font>[/b]</body></html>"); } if(file_exists('ipbans/'.$IP)) { die("[b]<font color=red size=+1>Your IP has been banned from {$set['game_name']}, there is no way around this.</font>[/b]</body></html>"); } After it add: if (!$ir['aprilfools']) { print "<center[b]You can claim a reward below! [url='reward.php']Claim![/url]</center>[/b] "; } Then your done :) Hope you use this :) Any erros please post back. Thanks
-
Working Close Page System [MCCODE V2]
webster2001 replied to webster2001's topic in Free Modifications
Re: Working Close Page System [MCCODE V2] Good idea :-P Might add that in later when i have the spare time. Then you dont need the if($ir['jail']) etc... part. :) -
I Know this has been done before but i decided to make my own and make it available for you to use. Contains: - 1 php file - 2 php file edits - 1 D/B SQL Ive tested this for MCCODE V2 and it works on my site so heres the code: Edit file header.php Find: if($ir['fedjail']) { $q=$db->query("SELECT * FROM fedjail WHERE fed_userid=$userid"); $r=$db->fetch_row($q); die("[b]<font color=red size=+1>You have been put in the {$set['game_name']} Federal Jail for {$r['fed_days']} day(s). Reason: {$r['fed_reason']}</font>[/b]</body></html>"); } Add Before it: $php_self=$_SERVER['PHP_SELF']; $closedpage=$db->query("SELECT * FROM `closedpages` WHERE page='$php_self'"); $cp=$db->fetch_row($closedpage); if(!$cp['page']) { $db->query("INSERT INTO `closedpages` VALUES ('$php_self', 0)"); print "[b]PAGE ADDED TO THE CLOSED PAGES LIST[/b]"; } if ($cp['closed'] == 1) { die ("[b]<center><font color=red>This Page is not open to the Public</font> [url='index.php']Go Home[/url][/b]</center>"); } SAVE FILE! Open global_func.php Find $h->endpage; ?> Replace with function closedpages_dropdown($connection,$ddname="item",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM closedpages ORDER BY page ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['page']}'"; if ($selected == $r['page'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['page']}</option>"; } $ret.="\n</select>"; return $ret; } function closepages_dropdown($connection,$ddname="item",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM closedpages WHERE closed=1 ORDER BY page ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['page']}'"; if ($selected == $r['page'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['page']}</option>"; } $ret.="\n</select>"; return $ret; } $h->endpage; ?> Save That file Create staff_pages.php <?php include "sglobals.php"; switch($_GET['action']) { case 'closepage': close_page_form(); break; case 'closepagesub': close_page_submit(); break; case 'openpage': open_page_form(); break; case 'openpagesub': open_page_submit(); break; default: print "Error: This script requires an action."; break; } function close_page_form() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } print " The page you select will be blocked from public access until you select to re-open it. <form action='staff_pages.php?action=closepagesub' method='post'> Page: ".closedpages_dropdown($c,'page')." <input type='submit' value='Close Page!' /></form>"; } function close_page_submit() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } $d=$db->query("SELECT * FROM closedpages WHERE page='{$_POST['page']}'"); $page=$db->fetch_row($d); $db->query("UPDATE `closedpages` SET closed=1 WHERE page='{$_POST['page']}'"); print "The page {$page['page']} was blocked from public access."; stafflog_add("Closed page {$page['page']}"); } function open_page_form() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } print " The page you select will be unblocked from public access until you select to re-open it. <form action='staff_pages.php?action=openpagesub' method='post'> Page: ".closepages_dropdown($c,'page')." <input type='submit' value='Close Page!' /></form>"; } function open_page_submit() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } $d=$db->query("SELECT * FROM closedpages WHERE page='{$_POST['page']}'"); $page=$db->fetch_row($d); $db->query("UPDATE `closedpages` SET closed=0 WHERE page='{$_POST['page']}'"); print "The page {$page['page']} was unblocked from public access."; stafflog_add("Opened page {$page['page']}"); } $h->endpage(); ?> Save. Open smenu.php Add in where you wish if($ir['user_level'] == 2) { print " [url='staff_pages.php?action=openpage']Open Page[/url] [url='staff_pages.php?action=closepage']Close Page[/url] "; } Run this in phpMyAdmin CREATE TABLE `closedpages` ( `page` text NOT NULL, `closed` smallint(1) NOT NULL default '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO `closedpages` VALUES('/index.php', 0); INSERT INTO `closedpages` VALUES('/loggedin.php', 0); INSERT INTO `closedpages` VALUES('/explore.php', 0); INSERT INTO `closedpages` VALUES('/preferences.php', 0); INSERT INTO `closedpages` VALUES('/criminal.php', 0); INSERT INTO `closedpages` VALUES('/viewuser.php', 0); INSERT INTO `closedpages` VALUES('/search.php', 0); INSERT INTO `closedpages` VALUES('/announcements.php', 0); INSERT INTO `closedpages` VALUES('/gamerules.php', 0); INSERT INTO `closedpages` VALUES('/gym.php', 0); INSERT INTO `closedpages` VALUES('/newspaper.php', 0); INSERT INTO `closedpages` VALUES('/forums.php', 0); INSERT INTO `closedpages` VALUES('/helptutorial.php', 1); INSERT INTO `closedpages` VALUES('/education.php', 0); INSERT INTO `closedpages` VALUES('/preport.php', 0); INSERT INTO `closedpages` VALUES('/inventory.php', 0); INSERT INTO `closedpages` VALUES('/job.php', 0); INSERT INTO `closedpages` VALUES('/halloffame.php', 0); INSERT INTO `closedpages` VALUES('/friendslist.php', 0); INSERT INTO `closedpages` VALUES('/blacklist.php', 0); INSERT INTO `closedpages` VALUES('/staff.php', 0); INSERT INTO `closedpages` VALUES('/yourgang.php', 0); INSERT INTO `closedpages` VALUES('/docrime.php', 0); INSERT INTO `closedpages` VALUES('/bank.php', 0); INSERT INTO `closedpages` VALUES('/jail.php', 0); INSERT INTO `closedpages` VALUES('/jailbust.php', 0); INSERT INTO `closedpages` VALUES('/jailbail.php', 0); INSERT INTO `closedpages` VALUES('/stafflist.php', 0); INSERT INTO `closedpages` VALUES('/searchname.php', 0); Not all files are included but when someone visits a page that is not in the database, it will automatically add that page. This should work. Any errors please post back. Please post any feedback, Negative or Positive :)
-
Re: [V2]My own v2 Explore page [V2] Why so many print's??? just replace it with [url='crystaltemple.php']Crystal Temple[/url] "; print "[url='battletent.php']Battle Tent[/url] "; print "[url='polling.php']Polling[/url] "; print " [url='carnival.php']Carnival[/url] "; print " [url='drugs.php']Drugs[/url] "; print "[url='youtube.php']Youtube[/url] "; print " [url='brothel.php']Brothel[/url] "; print "</td>
-
Re: [MCCODE V2] User Competitions Here is the fixed files: :-D Create createcomp.php <?php include "globals.php"; if($ir['money'] < 500000) { die("You don't have enough money. You need \$100,000."); } if($ir['compown']) { die ("You are already running a competition!"); } if($_POST['submit']) { $name=htmlspecialchars($_POST['name']); $desc=htmlspecialchars($_POST['desc']); $db->query("INSERT INTO competitiona VALUES('','$name','$desc','{$ir['username']}','$cash','$crys','$item','$fee','$time','')"); $i=$db->insert_id(); $cost=$cash+100000 $db->query("UPDATE users SET compown=$i,money=money-$cost,crystals=crystals-$crys where userid=$userid"); print "Competition created!"; } else { print "<h3> Create A Competition </h3> <form action='creategang.php' method='post'><input type='hidden' name='submit' value='1' /> Name:<input type='text' name='name' /> Description: <textarea name='desc' cols='40' rows='7'></textarea> Entry Fee:<input type='text' name='fee' /> Cash Reward:<input type='text' name='cash' /> Crystals Reward:<input type='text' name='cash' /> Hours:<input type='text' name='time' /> Item: ".item_dropdown($c,'item')." <input type='submit' value='Create Competition for \$100,000' /></form>"; } $h->endpage(); ?> Save createcomp.php Create createcomp.php <?php include "globals.php"; if($ir['money'] < 500000) { die("You don't have enough money. You need \$100,000."); } if($ir['compown']) { die ("You are already running a competition!"); } if($_POST['submit']) { $name=htmlspecialchars($_POST['name']); $desc=htmlspecialchars($_POST['desc']); $db->query("INSERT INTO competitiona VALUES('','$name','$desc','{$ir['username']}','$cash','$crys','$item','$fee','$time','')"); $i=$db->insert_id(); $cost=$cash+100000 $db->query("UPDATE users SET compown=$i,money=money-$cost,crystals=crystals-$crys where userid=$userid"); print "Competition created!"; } else { print "<h3> Create A Competition </h3> <form action='creategang.php' method='post'><input type='hidden' name='submit' value='1' /> Name:<input type='text' name='name' /> Description: <textarea name='desc' cols='40' rows='7'></textarea> Entry Fee:<input type='text' name='fee' /> Cash Reward:<input type='text' name='cash' /> Crystals Reward:<input type='text' name='cash' /> Hours:<input type='text' name='time' /> Item: ".item_dropdown($c,'item')." <input type='submit' value='Create Competition for \$100,000' /></form>"; } $h->endpage(); ?> Save createcomp.php
-
Re: [MCCODE V2] User Competitions 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
-
Re: [MCCODE V2] User Competitions Cheers, didnt notice that :mrgreen: :mrgreen: :mrgreen:
-
Re: [MCCODE V2] User Competitions Tell me what you think of this mod.
-
Re: [MCCODE V2] User Competitions I didnt notice that, thanks :lol: Not criticising my work for once :lol: :lol: :lol:
-
Re: [MCCODE V2] User Competitions Agree on that but you still need to close the competitions :P ;) Ive edited it, should work now.
-
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.
-
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 <?php include "globals.php"; $_GET['u'] = abs((int) $_GET['u']); $q=$db->query("SELECT * FROM competitions WHERE id={$_GET['u']}"); if($db->num_rows($q) == 0) { print "Invalid Competition"; } else { $r=$db->fetch_row($q); if($ir['money']>49999) { print " You have entered the competition [b]{$r['name']}[/b] Entering costed you \${$r['fee']} {$r['entrys']} people have entered this competition."; $db->query("UPDATE users SET money=money-50000 WHERE userid=$userid"); } $db->query("UPDATE competitions SET profit=profit+{$r['fee']} WHERE id={'$_GET['u']}"); $db->query("INSERT INTO compentrys VALUES('',$userid)"); else { print "You do not have enough money to join this competition."; } ?> Save that file Create comps.php <?php include "globals.php"; $q=$db->("SELECT * FROM competitions ORDER BY id"); print" <table class='table' cellspacing='1' width =75%> <tr><th>Creator</th><th>Reward</th><th>Entry Fee</th><th>Entrys</th><th>Time Left (hours)</th><th>View</th></tr> while($r=$db->fetch_row($q)) { print " <tr> <td>{$r['creator']}</td> <td>{$r['rewardcash']} {$r['rewardcrys']}</td> <td>{$r['fee']}</td> <td>{$r['entrys']}</td> <td>{$r['time']}</td> <td>[url='viewcomp.php?id={$r[']View[/url]</td> </tr> </td></tr>"; } ?> Save comps.php Create createcomp.php <?php include "globals.php"; if($ir['money'] < 500000) { die("You don't have enough money. You need \$100,000."); } if($ir['compown']) { die ("You are already running a competition!"); } if($_POST['submit']) { $name=htmlspecialchars($_POST['name']); $desc=htmlspecialchars($_POST['desc']); $db->query("INSERT INTO competitiona VALUES('','$name','$desc','{$ir['username']}','$cash','$crys','$item','$fee','$time','')"); $i=$db->insert_id(); $cost=$cash+100000 $db->query("UPDATE users SET compown=$i,money=money-$cost,crystals=crystals-$crys where userid=$userid"); print "Competition created!"; } else { print "<h3> Create A Competition </h3> <form action='creategang.php' method='post'><input type='hidden' name='submit' value='1' /> Name:<input type='text' name='name' /> Description: <textarea name='desc' cols='40' rows='7'></textarea> Entry Fee:<input type='text' name='fee' /> Cash Reward:<input type='text' name='cash' /> Crystals Reward:<input type='text' name='cash' /> Hours:<input type='text' name='time' /> Item: ".item_dropdown($c,'item')." <input type='submit' value='Create Competition for \$100,000' /></form>"; } $h->endpage(); ?> Save createcomp.php Create viewcomp.php <?php include "globals.php"; $_GET['u'] = abs((int) $_GET['u']); if(!$_GET['u']) { print "Invalid use of file"; } else { $q=$db->query("SELECT * FROM competitions WHERE id={$_GET['u']}"); if($db->num_rows($q) == 0) { print "This competition no longer exists."; } else { $r=$db->fetch_row($q); print " <table width=100% cellspacing=1 class='table'> <tr style='background:gray'> <th width='50%'>General Info</th><th width='50%'>Rewards</th> ></tr> <tr> <td> Creator: {$r['creator']} Time left (Hours): {$r['time']} </td> <td> Money: \${$r['rewardcash']} Crystals: {$r['rewardcrys']}</tr> <tr> <th colspan='2'>Users Joined</th></tr>"; $b=$db->row_count($q); print " <tr><td>$b</td></tr> <tr><td>[url='compentry.php']Enter this competition[/url]</td></tr> </table> "; } $h->endpage(); ?> Save that file. Run these querys on phpMyAdmin CREATE TABLE `competitions` ( `id` int(11) NOT NULL auto_increment, `compname` text NOT NULL, `compdesc` text NOT NULL, `creator` text NOT NULL, `rewardcash` int(11) NOT NULL default '0', `rewardcrys` int(11) NOT NULL default '0', `rewarditem` int(11) NOT NULL default '0', `fee` int(11) NOT NULL default '1000', `entrys` int(11) NOT NULL default '0', `profit` int(11) NOT NULL default '0', `time` int(11) NOT NULL default '24', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; CREATE TABLE `compentrys` ( `id` int(11) NOT NULL auto_increment, `userid` int(11) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; ALTER TABLE `users` ADD `compown` int(11) NOT NULL; Open cron_hour.php find <?php include "config.php"; global $_CONFIG; if($_GET['code'] != $_CONFIG['code']) { die(""); } define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; After that add $db->query("UPDATE competitions set time=time-1"); if ($b['time'] == 0) { $conn=$db->query("SELECT * FROM competitions"); while($b=$db->fetch_row($conn)) $entry=$db->query("SELECT * FROM compentrys WHERE id={$b['id']}"); while($e=$db->fetch_row($entry)) $winner=rand(1,'{$b['entrys']}'); $prize=$db->("SELECT * FROM compentrys WHERE id=$winner"); $db->("UPDATE users SET money=money+{$b['rewardcash']} crystals=crystals+{$b['rewardcrys']} WHERE id={$prize['userid']}"); $db->("UPDATE users SET money=money+ WHERE id={$b['creator']}"); $db->("DELETE FROM competitions WHERE id={$b['id']}"); $db->("DELETE FROM compentrys WHERE id={$b['id']}"); } Add this link somewhere [url='comps.php']Competitions[/url] 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
-
Re: Simple register edit Well said there, I couldnt agree more :-D :-D :-D :evil: <- killah
-
Re: Anolog Clock [All versions] Not my problem, mail jimmytubbs about it his game, he put them on.
-
Re: Anolog Clock [All versions] I could say the same about some of your mods =P Like? Well let's see. Not starting a fight here. 2244 the game. Not original. 1944thegame.com was and is way better than your game and it still getting way more user's than your's. Come to the conclusion. You hardly have posted up any mod's. "Updated money and crystal bank" Already done before you. "Explore simple" Proberly done before you. 2 mod's. And the rest is just posting for help. WOW. 2244thegame aint my game, its my m8's