Jump to content
MakeWebGames

hrabik1

Members
  • Posts

    17
  • Joined

  • Last visited

hrabik1's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Re: New Crime Page [V2] +1 Mod looks sweet... Good Job...
  2. Re: [Free][v1][v2] Password reset code i have been needing this for some of my peoples thanks +1
  3. Re: Free Loan Shark System +1
  4. Re: [mccode] Whore House Mod FREE +1
  5. Re: [v1] Updated Statistics Page +1
  6. Re: [mccode] Black Jack +1
  7. Re: [V1] FREE! ID refiller/counter +1
  8. Re: [FREE][MCCODE V1] Mass Payment +1
  9. Re: [mccode] Admin Modifcations +1
  10. Re: [v1]Refill Users good work +1
  11. Re: door shoot good work +1
  12. Heres a gym for people who dont have any crystals. <?php /* money gym mod hrabik1 www.criminalspreev2.com */ 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']); $lv=date('F j, Y, g:i a',$ir['laston']); $out=""; $_GET['times']= abs((int) $_GET['times']); if(isset($_GET['train'])) { $tgain=0; for($i=1;$i<=$_GET['times'] && $ir['money'] > 0;$i++) { if ($ir['money'] > 0) { $gain=rand(1,3)/rand(100,300)*rand(100,300)*(($ir['will']+20)/150); $tgain+=$gain; if ($_GET['train']=="IQ") { $gain/=100; } $ir[$_GET['train']]+=$gain; $egain=$gain/10; $ts=$ir[$_GET['train']]; $st=$_GET['train'];   mysql_query("UPDATE userstats SET $st=$st+".$gain." WHERE userid=$userid",$c) or die("UPDATE userstats SET $st=$st+$gain,money=money-1,exp=exp+$egain WHERE userid=$userid ".mysql_error()); $wu=(int) (rand(1,3)); if ($ir['will'] >= $wu) { $ir['will']-=$wu; mysql_query("UPDATE users SET money=money-1,exp=exp+$egain,will=will-$wu WHERE userid=$userid",$c); } else { $ir['will']=0; mysql_query("UPDATE users SET money=money-1,exp=exp+$egain,will=0 WHERE userid=$userid",$c); } $ir['money']-=1; $ir['exp']+=$egain; } else { $out="You do not have enough money to train."; } } $stat=$ir[$st]; $i--; $out="You begin training your $st. You have gained $tgain $st by training it $i times. You now have $stat $st and {$ir['money']} money left. "; } else { $out=" Money Gym: Main Lobby "; } $h->userdata($ir,$lv,$fm); $h->menuarea(); print $out; print "Enter the amount of times you wish to train and choose the stat to train. You can train up to {$ir['money']} times.   Strength Speed Work Skill Defence   "; $h->endpage(); ?>
  13. i have been at a stand still for months because i cant figure out how to set up the damn mysql.php i have tried many times and still cant get it
×
×
  • Create New...