
The Ace
Members-
Posts
363 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by The Ace
-
Re: [V2] Credit Card Mod [V2] Anyone care to help me out? lol
-
Re: FIRST THOUGH! guru
-
Re: 3 Word Game which fits into....
-
Re: Counting (nr game) 1900 :-P
-
Re: [V1] Chests [V1] Very nice mod!!! I love it! :-P
-
Re: [FAQ] Securing Input Variables Thanks Floydian! I shall study, study, study! And I will be reading this topic A LOT!! Thanks to the both of you. :)
-
Re: [FAQ] Securing Input Variables I had a feeling it would be wrong.... :( I just find it hard to learn off of websites (and sometimes books....I find it easier by being taught by others), but I will try my best. Thanks, and sorry for being SO n00bish!
-
Re: [FAQ] Securing Input Variables OK, I see. Thanks. I will certainly re-read, re-read again and re-read again!! I just can't get my head around security! :-P Thanks Nyna, for taking the time to reply. By the way, will this work, in a way: $db->query mysql_escape("UPDATE users SET money=money-100 where userid=$userid", $c); ?
-
Re: [FAQ] Securing Input Variables You make it sound SO easy!! :? lol Is this used to secure your site against injections? :?
-
Re: Exp doesn't work Nopes....lol. But thanks. :)
-
Re: [v2] Fun mod [v2] Nevermind. I got it working. If you want it, here it is. Feel free to change/add anything! (Sorry about security, if there is a problem with it, I'm a n00b!) <?php include "globals.php"; print "<h3>Welcome to the Prize Machine!</h3> "; if ($_GET['action'] != 'prize') { $prize=$ir['prize']; print "Hey! Want a prize!? You may open one a day! "; } if ($ir['prize']==1) { print("You have already opened a prize today! Come back tomorrow. "); } else { $open = rand(1,5); $db->query("UPDATE users SET prize=prize+1 where userid=$userid",$c); if ($open == 1) { $plus=rand(10,15); print "You opened Prize #1! You gain <font color=red>$plus</font> rubies!"; $db->query("UPDATE users SET ruby=ruby+$plus where userid=$userid",$c); } if ($open == 2) { print "Ooh! You opened Prize #2! See what happened!"; $db->query("UPDATE users SET energy=0, will=0, brave=0 where userid=$userid",$c); } if ($open == 3) { $minus=rand(100,200); $add=rand(200,500)*(floor($ir['level']/2)+25); print "You opened Prize #3! You lost £$minus but gained <font color=gold>$add Golden Coins</font>!"; $db->query("UPDATE users SET money=money-$minus, crystals=crystals+$add where userid=$userid",$c); } if ($open == 4) { $strength=rand(150,300)*($ir['level']/2); print "You opened Prize #4! You gained <font color=red>$strength Strength</font>!"; $db->query("UPDATE userstats SET strength=strength+$strength where userid=$userid",$c); } if ($open == 5) { $don=rand(1,3); print "You opened Prize #5! You gained $don Donator Days!"; $db->query("UPDATE users SET donatordays=donatordays+$don where userid=$userid",$c); } } $h->endpage; ?> Run this SQL: ALTER TABLE `users` ADD `prize` INT(11) NOT NULL DEFAULT '0'; Add this to cron_day: $db->query("UPDATE users SET prize=0");
-
Re: Exp doesn't work Right....this is annoying: where do I find: $ir['exp']+=(int) ($r['crimeSUCCESSMUNY']/8); :-P
-
Re: [v2] Fun mod [v2] :) I decided to go a bit further with it, but am now stuck! I decided to make it "like" streets. Here is what I have: <?php include "globals.php"; print "<h3>Welcome to the Prize Machine!</h3> "; if ($_GET['action'] != 'prize') { $prize=$ir['prize']; print "Hey! Want a prize!? You may open one a day! "; print " [url='prize.php?action=prize']Click Here![/url]"; } if ($ir['prize'] = 1) { print("You have already opened a prize today! Come back tomorrow. "); } else { $open = rand(1,5); $db->query("UPDATE users SET prize=prize+1 where userid=$userid",$c); if ($open == 1) { $plus=rand(10,15); print "You opened Prize #1! You gain <font color=red>$plus</font> rubies!"; $db->query("UPDATE users SET ruby=ruby+$plus where userid=$userid",$c); } if ($open == 2) { print "Ooh! You opened Prize #2! See what happened!"; $db->query("UPDATE users SET energy=0, will=0, brave=0 where userid=$userid",$c); } if ($open == 3) { $minus=rand(100,200); $add=rand(200,500)*(floor($ir['level']/2)+25); print "You opened Prize #3! You lost £$minus but gained <font color=gold>$add Golden Coins</font>!"; $db->query("UPDATE users SET money=money-$minus, crystals=crystals+$add where userid=$userid",$c); } if ($open == 4) { $strength=rand(150,300)*($ir['level']/2); print "You opened Prize #4! You gained <font color=red>$strength Strength</font>!"; $db->query("UPDATE userstats SET strength=strength+$strength where userid=$userid",$c); } if ($open == 5) { $don=rand(1,3); print "You opened Prize #5! You gained $don Donator Days!"; $db->query("UPDATE users SET donatordays=donatordays+$don where userid=$userid",$c); } } $h->endpage; ?> BUT, it doesn't work. There is no error, but whenever I go to open a prize, it says I have already opened one. I have added this SQL: ALTER TABLE `users` ADD `prize` INT(11) NOT NULL DEFAULT '0'; Note: This is my first attempt at a "mod".
-
Re: Question Do the users actually go into the jail?
-
Re: [V2] Credit Card Mod [V2] I have edited my bank so you can transfer money from your bank into your credit card, which works fine. But, if a user hasn't bought a credit card, and they transfer, they can access their credit card and deposit an withdraw without actually buying one. How would I make it so that if they haven't boughta credit card and they try to transfer, it prints "You need to buy a credit card first before you can transfer!"? Would it be at the beginning of the transfer() function: { if($ir['creditcard'] < 0) print "You need to buy a credit card first!"; } else { ..... } Or something along the lines of that! :-P
-
Re: [Free V2] Lottery This problem is linked to the first: When the lottery goes out when there is more than one person in it, the winner only got £1,800, and not £3,400. ID 2 won, but he didn't get the £1,800! Grr! :x
-
Re: Users Online Thanks to both of you!!! :D
-
Re: Users Online I forgot, whenever there are multiple users online, it shows this: Here is my code: (same as above, from Tonka) <?php include "globals.php"; print "<h3>Users Online</h3> <table width=30% cellspacing='1' class='table'>"; $cn=0; $q=$db->query("SELECT * FROM users WHERE laston>unix_timestamp()-15*60 ORDER BY laston DESC"); while($r=$db->fetch_row($q)) { $la=time()-$r['laston']; $unit="secs"; if($la >= 60) { $la=(int) ($la/60); $unit="mins"; } if($la >= 60) { $la=(int) ($la/60); $unit="hours"; if($la >= 24) { $la=(int) ($la/24); $unit="days"; } } $cn++; print "<tr align='center'><th>No.</th><th>User</th><th>Time Since Last Click</th></tr><tr align='center'><td>$cn.</td> <td>[url='viewuser.php?u={$r[']{$r['username']}[/url]</td> <td>($la $unit)</td></tr>"; } print "</table>"; $h->endpage(); ?> I am so confuzzled!!! :?
-
Re: [Free V2] Lottery Ummm....I think I have found a slight problem: (this is from my DB) Full Texts id userid amount jackpot Edit Delete 1 1 100 1800 Edit Delete 2 1 100 1700 Edit Delete 3 1 100 1600 Edit Delete 4 1 100 1500 Edit Delete 5 1 100 1400 Edit Delete 6 1 100 1300 Edit Delete 7 1 100 1200 Edit Delete 8 1 100 1100 Edit Delete 9 1 100 1000 Edit Delete 10 1 100 900 Edit Delete 11 1 100 800 Edit Delete 12 1 100 700 Edit Delete 13 1 100 600 Edit Delete 14 1 100 500 Edit Delete 15 1 100 400 Edit Delete 16 1 100 300 Edit Delete 17 1 100 200 Edit Delete 18 2 100 1600 Edit Delete 19 2 100 1500 Edit Delete 20 2 100 1400 Edit Delete 21 2 100 1300 Edit Delete 22 2 100 1200 Edit Delete 23 2 100 1100 Edit Delete 24 2 100 1000 Edit Delete 25 2 100 900 Edit Delete 26 2 100 800 Edit Delete 27 2 100 700 Edit Delete 28 2 100 600 Edit Delete 29 2 100 500 Edit Delete 30 2 100 400 I have highlighted the problem in RED I am ID 1, and I bought 15 tickets, so the jackpot read £1500. Then when ID 2 bought a few tickets, it didn't change in the actual game. It seems that each user has their own jackpot....anyone know how to fix this...? :-P The ID for the ticket bought, I think is wrong.... ID 1 should have a jackpot of £100...therefore ID 18 should have a jackpot of £1,800.... :)
-
Re: Hmm....Bank Fees!? Oh, I see. :) Thanks! I might consider that when my game gets more popular. (It is currently undergoing maintanence). And, I don't think I will get many users, because I don't plan to advertise until I get what I want done. ;)
-
I am running V2. My cyberbank withdrawal fee is the usual: 7.5% and the maximum is £750,000. Nothing wrong there. However, whenever I withdraw money, the fee goes back into my bank, which I don't really want to happen...anyone know why? Should I post my cyberbank script? Cheers, The Ace :-P
-
Re: mccodes v2 i need serious help it was that simple!!!! thanks ace!!! :D i cant believe it lol Welcome. ;)
-
Re: [V2] Race Mod [V2] Thanks Ze0n! :D Worked wonders.
-
Re: [V2] Race Mod [V2] Yeah...much easier rather than going through it all and change it manually! Back to the race...what sorta thing do I add so it costs about £500,000 to change your race....?
-
Re: [V2] Race Mod [V2] Ooh, that is a good idea! I might consider that! :D :wink: