Jump to content
MakeWebGames

jon182

Members
  • Posts

    233
  • Joined

  • Last visited

    Never

Everything posted by jon182

  1. Re: [MCCODES V2] Millionare game $20.00 just use demo2 username :demo2 pass: demo2 you always get the guy that changes the password you can use the demo account to play it. It should let you play it unlimited times (refreshes at the minute cron) but i set it to NOT PAY YOU if you win on the demo account. normally once you get past all the questions you get $1,000,000 and then dies saying you win but i set it so it doesn't give you thie money it should just tart showing you blank pages
  2. Re: why doesn't this work? so does anyone know?
  3. Re: why doesn't this work? it doesnt show an actual error. The staff menu just doesn't show up.
  4. Ok this has me stumped. When i try to go to the staff panel the thing that shows latest staff activity is thier but on the side panel its The mainmenu and not the staff menu. this is staff.php which is the page i go to. I'm not positive this is where the error occurs though <?php include "sglobals.php"; //This contains general thingies switch($_GET['action']) { case 'basicset': basicsettings(); break; case 'announce': announcements(); break; default: index(); break; } function basicsettings() { global $db,$ir,$c,$h,$userid,$set; if($ir['user_level'] != 2) { die("403"); } if($_POST['submit']) { unset($_POST['submit']); foreach($_POST as $k => $v) { $db->query("UPDATE `settings` SET conf_value='$v' WHERE conf_name='$k'"); } print "Settings updated! [url='staff.php?action=basicset']Back[/url]"; stafflog_add("Updated the basic game settings"); } else { print "<h3>Basic Settings</h3><hr /> <form action='staff.php?action=basicset' method='post'> <input type='hidden' name='submit' value='1' /> Game Name: <input type='text' name='game_name' value='{$set['game_name']}' /> Game Owner: <input type='text' name='game_owner' value='{$set['game_owner']}' /> Game Description: <textarea rows='7' cols='50' name='game_description'>{$set['game_description']}</textarea> Paypal Address: <input type='text' name='paypal' value='{$set['paypal']}' /> Gym/Crimes Validation: <select name='validate_on' type='dropdown'>"; $opt=array( "1" => "On", "0" => "Off" ); foreach($opt as $k => $v) { if($k == $set['validate_on']) { print "<option value='{$k}' selected='selected'>{$v}</option>"; } else { print "<option value='{$k}'>{$v}</option>"; } } print "</select> Validation Period: <select name='validate_period' type='dropdown'>"; $opt=array( "5" => "Every 5 Minutes", "15" => "Every 15 Minutes", "60" => "Every Hour", "login" => "Every Login" ); foreach($opt as $k => $v) { if($k == $set['validate_period']) { print "<option value='{$k}' selected='selected'>{$v}</option>"; } else { print "<option value='{$k}'>{$v}</option>"; } } print "</select> Registration CAPTCHA: <select name='regcap_on' type='dropdown'>"; $opt=array( "1" => "On", "0" => "Off" ); foreach($opt as $k => $v) { if($k == $set['regcap_on']) { print "<option value='{$k}' selected='selected'>{$v}</option>"; } else { print "<option value='{$k}'>{$v}</option>"; } } print "</select> Send Crystals: <select name='sendcrys_on' type='dropdown'>"; $opt=array( "1" => "On", "0" => "Off" ); foreach($opt as $k => $v) { if($k == $set['sendcrys_on']) { print "<option value='{$k}' selected='selected'>{$v}</option>"; } else { print "<option value='{$k}'>{$v}</option>"; } } print "</select> Bank Xfers: <select name='sendbank_on' type='dropdown'>"; $opt=array( "1" => "On", "0" => "Off" ); foreach($opt as $k => $v) { if($k == $set['sendbank_on']) { print "<option value='{$k}' selected='selected'>{$v}</option>"; } else { print "<option value='{$k}'>{$v}</option>"; } } print "</select> Energy Refill Price (crystals): <input type='text' name='ct_refillprice' value='{$set['ct_refillprice']}' /> IQ per crystal: <input type='text' name='ct_iqpercrys' value='{$set['ct_iqpercrys']}' /> Money per crystal: <input type='text' name='ct_moneypercrys' value='{$set['ct_moneypercrys']}' /> Will Potion Item: ".item_dropdown($c, "willp_item", $set['willp_item'])." Police Investigation Item: ".item_dropdown($c, "piITEM", $set['piITEM'])." <input type='submit' value='Update Settings' /></form>"; } } function announcements() { global $db,$ir,$c,$h,$userid,$set; if($ir['user_level'] != 2) { die("403"); } if($_POST['text']) { $db->query("INSERT INTO announcements VALUES('{$_POST['text']}', unix_timestamp())"); $db->query("UPDATE users SET new_announcements=new_announcements+1"); print "Announcement added! > [url='staff.php']Back[/url]"; stafflog_add("Added a new announcement"); } else { print "Adding an announcement... Please try to make sure the announcement is concise and covers everything you want it to.<form action='staff.php?action=announce' method='post'> Announcement text: <textarea name='text' rows='10' cols='60'></textarea> <input type='submit' value='Add Announcement' /></form>"; } } function index() { global $db,$ir,$c,$h,$userid,$set, $_CONFIG; $pv=phpversion(); $mv=$db->fetch_single($db->query("SELECT VERSION()")); $dv=$_CONFIG['driver']; if($ir['user_level']==2) { $versionno=20200; $version="2.0.2"; print "<h3>System Info</h3><hr /> <table width='75%' cellspacing='1' class='table'> <tr> <th>PHP Version:</th> <td>$pv</td> </tr> <tr> <th>MySQL Version:</th> <td>$mv</td> </tr> <tr> <th>MySQL Driver:</th> <td>$dv</td> </tr> <tr> <th>Codes Version</th> <td>$version (Build: $versionno)</td> </tr> </table><hr /> <h3>Last 10 Staff Actions</h3><hr /> <table width='100%' cellspacing='1' class='table'> <tr> <th>Staff</th> <th>Action</th> <th>Time</th> <th>IP</th> </tr>"; $q=$db->query("SELECT s.*, u.* FROM stafflog AS s LEFT JOIN users AS u ON s.user=u.userid ORDER BY s.time DESC LIMIT 10"); while($r=$db->fetch_row($q)) { print "<tr><td>{$r['username']} [{$r['user']}]</td> <td>{$r['action']}</td> <td>".date('F j Y g:i:s a', $r['time'])."</td> <td>{$r['ip']}</td></tr>"; } print "</table><hr />"; } print "<h3>Staff Notepad</h3><hr />"; if($_POST['pad']) { $db->query("UPDATE settings SET conf_value='{$_POST['pad']}' WHERE conf_name='staff_pad'"); $set['staff_pad']=stripslashes($_POST['pad']); print "[b]Staff Notepad Updated![/b]<hr />"; } print "<form action='staff.php' method='post'> <textarea rows='10' cols='60' name='pad'>".htmlspecialchars($set['staff_pad'])."</textarea> <input type='submit' value='Update Notepad' /></form>"; } $h->endpage(); ?>
  5. ok when it comes to graphics i'm bad at code sooooooooo. does anyone know why the outbox would stretch the page and nothing else would.   <?php include "globals.php"; if($ir['mailban']) { die("<font color=red><h3>! ERROR</h3> You have been mail banned for {$ir['mailban']} days. [b]Reason: {$ir['mb_reason']} For more information contact [email][email protected][/email] with the Subject: Mail Banned.</font>[/b]"); } $_GET['ID'] = abs((int) $_GET['ID']); print "<table width=85% class='table' cellspacing='1'><tr><td>[url='mailbox.php?action=inbox']Inbox[/url]</td> <td>[url='mailbox.php?action=outbox']Sent Messages[/url]</td> <td>[url='mailbox.php?action=compose']Compose Message[/url]</td> <td>[url='mailbox.php?action=delall']Delete All Messages[/url]</td> <td>[url='mailbox.php?action=archive']Archive Messages[/url]</td><td>[url='contactlist.php']My Contacts[/url]</td></tr> </table> "; switch($_GET['action']) { case 'inbox': mail_inbox(); break; case 'outbox': mail_outbox(); break; case 'compose': mail_compose(); break; case 'delete': mail_delete(); break; case 'send': mail_send(); break; case 'delall': mail_delall(); break; case 'delall2': mail_delall2(); break; case 'archive': mail_archive(); break; default: mail_inbox(); break; } function mail_inbox() { global $db,$ir,$c,$userid,$h; print <<<OUT Only the last 25 messages sent to you are visible. <table width=75% class="table" border="0" cellspacing="1"> <tr> <td class="h" width="30%">From</td> <td class="h" width="70%">Subject/Message</td> </tr> OUT; $q=$db->query("SELECT m.*,u.* FROM mail m LEFT JOIN users u ON m.mail_from=u.userid WHERE m.mail_to=$userid ORDER BY mail_time DESC LIMIT 25"); while($r=$db->fetch_row($q)) { $sent=date('F j, Y, g:i:s a',$r['mail_time']); print "<tr><td>"; if($r['userid']) { print "[url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]"; } else { print "SYSTEM"; } $fm=urlencode($r['mail_text']); print <<<EOF </td> <td>{$r['mail_subject']}</td> </tr> <tr> <td>Sent at: {$sent} [url='mailbox.php?action=compose&ID={$r[']Reply[/url] [url='mailbox.php?action=delete&ID={$r[']Delete[/url] [url='preport.php?ID={$r[']Report[/url] </td> <td>{$r['mail_text']}</td> </tr> EOF; } if($ir['new_mail'] > 0) { $db->query("UPDATE mail SET mail_read=1 WHERE mail_to=$userid"); $db->query("UPDATE users SET new_mail=0 WHERE userid=$userid"); } echo '</table>'; } function mail_outbox() { global $db,$ir,$c,$userid,$h; print "Only the last 25 messages you have sent are visible. <table width=75% cellspacing=1 class='table'><tr style='background:black'><th>To</th><th>Subject/Message</th></tr>"; $q=$db->query("SELECT m.*,u.* FROM mail m LEFT JOIN users u ON m.mail_to=u.userid WHERE m.mail_from=$userid ORDER BY mail_time DESC LIMIT 25"); while($r=$db->fetch_row($q)) { $sent=date('F j, Y, g:i:s a',$r['mail_time']); print "<tr><td>[url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]</td><td>{$r['mail_subject']}</td></tr><tr><td>Sent at: $sent </td><td>{$r['mail_text']}</td></tr>"; } } function mail_compose() { global $db,$ir,$c,$userid,$h; print "<form action='mailbox.php?action=send' method='post'> <table width=75% cellspacing=1 class='table'> <tr> <td>Contact to send to:</td> <td>"; $q=$db->query("SELECT c.*, u.username FROM contactlist c LEFT JOIN users u ON c.cl_ADDED=u.userid WHERE c.cl_ADDER={$userid} ORDER BY u.username ASC"); if($db->num_rows($q) == 0) { print "You have no contacts!"; } else { print "<select name='user1' type='dropdown'><option value=''><select a contact...></option>"; while($r=$db->fetch_row($q)) { print "<option value='{$r['username']}'>{$r['username']}</option>"; } print "</select>"; } if($_GET['ID']) { $user=$db->fetch_single($db->query("SELECT username FROM users WHERE userid={$_GET['ID']}")); } print "</td></tr><tr> <td>[b]OR[/b] Enter a username to send to:</td><td><input type='text' name='user2' value='{$user}' /></td></tr><tr> <td>Subject:</td> <td><input type='text' name='subject' /></td></tr><tr> <td>Message:</td> <td><textarea rows=5 cols=40 name='message'></textarea></td></tr><tr> <td colspan=2><input type='submit' value='Send' /></td></tr></table></form>"; if($_GET['ID']) { print " <table width=75% border=2><tr><td colspan=2>[b]Your last 5 mails to/from this person:[/b]</td></tr>"; $q=$db->query("SELECT m.*,u1.username as sender from mail m left join users u1 on m.mail_from=u1.userid WHERE (m.mail_from=$userid AND m.mail_to={$_GET['ID']}) OR (m.mail_to=$userid AND m.mail_from={$_GET['ID']}) ORDER BY m.mail_time DESC LIMIT 5"); while($r=$db->fetch_row($q)) { $sent=date('F j, Y, g:i:s a',$r['mail_time']); print "<tr><td>$sent</td> <td>[b]{$r['sender']} wrote:[/b] {$r['mail_text']}</td></tr>"; } print "</table>"; } } function mail_send() { global $db,$ir,$c,$userid,$h; $subj=str_replace(array("\n"),array(" "),strip_tags($_POST['subject'])); $msg=str_replace(array("\n"),array(" "),strip_tags($_POST['message'])); if($_POST['user1'] && $_POST['user2']) { die("Please do not select a contact AND enter a username, only do one. [url='mailbox.php']> Back[/url]"); } if(!$_POST['user1'] && !$_POST['user2']) { die("You must select a contact or enter a username. [url='mailbox.php']> Back[/url]"); } $sendto=($_POST['user1']) ? $_POST['user1'] : $_POST['user2']; $q=$db->query("SELECT userid FROM users WHERE username='{$sendto}'"); if($db->num_rows($q)==0) { die("You cannot send mail to nonexistant users. [url='mailbox.php']> Back[/url]"); } $to=$db->fetch_single($q); $db->query("INSERT INTO mail VALUES ('',0,$userid,$to,unix_timestamp(),'$subj','$msg')"); $db->query("UPDATE users SET new_mail=new_mail+1 WHERE userid={$to}"); print "Message sent. [url='mailbox.php']> Back[/url]"; } function mail_delete() { global $db,$ir,$c,$userid,$h; $db->query("DELETE FROM mail WHERE mail_id={$_GET['ID']} AND mail_to=$userid"); print "Message deleted. [url='mailbox.php']> Back[/url]"; } function mail_delall() { global $ir,$c,$userid,$h; print "This will delete all the messages in your inbox. There is [b]NO[/b] undo, so be sure. [url='mailbox.php?action=delall2']> Yes, delete all messages[/url] [url='mailbox.php']> No, go back[/url]"; } function mail_delall2() { global $db,$ir,$c,$userid,$h; $db->query("DELETE FROM mail WHERE mail_to=$userid"); print "All ".$db->affected_rows()." mails in your inbox were deleted. [url='mailbox.php']> Back[/url]"; } function mail_archive() { global $ir,$c,$userid,$h; print "This tool will download an archive of all your messages. [url='dlarchive.php?a=inbox']> Download Inbox[/url] [url='dlarchive.php?a=outbox']> Download Outbox[/url]"; } $h->endpage(); ?>
  6. Re: Look at this please your doing ("INSERT INTO gangs VALUES('','Druggie Drunk Veterans','Welcome','','',0,0,100,6,6,5,0,0,'') it should be ("INSERT INTO gangs (blah, blah, blah, blah) VALUES ('blah', 'blah', 'blah', 'blah')")
  7. Re: Males only attack females and vice versa? well lets say in the database humans are 1 aliens are 0 and the column is called race then do if ($ir['race]==$r['race']) die ("You can't attack your own species"); else { your attack script here }
  8. Re: [MCCODES 2] Above and beyond (i think) car mod $10   I suggest you don't sell to him, a lot of people know what he's like. He would have already lined up people to buy it by the time you send it to him lol thanks for the warning
  9. Re: [MCCODES 2] Above and beyond (i think) car mod $10 http://i44.tinypic.com/2zhfi3q.jpg http://i42.tinypic.com/zwnjuv.jpg http://i40.tinypic.com/6yl0xw.jpg http://i43.tinypic.com/23jhc0i.jpg http://i44.tinypic.com/10x6360.jpg http://i41.tinypic.com/2z4ls0w.jpg http://i44.tinypic.com/2u5b41h.jpg <-- That is for when people try to sell or race with a car they don't own or buy a car they can't afford. The message will change accordling though http://i39.tinypic.com/24zyg5y.jpg   I know it might be kinda hard to read the black words but honestly the font color is like the easiest thing to change ever.
  10. Ok i have spent the last well i don't know how long but a while pouring my blood sweat tears and urine (mostly urine). Creating a sweet cars mod. Ok what it comes with. 2 PHP files cars.php and staff_cars.php 3 sql tables. cars garage and races What it lets you do: Users can race each other with thier cars. Users can own an unlimited amount of cars. users can upgrade cars. users can only have 1 pending race at a time so they must accept or decline a race quickly and not wait until they have funds to upgrade a car. users can sell/buy cars from the system users can send cars to each other which means they can set up deals to sell them through mails. users can race for money users can sabotage other users cars to lower stats. If you lower a stat below 1 the stat goes to 1. (note it cost to upgrade and sabotage also users must figure out the persons plate number to sabotage) users can also upgrade other peoples cars. users can view thier current garage. it's a nice clean MOD and users get events when they win/lose a race when thier challenged to one and when thier sent/send a car. In Staff.php staff can make new cars edit cars current car stats for cars owned by users are unchanged but that would be easy to change. delete cars (cars that are deleted but are already owned by users are kept by the users but this can easily be changed.)   And thats the mod. File sizes cars.php lines 328 characters 12471 staff_cars.php lines 62 characters 2328 lots of work it's so cheap because i need the cash and i never seem to sell any mods XD Payments to paypal: [email protected] just put in the note your name on CE and i'll send the the mod once i'm online. it will be very quick (instantly) or maybe a few hours if i'm offline.
  11. Re: courses broke ya i thought so but the original wasn't like that, i just set it to that i'll see if it works
  12. Re: bad bad girl ya mine is saying it to like a bunch of ppl when they attack no matter what.
  13. ok this really has me stumped and i need help!!! <?php include "config.php"; global $_CONFIG, $jobstr, $jobiq, $joblab, $ir; 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; $db->query("UPDATE fedjail set fed_days=fed_days-1"); $q=$db->query("SELECT * FROM fedjail WHERE fed_days=0"); $ids=array(); while($r=$db->fetch_row($q)) { $ids[]=$r['fed_userid']; } if(count($ids) > 0) { $db->query("UPDATE users SET fedjail=0 WHERE userid IN(".implode(",", $ids).")"); } $db->query("DELETE FROM votes"); $db->query("DELETE FROM fedjail WHERE fed_days=0"); $db->query("UPDATE userstats SET IQ=IQ+$jobiq"); $db->query("UPDATE userstats SET labour=labour+$joblab"); $db->query("UPDATE userstats SET strength=strength+$jobstr"); $db->query("UPDATE users SET daysingang=daysingang+1 WHERE gang > 0"); $db->query("UPDATE users SET daysold=daysold+1, boxes_opened=0"); $db->query("UPDATE users SET mailban=mailban-1 WHERE mailban > 0"); $db->query("UPDATE users SET millionare=millionare-1"); $db->query("UPDATE users SET donatordays=donatordays-1 WHERE donatordays > 0"); $db->query("UPDATE users SET cdays=cdays-1 WHERE course > 0"); $db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney/500) where bankmoney>0"); $db->query("UPDATE users SET cybermoney=cybermoney+(cybermoney/100*7) where cybermoney>0"); $q=$db->query("SELECT * FROM users WHERE cdays=0 AND course > 0"); while($r=$db->fetch_row($q)) { $cd=$db->query("SELECT * FROM courses WHERE crID={$r['course']}"); $coud=$db->fetch_row($cd); $userid=$r['userid']; $db->query("INSERT INTO coursesdone VALUES({$r['userid']},{$r['course']})"); $upd=""; $ev=""; if($coud['crSTR'] > 0) { $upd.=",us.strength=us.strength+{$coud['crSTR']}"; $ev.=", {$coud['crSTR']} strength"; } if($coud['crGUARD'] > 0) { $upd.=",us.guard=us.guard+{$coud['crGUARD']}"; $ev.=", {$coud['crGUARD']} guard"; } if($coud['crLABOUR'] > 0) { $upd.=",us.labour=us.labour+{$coud['crLABOUR']}"; $ev.=", {$coud['crLABOUR']} labour"; } if($coud['crAGIL'] > 0) { $upd.=",us.agility=us.agility+{$coud['crAGIL']}"; $ev.=", {$coud['crAGIL']} agility"; } if($coud['crIQ'] > 0) { $upd.=",us.IQ=us.IQ+{$coud['crIQ']}"; $ev.=", {$coud['crIQ']} IQ"; } $ev=substr($ev,1); if ($upd) { $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET us.userid=us.userid $upd WHERE u.userid=$userid"); } $db->query("INSERT INTO events VALUES('',$userid,unix_timestamp(),0,'Congratulations, you completed the {$coud['crNAME']} and gained $ev!')"); } $db->query("UPDATE users SET course=0 WHERE cdays=0"); $db->query("TRUNCATE TABLE votes;"); ?>   Ok so i'v checked everything that has to do with the courses and it appears to be letter for letter identical to the original so idk why it's like this but when courses are "over" they don't actually end the days just go negative. anyone see whats wrong?
  14. Re: Buy Your Custom Header, Login or Register!!! i'm buying one. The login looks good even though it's not quite finished
  15. does any one no what that means on the attack page? my players seem to get it randomly, and i don't really have time to look. does any one know off the top of thier head?
  16. Re: [$10] Mod REQUEST Attack System [V2] Nevermind i can't make this as i am already making a mod for my game that needs my attention and i can't give this my time. sorry
  17. Re: [$10] Mod REQUEST Attack System [V2] I should be able to i will get started
  18. Re: [MCCODES V2] Millionare game $20.00 lowered to $10!
  19. Wouldn't it be possible for us as game owners to save all of the data that would normally be in a database in a bunch of sessions? now i know this wouldn't be easy or efficent but just out of curiosity wouldn't this be possible? just do a dif. session name for every item and stuff.
  20. Re: Free Advertising For Your Games ^   Same problem as above
  21. Re: [MCCODES V2] Millionare game $20.00 oh duh i feel a little dumb now lol. www.respectedmafia.com User demo Pass demo And it may appear that you can type in the action and switch to the questions without going through the start section but thats only because of something i added to the cron so that the demo account can always play and it won't be like that for the real version. and even with that it sends you to question one anyways.
  22. Re: [MCCODES V2] Millionare game $15.00 Well it will look likw your background and mine right now needs a new template. However i made a quick edit which SHOULD work (did it in 2 minutes as i have to leave soon) so you can use the demo account to play it. It should let you play it unlimited times (refreshes at the minute cron) but i beleive i set it to NOT PAY YOU if you win on the demo account. For clear reasons though i can't allow you to go to the staff part but what it looks like is Kinda the make crime where thier the text boxes for what you want it to say and thiers one for all 15 questions 4 answers for each question and correct answer. Each is clearly labeled and it's easy to use
  23. Re: [MCCODES V2] Millionare game $20.00 lowered to $15 thats a steal.
  24. Re: [MCCODES V2] Millionare game $20.00 it's actually a very simple concept i use mktime() to assign a value to a session. Then i use it again on the page it goes to after your answer is inserted then if ($_SESSION['time2']>$_SESSION['time1']+15) it says you took longer than 15 seconds to answer and dies. To change the time limit you would just change 15 to whatever you wanted.
  25. Re: [MCCODES V2] Millionare game $20.00 i thought of that and yes i added a 15 second time limit (it would be extremely easy to change the time limit)
×
×
  • Create New...