Jump to content
MakeWebGames

solar

Members
  • Posts

    38
  • Joined

  • Last visited

    Never

Everything posted by solar

  1. This mod will realese the user from the hospital, yes its just a edited jailbail.php and anyone could of done it enjoy. Create a file called medical.php with the following in. <?php include "globals.php"; if($ir['medical']) { die("This person has alredy been healed in the last 5 minitues please try again later."); } $_GET['ID']=abs((int) $_GET['ID']); $r=$db->fetch_row($db->query("SELECT * FROM users WHERE userid={$_GET['ID']}")); if(!$r['userid']) { die("Invalid user"); } if(!$r['hospital']) { die("That user is not in hospital!"); } $cost=$r['level']*10; $cf=number_format($cost); if($ir['money'] < $cost) { die("Sorry, you do not have enough money for the medical fee {$r['username']}. You need \$$cf."); } print "The sergery was a sucess {$r['username']} has been released for a total fee of \$$cf. > [url='hospital.php']Back[/url]"; $db->query("UPDATE users SET money=money-{$cost} WHERE userid=$userid"); $db->query("UPDATE users SET medical=10 WHERE userid={$ir['userid']}"); $db->query("UPDATE users SET hospital=0 WHERE userid={$r['userid']}"); event_add($r['userid'], "[url='viewuser.php?u={$ir[']{$ir['username']}[/url] payed for your medical fee.", $c); $h->endpage(); ?>   Run this sql Query   ALTER TABLE `users` ADD `medical` int(11) NOT NULL default '0';   open hospital.php find: {$r['hospreason']}</td></tr>";   Replace with: {$r['hospreason']} [[url='medical.php?ID={$r[']Private care[/url]]</td></tr>";   open cron_fivemins.php add: $db->query("UPDATE users SET medical=0");   that can be added to any cron and the money can be easily changed if your game has actice gang wars i suggest adding in to hourly cron maybe daily
  2. Re: Login & Register $10   Wow that realy helps me thanks...
  3. I will be selling a login and register page for $10 or $5 for login or register Login: http://img208.imageshack.us/img208/8601/logineq6.jpg Register: http://img241.imageshack.us/img241/2798/registermx4.jpg File contains: login.php register.php tos.php contact.php and 4 images If you woud like to purchase this pelase post here and/or mail [email protected] Also a banner can be made for a price :wink:
  4. Re: Item Type Upgrade sorry i dont have enough time to add delete item type
  5. Re: Item Type Upgrade Edit: has been tested now works fine, but please still comment Find: if($_POST['name']) { $db->query("INSERT INTO itemtypes VALUES(NULL, '{$_POST['name']}')"); print "Item Type {$_POST['name']} added."; stafflog_add("Added item type {$_POST['name']}"); } else { print "<h3>Add Item Type</h3><hr /> <form action='staff_items.php?action=newitemtype' method='post'> Name: <input type='text' name='name' /> <input type='submit' value='Add Item Type' /></form>"; } } $h->endpage(); ?>   Replace with:   if($_POST['name']) { $db->query("INSERT INTO itemtypes VALUES(NULL, '{$_POST['name']}')"); print "Item Type {$_POST['name']} added."; stafflog_add("Added item type {$_POST['name']}"); print " <hr /> <h3>Add Another</h3><hr /> <form action='staff_items.php?action=newitemtype' method='post'> Name: <input type='text' name='name' /> <input type='submit' value='Add Item Type' /></form>"; } else { print "<h3>Add Item Type</h3><hr /> <form action='staff_items.php?action=newitemtype' method='post'> Name: <input type='text' name='name' /> <input type='submit' value='Add Item Type' /></form> <h3>Curent types</h3><hr /> Item Type's: ".itemtype_dropdown($c,'itmtype',$itemi['itmtype'])." "; } } $h->endpage(); ?>
  6. so ive been looking around the forums now for about 30 mins ive found a few scripts that say they block same ips but they dont seem to work for me :(, and all the other posts say look on forums...... can somone post a register.php that blocks multis or some code with some instructions to stop it please. im usein V2
  7. Re: HELP PLEASE even if the item cannot be bought you still need to add a buy price
  8. Re: Problem With class_db_mysql.php do you have a folder called class with the class_db_mysql.php file in it?
  9. Re: Header.php all sorted now
  10. hi does anyone have the original mccodes v2 header.php? i have changed the layout on mine and dont like it and i would like to go back to the normal one but i have no back up :-D
  11. Re: [FREE][CRYSTAL GYM] V1 slightly improved cgym.php <?php /* Crystal gym modded by Solar */ 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=""; if ($ir['hospital'] || $ir['jail']) { print "You cannot use the gym while in Hospital or Jail,Please come back later."; exit; } $_GET['times']= abs((int) $_GET['times']); if(isset($_GET['train'])) { $tgain=0; for($i=1;$i<=$_GET['times'] && $ir['crystals'] > 0;$i++) { if ($ir['crystals'] > 0) { $gain=rand(1,3)/rand(200,800)*rand(200,800)*(($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,crystals=crystals-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 crystals=crystals-1,exp=exp+$egain,will=will-$wu WHERE userid=$userid",$c); } else { $ir['will']=0; mysql_query("UPDATE users SET crystals=crystals-1,exp=exp+$egain,will=0 WHERE userid=$userid",$c); } $ir['crystals']-=1; $ir['exp']+=$egain; } else { $out="You do not have enough crystals 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['crystals']} crystals left. "; } else { $out="<h3>Crystal Gym:<h3>"; } $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['crystals']} times. <form action='cgym.php' method='get'> <input type='text' name='times' value='1' /><select type='dropdown' name='train'> <option value='strength'>Strength</option> <option value='agility'>Speed</option> <option value='labour'>Work Skill</option> <option value='iq'>IQ</option> <option value='guard'>Defence</option></select> <input type='submit' value='Train!' /></form>"; $h->endpage(); ?>   i only made it because some people were asking for it. I wasnt going to use i just thought it might be useful for some people
  12. Re: [mccode] User Verification Mod for V2   i agree
  13. Re: staff applications   [/quote] Where do I add this code to ? Thanks agin for any help givin :? [/quote] find $h->endpage(); ?>   then add that before it and make sure u change admin.php to staff.php
  14. Re: [TGM] Crystal Gym [TGM] y would people buy this if they can just change 'energy' to 'crystals' and then edit how mutch they get per train???
  15. Re: [FREE][CRYSTAL GYM] Thanks :-D first time i tryed i kept getting an error saying abusers not allowed but i managed to get rid of dat lol
  16. basically just a change gym but i like it :) cgym.php then open mainmenu.php and find the href section and under Gym add a link to cgym.php
  17. solar

    WTF

    Re: WTF Thanks :-D
  18. solar

    WTF

    Re: WTF Seems like quite a few poeple are posting in here so im gonna ask a qeuestion how to i start a topic :P
  19. Re: free mods ok wasn't going to i think your a great coder and a big help to n00bs
  20. solar

    WTF

    Re: WTF hmmm :? maybe a problem with the original user list and have you tryed uploading the original global_func
  21. solar

    WTF

    Re: WTF What about a error in global_func like something might be wrong with function user_dropdown($connection,$ddname="user",$selected=-1) { $ret="<select name='$ddname' type='dropdown'>"; $q=mysql_query("SELECT * FROM users ORDER BY username ASC",$connection); if($selected == -1) { $first=0; } else { $first=1; } while($r=mysql_fetch_array($q)) { $ret.="\n<option value='{$r['userid']}'"; if ($selected == $r['userid'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['username']}</option>"; } and what happens when you go on user list (just wondering)
  22. solar

    WTF

    Re: WTF from that picture i think its proberly somthing to do with view user u seem to have a lot of links maybe one of them inturruptus a command (just guessing) maybe you should upload a new viewuser.php that you havnt edited and see what happens
  23. solar

    WTF

    Re: WTF If it is an error in register.php This Register page is excellent <?php session_start(); print "<html> <head> <title>Crime-city</title> <style> body { font-family:Verdana;font-size:9pt;color: white; background-color:#000000; scrollbar-base-color: #005B70; scrollbar-arrow-color: #F3960B; scrollbar-DarkShadow-Color: #000000; } a:visited,a:active,a:hover,a:link { color: blue;text-decoration: none; } table,tr,td { font-size:9pt; } img { border:none; } </style> </head> <body><table width='100%' border='1' bgcolor='#000000'> <tr> <th scope='col'></th> </tr> </table> <center> "; $ip = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; if(file_exists('ipbans/'.$ip)) { die("<font color=red size=+1>Your IP has been banned, there is no way around this.</font></body></html>"); } require "mysql.php"; global $c; if($_POST['username']) { $sm=100; if($_POST['promo'] == "908") { $sm+=100; } $username=$_POST['username']; $username=str_replace(array("<", ">"), array("<", ">"), $username); $q=mysql_query("SELECT * FROM users WHERE username='{$username}'",$c); if(mysql_num_rows($q)) { print "Username already in use. Choose another."; } else if($_POST['password'] != $_POST['cpassword']) { print "The passwords did not match, go back and try again."; } else { $_POST['ref'] = abs((int) $_POST['ref']); $ip = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; $q=mysql_query("SELECT * FROM users WHERE lastip='$ip' AND userid={$_POST['ref']}",$c); $a=mysql_query("SELECT * FROM users WHERE lastip='$ip'",$c); if(mysql_num_rows($a) > 0) { die("No multi's! Your not trying to make another account are you! Sorry! Not Allowed!"); } if(mysql_num_rows($q)) { die("Creating Referral Multies Is Not Aloud."); } if($_POST['ref']) { $q=mysql_query("SELECT * FROM users WHERE userid={$_POST['ref']}",$c); $r=mysql_fetch_array($q); } mysql_query("INSERT INTO users (username, login_name, userpass, level, money, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, lastip) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), 1, $sm, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', '$ip')", $c); $i=mysql_insert_id($c); mysql_query("INSERT INTO userstats VALUES($i, 10, 10, 10, 10, 10)", $c); if($_POST['ref']) { require "global_func.php"; mysql_query("UPDATE users SET crystals=crystals+2 WHERE userid={$_POST['ref']}",$c); event_add($_POST['ref'],"For refering $username to the game, you have earnt 2 valuable crystals!",$c); mysql_query("INSERT INTO referals VALUES('', {$_POST['ref']}, $i, unix_timestamp(),'{$r['lastip']}','$ip')", $c); } print "Thank You For Registering! Please Login. > Login"; } } else { print "<style type='text/css'> <!-- #Layer2 { position:absolute; width:200px; height:115px; z-index:1; left: 354px; top: 356px; } #Layer6 { position:absolute; width:182px; height:202px; z-index:2; left: 10px; top: 204px; } #Layer7 { position:absolute; width:200px; height:115px; z-index:3; left: 350px; top: 201px; } #Layer8 { position:absolute; width:1081px; height:33px; z-index:4; left: 71px; top: 590px; } --> </style> <body bgcolor='#000000'> <div id='Layer7'> <table width='530' height='109' border='1' bgcolor='#000000'> <tr> <th scope='col'> Crime-city Registration</th> </tr> <td> <center> <form action=register.php method=post> <table width='530' border='1'> <td><div align='center'>Username:</div></td> <td><div align='center'> <input type='text' name='username' /> </div></td> </tr> <tr> <td><div align='center'>Password:</div></td> <td><div align='center'> <input type='password' name='password' /> </div></td> </tr> <tr> <td><div align='center'>Confirm Password: </div></td> <td><div align='center'> <input type='password' name='cpassword' /> Gender: <select type='dropdown' name='gender'><option value='male'>Male</option><option value='female'>Female</option></select> </div></td> </tr> <tr> <td><div align='center'>Email Address: </div></td> <td><div align='center'> <input type='text' name='email' /> </div></td> </tr> <tr> <td><div align='center'>Promo Code: </div></td> <td><div align='center'> <input type=text name=promo /> </div></td> </tr> <tr> </tr> </table> <input type=hidden name=ref value='"; if($_GET['REF']) { print $_GET['REF']; } print "'> <input type=submit value=Submit></form><form name=tos> <input type='checkbox' name=mybox value='1'>I Agree To The Terms Of Service </form> </center></td> </tr> </table> </div> <div id='Layer6'> <table width='181' height='203' border='1' bgcolor='#000000'> <tr> <th height='39' scope='col'>Navigation</th> </tr> <tr> <td height='30'>Login</td> </tr> <tr> <td height='28'>Register</td> </tr> <tr> <td height='30'>Lost Password?</td> </tr> <tr> <td height='30'>Screenshots</td> </tr> <tr> <td height='30'>Terms Of Service</td> </tr> </table> </div> <div id='Layer8'> table width='98%' border='1' bgcolor='#000000'> <tr> <th scope='col'><center> | This Game Is Brought To You By solar! | </center>"; } print "</body></html>"; ?>
  24. solar

    WTF

    Re: WTF when you view a user can you see staff notes if not the query for users may not have finished properly
  25. Re: free mods +1 for you
×
×
  • Create New...