Jump to content
MakeWebGames

gideon prewett

Members
  • Posts

    205
  • Joined

  • Last visited

Everything posted by gideon prewett

  1. more problems   <?php include "globals.php"; if($ir['hospital']) { die("You cant bust while you are in the hospital > [url='index.php']Back[/url]"); $h->endpage(); exit; } if($ir['jail']) { die("You cant bust while you are in the jail > [url='index.php']Back[/url]"); $h->endpage(); exit; } if($ir['brave'] < 5) { die("Sorry, it costs 5 brave to bust someone. You only have {$ir['brave']} brave. Come back later."); } if($ir['jail']) { die("You cannot bust out people while in jail."); } $_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['jail']) { die("That user is not in jail!"); } $mult=$r['level']*$r['level']; $chance=min(($ir['energy']/$mult)*50+1, 95); $test=$r['level']; if(rand(1,100) < $chance) { $gain=$r['level']*5; print "You successfully busted {$r['username']} out of jail. > [url='jail.php']Back[/url]"; $db->query("UPDATE users SET crimexp=crimexp+{$gain} WHERE userid=$userid"); $db->query("UPDATE users SET jail=0 WHERE userid={$r['userid']}"); $db->query("UPDATE users SET brave=brave-5 WHERE userid=$userid",$c); $db->query("UPDATE users SET exp=exp+2 WHERE userid=$userid",$c); $db->query("UPDATE users SET jailbusts=jailbusts+1 WHERE userid=$userid",$c); event_add($r['userid'], "[url='viewuser.php?u={$ir[']{$ir['username']}[/url] busted you out of jail.", $c); } if($ir['jailbusts'] == 0) { if($ir['yourbust'] == 1) { $db->query("UPDATE users SET points=points+1 WHERE userid=$userid",$c); $db->query("UPDATE users SET yourbusts=yourbusts+1 WHERE userid=$userid",$c); event_add($ir['userid'],"Congratulations on getting your first Bust! Once you get 100 you will receive a point! you will then on receive a point after every 100 busts!",$c); } print "While trying to bust out your friend, a guard spotted you and dragged you into jail yourself. Unlucky! > [url='jail.php']Back[/url]"; $time=min($test, 100); $db->query("UPDATE users SET jail=$time, jail_reason='Caught trying to bust out {$r['username']}' WHERE userid=$userid"); $db->query("UPDATE users SET brave=brave-5 WHERE userid=$userid",$c); event_add($r['userid'], "[url='viewuser.php?u={$ir[']{$ir['username']}[/url] was caught trying to bust you out of jail.", $c); } $h->endpage(); ?>   ok now ive tryed to add it so u get points for busting when the bust succeeds u see the msg but dont when it fails
  2. this is from my global func   function check_level() { global $db; global $ir,$c,$userid; $ir['exp_needed']=(int) (($ir['level']+1)*($ir['level']+1)*($ir['level']+1)*2.2); if($ir['exp'] >= $ir['exp_needed']) { $expu=$ir['exp']-$ir['exp_needed']; $ir['level']+=1; $ir['exp']=$expu; $ir['energy']+=2; $ir['brave']+=2; $ir['maxenergy']+=2; $ir['maxbrave']+=2; $ir['hp']+=50; $ir['maxhp']+=50; $ir['exp_needed']=(int) (($ir['level']+1)*($ir['level']+1)*($ir['level']+1)*2.2); if($ir['level'] == 5) { $db->query("UPDATE users SET points=points+1 WHERE userid=$userid",$c); event_add($ir['userid'],"Congratulations on getting to level 5, for doing so you have recieved one Point!",$c); } if($ir['level'] == 10) { $db->query("UPDATE users SET points=points+1 WHERE userid=$userid",$c); event_add($ir['userid'],"Congratulations on getting to level 10, for doing so you have recieved one Point!",$c); } if($ir['level'] == 15) { $db->query("UPDATE users SET points=points+1 WHERE userid=$userid",$c); event_add($ir['userid'],"Congratulations on getting to level 15, for doing so you have recieved one Point!",$c); } if($ir['level'] == 20) { $db->query("UPDATE users SET points=points+1 WHERE userid=$userid",$c); event_add($ir['userid'],"Congratulations on getting to level 20, for doing so you have recieved one Point!",$c); } if($ir['level'] == 30) { $db->query("UPDATE users SET points=points+1 WHERE userid=$userid",$c); event_add($ir['userid'],"Congratulations on getting to level 30, for doing so you have recieved one Point!",$c); } if($ir['level'] == 40) { $db->query("UPDATE users SET points=points+1 WHERE userid=$userid",$c); event_add($ir['userid'],"Congratulations on getting to level 40, for doing so you have recieved one Point!",$c); } if($ir['level'] == 50) { $db->query("UPDATE users SET points=points+2 WHERE userid=$userid",$c); event_add($ir['userid'],"Congratulations on getting to level 50, for doing so you have recieved Two Points!",$c); } if($ir['level'] == 60) { $db->query("UPDATE users SET points=points+1 WHERE userid=$userid",$c); event_add($ir['userid'],"Congratulations on getting to level 60, for doing so you have recieved one Point!",$c); } if($ir['level'] == 70) { $db->query("UPDATE users SET points=points+1 WHERE userid=$userid",$c); event_add($ir['userid'],"Congratulations on getting to level 70, for doing so you have recieved one Point!",$c); } if($ir['level'] == 80) { $db->query("UPDATE users SET points=points+1 WHERE userid=$userid",$c); event_add($ir['userid'],"Congratulations on getting to level 80, for doing so you have recieved one Point!",$c); } if($ir['level'] == 90) { $db->query("UPDATE users SET points=points+1 WHERE userid=$userid",$c); event_add($ir['userid'],"Congratulations on getting to level 90, for doing so you have recieved one Point!",$c); } if($ir['level'] == 100) { $db->query("UPDATE users SET points=points+2 WHERE userid=$userid",$c); event_add($ir['userid'],"Congratulations on getting to level 100, for doing so you have recieved Two Points!",$c); } if($ir['level'] == 110) { $db->query("UPDATE users SET points=points+1 WHERE userid=$userid",$c); event_add($ir['userid'],"Congratulations on getting to level 110, for doing so you have recieved one Point!",$c); } if($ir['level'] == 120) { $db->query("UPDATE users SET points=points+1 WHERE userid=$userid",$c); event_add($ir['userid'],"Congratulations on getting to level 120, for doing so you have recieved one Point!",$c); } if($ir['level'] == 130) { $db->query("UPDATE users SET points=points+1 WHERE userid=$userid",$c); event_add($ir['userid'],"Congratulations on getting to level 130, for doing so you have recieved one Point!",$c); } if($ir['level'] == 140) { $db->query("UPDATE users SET points=points+1 WHERE userid=$userid",$c); event_add($ir['userid'],"Congratulations on getting to level 140, for doing so you have recieved one Point!",$c); } if($ir['level'] == 150) { $db->query("UPDATE users SET points=points+1 WHERE userid=$userid",$c); event_add($ir['userid'],"Congratulations on getting to level 150, for doing so you have recieved one Point!",$c); } if($ir['level'] == 160) { $db->query("UPDATE users SET points=points+1 WHERE userid=$userid",$c); event_add($ir['userid'],"Congratulations on getting to level 160, for doing so you have recieved one Point!",$c); } if($ir['level'] == 170) { $db->query("UPDATE users SET points=points+1 WHERE userid=$userid",$c); event_add($ir['userid'],"Congratulations on getting to level 170, for doing so you have recieved one Point!",$c); } if($ir['level'] == 180) { $db->query("UPDATE users SET points=points+1 WHERE userid=$userid",$c); event_add($ir['userid'],"Congratulations on getting to level 180, for doing so you have recieved one Point!",$c); } if($ir['level'] == 190) { $db->query("UPDATE users SET points=points+1 WHERE userid=$userid",$c); event_add($ir['userid'],"Congratulations on getting to level 190, for doing so you have recieved one Point!",$c); } if($ir['level'] == 200) { $db->query("UPDATE users SET points=points+2 WHERE userid=$userid",$c); event_add($ir['userid'],"Congratulations on getting to level 200, for doing so you have recieved Two Points!",$c); } }   im new to this and have been away for a month so im trying to get back in to it and atm im confused ?(
  3. ive made a point system for my game and ive added it so u get points for reaching cirtan lvls this is a bit of the code im useing   if($ir['level'] == 5) { $db->query("UPDATE users SET points=points+1 WHERE userid=$userid",$c); event_add($ir['userid'],"Congratulations on getting to level 5, for doing so you have recieved one Point!",$c); }   i reach lvl 5 and i get the point but i also gain a point for every link i click on or refresh i make after that any ideas? ?(
  4. simple switch thanks allot both of u i will work on upgrading curts im still new to coding myself but im doing it all from testing stuff im still yet to read anything about php so its taking me a while and im getting stumped on simple stuff lol :wacko:
  5. could someone make me a simple switch to change vacation mode on and off i want it to be by itself not in prefrences   im trying to make it myself and could do it in seconds if it was in prefrences but ive never made 1 from scratch by itself the sql behind it is $db->query("UPDATE users SET vacation=0 WHERE userid=$userid",$c); $db->query("UPDATE users SET vacation=1 WHERE userid=$userid",$c); i think and if anybody could help i would be very greatfull :thumbsup:
  6. ive added this to my register page to add a mail to new users but it doesnt update my mainmenu to say the user has a mail   $db->query("INSERT INTO mail VALUES('', 0, 0, $i, unix_timestamp(),'[b]Welcome.[/b]','Welcome To [b]{$set['game_name']}[/b], Blah [b]<u>The basic Gist of the game:[/b]</u> blah.')");   does anybody know why or how to fix it?
  7. Re: [v2] custom txt colors I'm adding my mod to my site and have found out u need to change the colours in most of Ur game its allot of work to do but i think its worth it just to give Ur players the choice of what color scheme they want
  8. Re: [Mccodes V2] [bIG MOD] Trading Card Game [$15] joel check ur emails i have found a bug i emailed it to u
  9. Re: [v2] custom txt colors ive updated it to include a bg color changer aswell i havent tested it and i havent added crazy t's addition to the mod yet but i will when im back on my pc --------------------------------------------------------------------------------------------------------- 1. Open preferences.php and Find:     case 'picchange2': do_pic_change(); break; case 'picchange': pic_change(); break;   ADD Below:     case 'txtcolorchange2': do_txtcolor_change(); break; case 'txtcolorchange': conf_txtcolor_change(); break;   ADD Below:   case 'bgcolorchange2': do_bgcolor_change(); break; case 'bgcolorchange': conf_bgcolor_change(); break;   ---------------------------------------------------------------------------------------------------------- 2. Next Find:   [url='preferences.php?action=picchange']Display Pic Change[/url]   ADD Below:     [url='preferences.php?action=txtcolorchange']text color Change[/url]   ADD Below:   [url='preferences.php?action=bgcolorchange']bg color Change[/url]   ----------------------------------------------------------------------------------------------------------   3.Next Find:     function do_pic_change() { global $db,$ir,$c,$userid,$h; if($_POST['newpic'] == "") { print "You did not enter a new pic. [url='preferences.php?action=picchange']> Back[/url]"; } else { $_POST['newpic']=str_replace('\\\'',''', $_POST['newpic']); $db->query("UPDATE users SET display_pic='{$_POST['newpic']}' WHERE userid=$userid"); print "Pic changed!"; } }   ADD Below:     function conf_txtcolor_change() { global $ir,$c,$userid,$h; print "<center><hr width='20%'>txtcolor Change<hr width='20%'> <form action='preferences.php?action=txtcolorchange2' method='post'> <select class=textbox name='txtcolor'> <option value='lime'>lime</option> <option value='red'>red</option> <option value='blue'>blue</option> <option value='yellow'>yellow</option> <option value='pink'>pink</option> </Select> <input class='textbox' type='submit' value='Change txtcolor' /> </form>"; } function do_txtcolor_change() { global $db,$ir,$c,$userid,$h; $db->query("UPDATE users SET txtcolor='{$_POST['txtcolor']}' WHERE userid=$userid"); print "You Have Changed your txtcolor Type! [url='preferences.php']Back[/url]"; }   ADD Below:     function conf_bgcolor_change() { global $ir,$c,$userid,$h; print "<center><hr width='20%'>color Change<hr width='20%'> <form action='preferences.php?action=bgcolorchange2' method='post'> <select class=textbox name='bgcolor'> <option value='lime'>lime</option> <option value='red'>red</option> <option value='blue'>blue</option> <option value='yellow'>yellow</option> <option value='pink'>pink</option> </Select> <input class='textbox' type='submit' value='Change Bg Color' /> </form>"; } function do_bgcolor_change() { global $db,$ir,$c,$userid,$h; $db->query("UPDATE users SET bgcolor='{$_POST['bgcolor']}' WHERE userid=$userid"); print "You Have Changed your bg color Type! [url='preferences.php']Back[/url]"; }   ---------------------------------------------------------------------------------------------------------- SAVE preferences.php ---------------------------------------------------------------------------------------------------------- 4. Open header.php and where u put ur font color add;   {$ir['txtcolor']}   where u put ur background color add   {$ir['bgcolor']}   ---------------------------------------------------------------------------------------------------------- SAVE header.php ---------------------------------------------------------------------------------------------------------- 5. Run The SQL's in Phpmyadmin     ALTER TABLE `users` ADD `txtcolor` enum('lime','red','blue','yellow','pink') NOT NULL default 'lime'   ALTER TABLE `users` ADD `bgcolor` enum('lime','red','blue','yellow','pink') NOT NULL default 'blue'   ---------------------------------------------------------------------------------------------------------- if u want to use it or build on it please do and when u add it remember to change the colors or ur game will be green and blue as defult :-D
  10. Re: NOT a MOD just an Idea if it could be done i think that the house prices should differ depending there location and condition that way a player could buy a broken down house and fix it up to sell for more or saving up and buying a house in a better location u could also make Ur will differ depending what location Ur house is in
  11. Re: Proxy block i cant help u with this mod but i do have some words of warning allot of people these days are useing there mobile phones as modems and with all these new wireless dongles so people can use the net on the move and all of these things get counted as proxys so think carefully before bloking them
  12. Re: [V2] index.php i was adding the tags while u were writeing ur post lol i had a blonde moment and i love to think outside the box i was working on a paid mod but now my connections all messed up ive had to put it on hold :x
  13. this is my index.php i made it myself and figured i would share it with all of u   <?php $housequery=1; include "globals.php"; $ql = sprintf( "SELECT u.userid, u.username, w.id, w.idwarned, w.subject, w.reason, w.time " . "FROM users u " . "LEFT JOIN warns w ON (u.userid = w.idwarned) " . "WHERE (w.idwarned = %u)", $ir['userid']); $ql = $db->query($ql); $warns = ($db->num_rows($ql)); print " <center><h3>Home<hr width='80%'> "; print" <font color=red>Your House Is:</font> {$ir['hNAME']} {$ir['hPIC']} "; $exp=(int)($ir['exp']/$ir['exp_needed']*100); if ( !$ir['married'] ) { $marital="<font color='red'>No</font>"; } else { $k=mysql_query("SELECT username FROM users WHERE userid={$ir['married']}", $c); $marital="[url='viewuser.php?u={$ir[']".mysql_result($k,0,0)."[/url] "; $mair=mysql_query("SELECT u.*, h.* FROM users u LEFT JOIN houses h ON h.hWILL=u.maxwill WHERE userid={$ir['married']}",$c); $ms=mysql_fetch_array($mair); } if ($ir['married']>0) { $marr=mysql_query("SELECT * FROM users WHERE userid={$ir['married']}",$c); $ma=mysql_fetch_array($marr); if ($ma['willmax']>$ir['maxwill']) { mysql_query("UPDATE users SET maxwill={$ma['willmax']} WHERE userid=$userid",$c); } if ($ir['willmax']<$ir['maxwill'] && $ir['maxwill']>$ma['willmax']) { mysql_query("UPDATE users SET maxwill=willmax WHERE userid=$userid",$c); } } if ($ir['maxwill']<$ir['willmax']) { mysql_query("UPDATE users SET maxwill=willmax WHERE userid=$userid",$c); } if ($ir['married']==0 && $ir['maxwill']>$ir['willmax']) { mysql_query("UPDATE users SET maxwill=willmax WHERE userid=$userid",$c); } print <<<OUT <center><TABLE BORDER=2 BORDERCOLOR=lime CELLPADDING=2 CELLSPACING=2 WIDTH=100%> <TR> <TD></center><h3><center><u>General Info:</u></center></h2><center><table><tr> <td><font color=lime>[b]Name:[/b] {$ir['username']}</td> <td><font color=lime>[b]Crystals:[/b] {$cm}</td></tr><tr> <td><font color=lime>[b]Diamonds:[/b] {$ir['diamonds']}</td> <td><font color=lime>[b]Level:[/b] {$ir['level']}</td></tr><tr> <td><font color=lime>[b]HP:[/b] {$ir['hp']}/{$ir['maxhp']}</td> <td><font color=lime>[b]Hospitalize time:[/b] {$ir['htime']}</td></tr><tr> <td><font color=lime>[b]Forum Post's:[/b] {$ir['posts']}</td> <td>[b]Married:[/b] $marital [[url='partner.php']Manage[/url]]</td></tr><tr> <td><font color=lime>[b]Crimes Succeeded:[/b] {$ir['crimesd']}</td> <td><font color=lime>[b]Crimes Failed:[/b] {$ir['crimesf']}</td></tr> <td>[b]Warnings:[/b] $warns </td> <td><font color=lime>[url='warnings.php']View warnings[/url]</td></tr></table> OUT; $ts=$ir['strength']+$ir['agility']+$ir['guard']+$ir['labour']+$ir['IQ']; $ir['strank']=get_rank($ir['strength'],'strength'); $ir['agirank']=get_rank($ir['agility'],'agility'); $ir['guarank']=get_rank($ir['guard'],'guard'); $ir['labrank']=get_rank($ir['labour'],'labour'); $ir['IQrank']=get_rank($ir['IQ'],'IQ'); $tsrank=get_rank($ts,'strength+agility+guard+labour+IQ'); $ir['strength']=number_format($ir['strength']); $ir['agility']=number_format($ir['agility']); $ir['guard']=number_format($ir['guard']); $ir['labour']=number_format($ir['labour']); $ir['IQ']=number_format($ir['IQ']); $ts=number_format($ts); print <<<OUT <TD></center><h3><center><u>Stats:</u></center></h2> <center><table><tr> <td><font color=white>[b]Strength:[/b] {$ir['strength']} [Ranked: {$ir['strank']}]</td> <td><font color=white>[b]Agility:[/b] {$ir['agility']} [Ranked: {$ir['agirank']}]</td> <tr><td><font color=white>[b]Guard:[/b] {$ir['guard']} [Ranked: {$ir['guarank']}]</td> <td><font color=white>[b]Labour:[/b] {$ir['labour']} [Ranked: {$ir['labrank']}]</td> <tr><td><font color=white>[b]IQ: [/b] {$ir['IQ']} [Ranked: {$ir['IQrank']}]</td> <td><font color=white>[b]Total stats:[/b] {$ts} [Ranked: $tsrank]</td> </td></tr></table>[/b]</TR></TABLE> <hr height=2 width=75% color='lime'> OUT; $q=$db->query("SELECT * FROM items WHERE itmid IN({$ir['equip_primary']}, {$ir['equip_secondary']}, {$ir['equip_armor']})"); print "<h3>Equipped Items</h3><hr />"; while($r=$db->fetch_row($q)) { $equip[$r['itmid']]=$r; } print "<table width='75%' cellspacing='1' class='table'> <tr> <th>Primary Weapon</th> <td>"; if($equip[$ir['equip_primary']]['itmid']) { print $equip[$ir['equip_primary']]['itmname']."</td><td>[url='unequip.php?type=equip_primary']Unequip Item[/url]</td>"; } else { print "None equipped.</td><td> </td>"; } print "</tr> <tr> <th>Secondary Weapon</th> <td>"; if($equip[$ir['equip_secondary']]['itmid']) { print $equip[$ir['equip_secondary']]['itmname']."</td><td>[url='unequip.php?type=equip_secondary']Unequip Item[/url]</td>"; } else { print "None equipped.</td><td> </td>"; } print "</tr> <tr> <th>Armor</th> <td>"; if($equip[$ir['equip_armor']]['itmid']) { print $equip[$ir['equip_armor']]['itmname']."</td><td>[url='unequip.php?type=equip_armor']Unequip Item[/url]</td>"; } else { print "None equipped.</td><td> </td>"; } print "</tr> </table><hr /> <h3>Inventory</h3><hr />"; $inv=$db->query("SELECT iv.*,i.*,it.* FROM inventory iv LEFT JOIN items i ON iv.inv_itemid=i.itmid LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid WHERE iv.inv_userid={$userid} ORDER BY i.itmtype ASC, i.itmname ASC"); if ($db->num_rows($inv) == 0) { print "[b]You have no items![/b]"; } else { print "[b]Your items are listed below.[/b] <table width=100% class=\"table\" border=\"0\" cellspacing=\"1\"> <tr> <td class=\"h\">Item</td> <td class=\"h\">Sell Value</td> <td class=\"h\">Total Sell Value</td> <td class=\"h\">Links</td> </tr>"; $lt=""; while($i=$db->fetch_row($inv)) { if($lt!=$i['itmtypename']) { $lt=$i['itmtypename']; print "\n<tr><td colspan=4>[b]{$lt}[/b]</td></tr>"; } if($i['weapon']) { $i['itmname']="<font color='red'>*</font>".$i['itmname']; } if($i['armor']) { $i['itmname']="<font color='green'>*</font>".$i['itmname']; } print "<tr><td>{$i['itmname']}"; if ($i['inv_qty'] > 1) { print " x{$i['inv_qty']}"; } print "</td><td>\${$i['itmsellprice']}</td><td>"; print "$".($i['itmsellprice']*$i['inv_qty']); print "</td><td>[[url='iteminfo.php?ID={$i[']Info[/url]] [[url='itemsend.php?ID={$i[']Send[/url]] [[url='itemsell.php?ID={$i[']Sell[/url]] [[url='imadd.php?ID={$i[']Add To Market[/url]]"; $usershop=$db->query("select * from usershops where userid=$userid"); if(mysql_num_rows($usershop)!=0) { $addtoshop="[[url='addtoshop.php?ID={$i[']Put in Shop[/url]]"; } print"$addtoshop"; if($i['effect1_on'] || $i['effect2_on'] || $i['effect3_on']) { print " [[url='itemuse.php?ID={$i[']Use[/url]]"; } if($i['weapon']) { print " [[url='equip_weapon.php?ID={$i[']Equip as Weapon[/url]]"; } if($i['armor']) { print " [[url='equip_armor.php?ID={$i[']Equip as Armor[/url]]"; } print "</td></tr>"; } print "</table>"; print "[size="1"][b]NB:[/b] Items with a small red [/size]<font color='red'>*</font>[size="1"] next to their name can be used as weapons in combat. Items with a small green [/size]<font color='green'>*</font>[size="1"] next to their name can be used as armor in combat.[/size]"; } if(isset($_POST['pn_update'])) { $db->query("UPDATE users SET user_notepad='{$_POST['pn_update']}' WHERE userid=$userid"); $ir['user_notepad']=stripslashes($_POST['pn_update']); print "<hr color='lime'>[b]Personal Notepad Updated![/b]"; } print "<hr color='lime'>Your Personal Notepad:<form action='index.php' method='post'> <textarea rows='10' cols='50' name='pn_update'>".htmlspecialchars($ir['user_notepad'])."</textarea> <input type='submit' value='Update Notes' /></form>"; if($ir['jail'] or $ir['hospital']) { die("Your Bank cannot be accessed while in jail or hospital."); } print "<hr color='lime'><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']>19999) { print "Congratulations, you bought a bank account for \$20,000! [url='index.php']Start using my account[/url]"; mysql_query("UPDATE users SET money=money-20000,bankmoney=0 WHERE userid=$userid",$c); } else { print "You do not have enough money to open an account. [url='index.php']Back[/url]"; } } else { print "Open a bank account today, just \$20,000! [url='index.php?buy']> Yes, sign me up![/url]"; } } function index() { global $ir,$c,$userid,$h; print "\n[b]You currently have \${$ir['bankmoney']} in the bank.[/b] At the end of each day, your bank balance will go up by 0.3%. <table width='75%' border='2' bordercolor='#lime'> <tr> <td width='50%'>[b]Deposit Money[/b] It will cost you 0% of the money you deposit, rounded up. The maximum fee is \$0.<form action='index.php?action=deposit' method='post'> Amount: <input type='text' name='deposit' value='{$ir['money']}' /> <input type='submit' value='Deposit' /></form></td> <td> [b]Withdraw Money[/b] There is no fee on withdrawals.<form action='index.php?action=withdraw' method='post'> Amount: <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, after the fee is taken (\$$fee), \$$gain is added to your account. [b]You now have \${$ir['bankmoney']} in the bank.[/b] [url='index.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='index.php']> Back[/url]"; } } $h->endpage(); ?> some bits of it wont work for your game as i may have mods that u dont but every extra bit that wont work u can find the mods here on ce in the free section i would post the links but im on a very slow connection and it gives people practise in useing the search feature i would also put a screen shot up but just like the links my connection isnt good enough to be uploading i hope u all like it
  14. Re: Hire a sniper! this looks like a good adition to ce and also a good adaption to the normal boring hitman mods u find out there i havent looked at it properly yet but +1 for posting somthing uniqe
  15. Re: [v2] custom txt colors thats a good point i will be adding to this so users can change txt color bg color and custom bg pics and i will add more if i can think of it
  16. Re: multi curency my game is set in a wasteland after a nukular war i was going to have bottle caps and ring pulls so i could have a item that will cost say 4 bottle caps and 6 ring pulls does that make more sence?
  17. Re: [v2] custom txt colors nice 1 crazy t it works great :lol:
  18. Ive been messing around with the curency for these games and Ive made more than 1 curency but how do i get it so they can work together   example: in a shop there is a item that costs ?9.99 u pay with a ?10 and get 1p back i want 3 or 4 diffrent currency's that all work together can anybody help or explane what i want better than me lol
  19. Re: Hospital Java Countdown i think a guide to make the game time run live would be a great addition to CE
  20. Re: Hospital Java Countdown ha ha ha ha ha ha ive started somthing now :evil:
  21. Re: Hospital Java Countdown or spell :-D lol
  22. Re: [v2] custom txt colors depends what bits u want to be customisable if u want all the text in your whole game u will need to add it over color in allot of other files aswell
  23. this mod will allow ur users to pick what txt color they want on ur game --------------------------------------------------------------------------------------------------------- 1. Open preferences.php and Find:   case 'picchange2': do_pic_change(); break; case 'picchange': pic_change(); break;   ADD Below:   case 'colorchange2': do_color_change(); break; case 'colorchange': conf_color_change(); break; ---------------------------------------------------------------------------------------------------------- 2. Next Find:   [url='preferences.php?action=picchange']Display Pic Change[/url] ADD Below:   [url='preferences.php?action=colorchange']color Change[/url] ---------------------------------------------------------------------------------------------------------- 3.Next Find:   function do_pic_change() { global $db,$ir,$c,$userid,$h; if($_POST['newpic'] == "") { print "You did not enter a new pic. [url='preferences.php?action=picchange']> Back[/url]"; } else { $_POST['newpic']=str_replace('\\\'',''', $_POST['newpic']); $db->query("UPDATE users SET display_pic='{$_POST['newpic']}' WHERE userid=$userid"); print "Pic changed!"; } }   ADD Below:   function conf_color_change() { global $ir,$c,$userid,$h; print "<center><hr width='20%'>color Change<hr width='20%'> <form action='preferences.php?action=colorchange2' method='post'> <select class=textbox name='color'> <option value='lime'>lime</option> <option value='red'>red</option> <option value='blue'>blue</option> <option value='yellow'>yellow</option> <option value='pink'>pink</option> </Select> <input class='textbox' type='submit' value='Change color' /> </form>"; } function do_color_change() { global $db,$ir,$c,$userid,$h; $db->query("UPDATE users SET color='{$_POST['color']}' WHERE userid=$userid"); print "You Have Changed your color Type! [url='preferences.php']Back[/url]"; } ---------------------------------------------------------------------------------------------------------- SAVE preferences.php ---------------------------------------------------------------------------------------------------------- 4. Open header.php and where u put ur font color add;   {$ir['color']} ---------------------------------------------------------------------------------------------------------- SAVE header.php ---------------------------------------------------------------------------------------------------------- 5. Run This SQL in Phpmyadmin   ALTER TABLE `users` ADD `color` enum('lime','red','blue','yellow','pink') NOT NULL default 'lime' ---------------------------------------------------------------------------------------------------------- this mod was edited from a status mod i made it fo my game and thought i would share :lol:
  24. i tryed to edit a free mod i got here on ce i was trying to make a free mod for custom font color but it does not sceme to work :? --------------------------------------------------------------------------------------------------------- 1. Open preferences.php and Find:   case 'picchange2': do_pic_change(); break; case 'picchange': pic_change(); break;   ADD Below:   case 'colorchange2': do_color_change(); break; case 'colorchange': conf_color_change(); break; ---------------------------------------------------------------------------------------------------------- 2. Next Find:   [url='preferences.php?action=picchange']Display Pic Change[/url] ADD Below:   [url='preferences.php?action=colorchange']color Change[/url] ---------------------------------------------------------------------------------------------------------- 3.Next Find:   function do_pic_change() { global $db,$ir,$c,$userid,$h; if($_POST['newpic'] == "") { print "You did not enter a new pic. [url='preferences.php?action=picchange']> Back[/url]"; } else { $_POST['newpic']=str_replace('\\\'',''', $_POST['newpic']); $db->query("UPDATE users SET display_pic='{$_POST['newpic']}' WHERE userid=$userid"); print "Pic changed!"; } }   ADD Below:   function conf_color_change() { global $ir,$c,$userid,$h; print "<center><hr width='20%'>color Change<hr width='20%'> <form action='preferences.php?action=colorchange2' method='post'> <select class=textbox name='color'> <option value='lime'>lime</option> <option value='red'>red</option> <option value='blue'>blue</option> <option value='yellow'>yellow</option> <option value='pink'>pink</option> </Select> <input class='textbox' type='submit' value='Change color' /> </form>"; } function do_color_change() { global $db,$ir,$c,$userid,$h; $db->query("UPDATE users SET color='{$_POST['color']}' WHERE userid=$userid"); print "You Have Changed your color Type! [url='preferences.php']Back[/url]"; } ---------------------------------------------------------------------------------------------------------- SAVE preferences.php ---------------------------------------------------------------------------------------------------------- 4. Open header.php and where u put ur font color add;   {$r['color']} ---------------------------------------------------------------------------------------------------------- SAVE header.php ---------------------------------------------------------------------------------------------------------- 5. Run This SQL in Phpmyadmin   ALTER TABLE `users` ADD `color` enum('lime','red','blue','yellow','pink') NOT NULL default 'lime' ---------------------------------------------------------------------------------------------------------- can anybody tell me whats wrong
×
×
  • Create New...