Jump to content
MakeWebGames

Assault

Members
  • Posts

    68
  • Joined

  • Last visited

Everything posted by Assault

  1. Re: New! Player report [FREE] +1 great work keep it up :P
  2. Re: [McCodes V2] Private Helth Care (Donator Only) opa! it works completly now here is the working code for mccodes v1 <?php session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); echo "<h3>Hospital</h3>"; if(isset($_POST['hc'])) { if($ir['donatordays'] == 0) { echo "Sorry, this is for donators only."; echo " "; echo "[url='hospital.php']> Go Back[/url]"; $h->endpage(); exit; } if($ir['money'] < 4999) { echo "Sorry, you need at leaset \$5,000 to get Private Health Care."; echo " "; echo "[url='hospital.php']> Go Back[/url]"; $h->endpage(); exit; } if($ir['hospital'] == 1) { echo "Sorry, you can not get any more health care."; echo " "; echo "[url='hospital.php']> Go Back[/url]"; $h->endpage(); exit; } $hosptime = $ir['hospital'] / 2; $newtime = round($hosptime); $do = sprintf("UPDATE users SET hospital = %u, money = money - 5000 WHERE userid = %u",($newtime),($ir['userid'])); mysql_query($do); echo sprintf("You get Private Health Care you save %u minutes.",($newtime)); echo " "; echo "[url='hospital.php']> Go Back[/url]"; } else { if($ir['donatordays'] > 0) { if ($ir['hospital']) { echo "<form action='hospital.php' method='post'>"; echo "<input type='hidden' name='hc' />"; echo "<input type='submit' value='Get Private Health Care' />"; echo "</form>"; echo " "; } } echo "<table width='75%' class=\"table\" border=\"0\" cellspacing=\"1\"> <tr bgcolor=gray> <th>Name</th> <th>Level</th> <th>Time</th> <th>Reason</th> </tr>"; $q=mysql_query("SELECT u.userid, u.username, u.level, u.hospital, u.hospreason, u.gang, c.* FROM users u LEFT JOIN gangs c ON u.gang=c.gangID WHERE u.hospital > 0 ORDER BY u.hospital DESC",$c); while($r=mysql_fetch_array($q)) { echo " <tr> <td>{$r['gangPREFIX']} [url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]</td> <td>{$r['level']}</td> <td>{$r['hospital']} minutes</td> <td>{$r['hospreason']}</td> </tr>"; } echo "</table>"; } $h->endpage(); ?>
  3. Re: [McCodes V2] Private Helth Care (Donator Only) error is gone but have a new problem now http://thugmayhem.com/error.JPG
  4. Re: [McCodes V2] Private Helth Care (Donator Only) hmm these are lines 80-82 80. $q=$mysql_query("SELECT u.userid, u.username, u.level, u.hospital, u.hospreason, u.gang, c.* FROM users u LEFT JOIN gangs c ON u.gang=c.gangID WHERE u.hospital > 0 ORDER BY u.hospital DESC",$c); 81. while($r=$mysql_fetch_row($q)) 82. {   error is Fatal error: Call to undefined function: () in /home/thugmayh/public_html/hospital.php on line 80
  5. Re: [McCodes V2] Private Helth Care (Donator Only) I changed it to mccodes v1 but i have one error that i received, the error is below   $q=$db->query("SELECT u.userid, u.username, u.level, u.hospital, u.hospreason, u.gang, c.* FROM users u LEFT JOIN gangs c ON u.gang=c.gangID WHERE u.hospital > 0 ORDER BY u.hospital DESC",$c);   <?php session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); echo "<h3>Hospital</h3>"; if(isset($_POST['hc'])) { if($ir['donatordays'] == 0) { echo "Sorry, this is for donators only."; echo " "; echo "[url='hospital.php']> Go Back[/url]"; $h->endpage(); exit; } if($ir['money'] < 4999) { echo "Sorry, you need at leaset \$5,000 to get Private Health Care."; echo " "; echo "[url='hospital.php']> Go Back[/url]"; $h->endpage(); exit; } if($ir['hospital'] == 1) { echo "Sorry, you can not get any more health care."; echo " "; echo "[url='hospital.php']> Go Back[/url]"; $h->endpage(); exit; } $hosptime = $ir['hospital'] / 2; $newtime = round($hosptime); $do = sprintf("UPDATE users SET hospital = %u, money = money - 5000 WHERE userid = %u",($newtime),($ir['userid'])); mysql_query($do); echo sprintf("You get Private Health Care you save %u minutes.",($newtime)); echo " "; echo "[url='hospital.php']> Go Back[/url]"; } else { if($ir['donatordays'] > 0) { if ($ir['hospital']) { echo "<form action='hospital.php' method='post'>"; echo "<input type='hidden' name='hc' />"; echo "<input type='submit' value='Get Private Health Care' />"; echo "</form>"; echo " "; } } echo "<table width='75%' class=\"table\" border=\"0\" cellspacing=\"1\"> <tr bgcolor=gray> <th>Name</th> <th>Level</th> <th>Time</th> <th>Reason</th> </tr>"; $q=$db->query("SELECT u.userid, u.username, u.level, u.hospital, u.hospreason, u.gang, c.* FROM users u LEFT JOIN gangs c ON u.gang=c.gangID WHERE u.hospital > 0 ORDER BY u.hospital DESC",$c); while($r=$db->fetch_row($q)) { echo " <tr> <td>{$r['gangPREFIX']} [url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]</td> <td>{$r['level']}</td> <td>{$r['hospital']} minutes</td> <td>{$r['hospreason']}</td> </tr>"; } echo "</table>"; } $h->endpage(); ?>
  6. Re: Some Help with MCCODE V1 Wow, thanks! it worked beautifully! but don't i have to add a cron some where so it credits each account with their interest each day?
  7. Re: [McCodes V2] Private Helth Care (Donator Only) i tried to convert this to v1 but get this error whats on that line while($r=$db->fetch_row($q))
  8. Re: [McCodes V2] Assassinate user (donator only) For version 1 if anyone wants it (like me) BTW this mod works great! <?php session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); if ($ir['hospital']) { echo ' You are in hospital, you cant contact an assasin'; } else { echo ' <style type="text/css"> <!-- .style1 { font-size: 24px; font-weight: bold; } --> </style>'; if($ir['donatordays'] > 0) { if(!isset($_POST['id'])) { echo ' <label> <div align="center"><span class="style1"> Assassinate User</span> Here you can hire an assasin to assassinate a user, he has a 20% chance of sucsess, he charges $25,000. For this he will attempt to kill any one.</div> <form name="form1" method="post" action="'. $_SERVER['PHP_SELF'] .'"> <div align="center"> <div align="center">User ID <input name="id" type="text" id="id"> </div> <label> <div align="center"> <input type="submit" name="Submit" value=" Assassinate "> </div> </label> </form>'; } else { if ($ir['money'] < 24999) { echo "Error: You Need Atleast $25000 to hire an assasin"; } else { $user = abs(@intval ($_POST['id'])); $rand = mt_rand(1,5); mysql_query("UPDATE `users` SET `money`=`money` - '25000' WHERE `userid`={$ir['userid']}"); if ($rand == 1) { // this will be a sucsesful attack print "Your assasin killed them in the dead of night!! "; $hosptime=rand(5,25); mysql_query("UPDATE users SET hp=1,hospital=$hosptime,hospreason='Assassinated' WHERE userid=$user"); event_add($user,"You were assassinated",$c); } else { // this is an unsucsesfull attack print "Your assasin was caught, he was then Tortured finaly he gave up your name, they then come and pay you a visit!."; event_add($user,"Some one attepted to assassinate you!",$c); mysql_query("UPDATE users SET hp=1,hospital=25 ,hospreason='Failed Assassination' WHERE userid={$ir['userid']}"); } } } } else { echo "You need to be a donator to access this page"; } } $h->endpage(); ?>
  9. Re: Some Help with MCCODE V1 Thank you very much 1st. when i try to enter sections of that intop the page or even the whole thing i get this error 2. It worked! 3. I figured it out, the design/css part is spread out over different files (brilliant) here is my bank.php files <?php /*----------------------------------------------------- -- Mono Country v1.0 BETA -- A product of DBS-entertainment -- Copyright held 2005 by Dabomstew -- INDEX.php -----------------------------------------------------*/ session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); print "<h3>Bank</h3>"; if($ir['bankmoney']>-1) { switch($_GET['action']) { case "deposit": deposit(); break; case "withdraw": withdraw(); break; default: index(); break; } } else { if(isset($_GET['buy'])) { if($ir['money']>5000) { print "Congratulations, you bought a bank account for \$5,000! [url='bank.php']Start using my bank account![/url]"; mysql_query("UPDATE users SET money=money-5000,bankmoney=0 WHERE userid=$userid",$c); } else { print "You do not have enough money to open an account. [url='explore.php']Back to downtown...[/url]"; } } else { print "Open a bank account today, just \$5,000! [url='bank.php?buy']> Yes, sign me up![/url]"; } } function index() { global $ir,$c,$userid,$h; print "\n <table width='40%' border='2'> <tr> <td width='50%'> <div class="g_content"><h3> Bank</h3><div class="g_text"> Welcome to the bank. Here are your bank details: <table><tr> <td>Bank:</td><td> \${$ir['bankmoney']}</td><td> (How much you have)</td> </tr><tr> <td>Interest Daily:</td><td> </td><td> (How much you have)</td> </tr><tr> <td>Interest Rate:</td><td> 2%</td><td> (Daily Interest)</td> </tr></table> [b]Deposit Money[/b] Fee 0%<form action='bank.php?action=deposit' method='post'> <input type='text' name='deposit' value='{$ir['money']}' /> <input type='submit' value='Deposit' /></form> [b]Withdraw Money[/b] Fee 0%<form action='bank.php?action=withdraw' method='post'> <input type='text' name='withdraw' value='{$ir['bankmoney']}' /><input type='submit' value='Withdraw' /></form> </td> </tr> </table>"; } function deposit() { global $ir,$c,$userid,$h; $_POST['deposit']=abs((int) $_POST['deposit']); if($_POST['deposit'] > $ir['money']) { print "You do not have enough money to deposit this amount."; } else { $fee=ceil($_POST['deposit']*0/100); if($fee > 0) { $fee=0; } $gain=$_POST['deposit']-$fee; $ir['bankmoney']+=$gain; mysql_query("UPDATE users SET bankmoney=bankmoney+$gain, money=money-{$_POST['deposit']} where userid=$userid",$c); print "You hand over \${$_POST['deposit']} to be deposited. [b]You now have \${$ir['bankmoney']} in the bank.[/b] [url='bank.php']> Back[/url]"; } } function withdraw() { global $ir,$c,$userid,$h; $_POST['withdraw']=abs((int) $_POST['withdraw']); if($_POST['withdraw'] > $ir['bankmoney']) { print "You do not have enough banked money to withdraw this amount."; } else { $gain=$_POST['withdraw']; $ir['bankmoney']-=$gain; mysql_query("UPDATE users SET bankmoney=bankmoney-$gain, money=money+$gain where userid=$userid",$c); print "You ask to withdraw $gain, the banking lady grudgingly hands it over. [b]You now have \${$ir['bankmoney']} in the bank.[/b] [url='bank.php']> Back[/url]"; } } $h->endpage(); ?>
  10. Re: [MCCODES V2+V1] Easiest Editing System you will ever need... Sorry, noob questions but where do i go to add this in as i don't have a file called staff_items.php. I assume i don't create the php file since it doesn't have the php tags Thanks
  11. Re: [mccode v1] Updated Mailbox love this mode make the mail box look a lot cleaner
  12. Assault

    Hello

    Hey, I am obviously new here, a friend of mine suggested this site since i now operate/run/and own an mccodes v1 site. I bought it from wyatt the site is www.thugmayhem.com, i am working hard on changing the theme, adding more features, and making it a great game. I have already added reCAPCHA to help stop some bots. Thanks!
  13. I have been modifying my script a bit I have added reCAPTCHA which works very nicely and was very easy to install. ================= First off in the bank.php file how do i get it to show the daily interest you will gain, i want to have a maximum cap of 500k and you stop earning interest after you have 20million in your bank account. Ex: John has Account: 15,000,000 Daily interest: $300,000 (max 500,000) Interest Rate: 2% (For first $20,000,000) ================= Second off, in preferences.php under the shortcuts area there is this error line 559 has this: if(mysql_num_rows($q)==0) ================= Third off, how to change the layout of the site, i found how to change the background colors,and tet but how do i make it so the site is not a full page site but rather centered with blank room on each side ================= Thank you all in advanced!
×
×
  • Create New...