
Veasey
Members-
Posts
44 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Events
Everything posted by Veasey
-
Thanks
-
I must say, creating a new table for the bans is a better idea but though it was a quick mod i made, i might just work on it :D ;) Thanks
-
Thank you, your a star :thumbup: :)
-
This is a quick mod that ive made, i have not got a clue how to ban more then one IP but this is just something ive made quickly so members might add to there game, this is ban users by there ip address so they can not access your game by login / register / inside game! so you don't have to do it manually by codes, you can just do it by staff panel! Enjoy Add this to your PHPMYADMIN: [mysql]INSERT INTO settings VALUES('','game_ip_ban','XX.XXX.XXX.XXX'); [/mysql] Now Open Up Header.php & Login.php & Register.php And Add $ip = getenv('REMOTE_ADDR'); $blocked = "{$set['game_ip_ban']}"; if (ereg($blocked,$ip)) { echo " <table width='100%' class='table4'><tr><th>You Have Been IP Banned</th></tr></table> "; exit(); } Save & Close; Now Open Up Staff.php And Find Game Announcements: <input type='text' name='game_announcements' value='{$set['game_announcements']}' /> Add Underneath Game Ip Bans: <input type='text' name='game_ip_ban' value='{$set['game_ip_ban']}' /> Save & Close, That Should Be It Like i said, its only something small, i dont know how to ban more than one IP ADDRESS so if anyone can tell me it will be great, thank you & enjoy
-
well thats if you had the problem that i had
-
You forgot to say about truncate table users becuase when you register sometimes, well this effecting me, but you need to clear the table after you have registered then register again and dont forget to change admin to 1 here are the full instructions, Go through the step by step instructions with SlanderDesign and when you finish go back to your PHPMyAdmin so select your database that you have used and click on SQL and type in [mysql] TRUNCATE table grpgusers [/mysql] now register again and after you registered go back on to your database --> grpgusers --> your game username and change admin = 0 to admin = 1 thats all its not that straight forward if you only just started learning MySQL but i sure for the quality coders like Pudda, MTG, and more.. im sure they understand
-
you got a cheek lol 1) because im fed up of coding for my self and i want to help other people for a change 2) i havnt posted many mods up here because i dont wish to only mods that are worth nothing that go on here from me 3) and my new mission is something im going to do not you, so dont worry ;) XD happy? lool
-
lol il sort it out for you soon, il make it more basic for you, ive stopped Game Engines now, ive on a new mission, but i can still help the people that need it, pass my name out and i can sort you out
-
will that secure the points market for GRPG?
-
looks good but i have not tested it yet
-
thats becuase that current code is for money not points, i prefered by points, people can change it if they wanted to, i just liked my version
-
Im glad you understood lol
-
echo "</table>"; you forgot to add them in at end of functions you did at the fed function but you misted them out at mail and forum function lol other words } echo "</table>"; } function forum_banned() {
-
echo "</table>"; you forgot to add them in at end of functions you did at the fed function but you misted them out at mail and forum function lol
-
lol no problem, you have misted out a few minor issues well it effected it on my game so i edited and works depending what your header.php is you might be need my one or pudda's one heres mine: <?php include_once (DIRNAME(__FILE__) . '/globals.php'); $_GET['action'] = isset($_GET['action']) && ctype_alpha($_GET['action']) ? trim($_GET['action']) : 'index'; switch($_GET['action']) { case 'banned': fedded(); break; case 'forum': forum_banned(); break; case 'mails': mail_banned(); break; default: index(); break; } if (!in_array($_GET['action'], array('banned','forum','mails','index'))) { echo "[b]Invalid Action.[/b]"; $h->endpage(); exit; } if(!function_exists('format')) { function format($str) { return is_numeric($str) ? number_format($str) : nl2br(stripslashes($str)); } } function index() { print "<h3>Jail Management</h3> "; global $db; $feddedusers = $db->fetch_single($db->query("SELECT COUNT(`userid`) FROM users WHERE (fedjail = 1)")); $mailbanned = $db->fetch_single($db->query("SELECT COUNT(`userid`) FROM users WHERE (mailban > 0)")); $forumbanned = $db->fetch_single($db->query("SELECT COUNT(`userid`) FROM users WHERE (forumban > 0)")); echo "<table class='table' width='50%'>"; echo "<tr>"; echo "<th>[url='?action=banned']Federal Jail[/url]</th>"; echo "<td style='text-align:center;'>".$feddedusers."</a></td>"; echo "</tr>"; echo "<tr>"; echo "<th>[url='?action=mails']Mail Banned[/url]</th>"; echo "<td style='text-align:center;'>".$mailbanned."</td>"; echo "</tr>"; echo "<tr>"; echo "<th>[url='?action=forum']Forum Banned[/url]</th>"; echo "<td style='text-align:center;'>".$forumbanned."</td>"; echo "</tr>"; echo "</table>"; } function fedded() { global $db,$r,$h; echo ' <h3 style="text-align: left; text-decoration: underline;">Ferderal Jail</h3> <table border="1" width="100%" class="table" cellspacing="0" cellpadding="2"> <tr style="text-align:center;"> <th>Who</th> <th>Time Left</th> <th>Reason</th> <th>Jailer</th> </tr> '; $Find = $db->query("SELECT f.fed_userid, f.fed_days, f.fed_reason, u.username, " . "uu.userid AS fed_jailer_id, uu.username AS fed_jailer " . "FROM fedjail f " . "LEFT JOIN users u ON f.fed_userid=u.userid " . "LEFT JOIN users uu ON f.fed_jailedby = uu.userid " . "WHERE f.fed_days > 0 ORDER BY f.fed_days ASC"); while($r = $db->fetch_row($Find)) { echo ' <tr style="text-align:center;"> <td>[url="viewuser.php?u='.$r['fed_userid'].'"]'.format(htmlspecialchars($r['username'])).'[/url]</td> <td>'.format($r['fed_days']).' Days</td> <td>'.stripslashes($r['fed_reason']).'</td> <td>[url="viewuser.php?u='.$r['fed_jailer_id'].'"][b]'.stripslashes($r['fed_jailer']).'[/b][/url] ['.$r['fed_jailer_id'].']</td> </tr> '; } echo '</table>'; } function mail_banned() { global $db,$r,$h; print '<h3 style="text-align: left; text-decoration: underline;">MailBanned Users</h3> <table border="1" width="100%" class="table" cellspacing="0" cellpadding="2"> <tr style="text-align:center;"> <th>Who</th> <th>Time Left</th> <th>Reason</th> </tr> '; $q=$db->query("SELECT `userid`,`username`,`mailban`,`mb_reason` FROM `users` WHERE `mailban` > 0 ORDER BY `mailban` DESC"); while($r=$db->fetch_row($q)) { print " <tr> <td>[url='viewuser.php?u=".$r[']".format(htmlspecialchars($r['username']))."[/url]</td> <td>".format(htmlspecialchars($r['mailban']))."</td> <td>".format(htmlspecialchars($r['mb_reason']))."</td> </tr>"; } echo "</table>"; } function forum_banned() { global $db,$r,$h; print '<h3 style="text-align: left; text-decoration: underline;">Forumbanned Users</h3> <table border="1" width="100%" class="table" cellspacing="0" cellpadding="2"> <tr style="text-align:center;"> <th>Who</th> <th>Time Left</th> <th>Reason</th> </tr> '; $q=$db->query("SELECT `userid`,`username`,`forumban`,`fb_reason` FROM users WHERE `forumban` > 0 ORDER BY `forumban` DESC"); while($r=$db->fetch_row($q)) { print "<tr> <td>[url='viewuser.php?u=".$r[']".format(htmlspecialchars($r['username']))."[/url]</td> <td>".format(htmlspecialchars($r['forumban']))."</td> <td>".format(htmlspecialchars($r['fb_reason']))."</td></tr>"; } echo "</table>"; } $h->endpage(); ?>
-
Spot On Mate, Not Bad For Someone that dont like GRPG lol Thanks for the little mod, il be using it now often please reply on my mods please IT WOULD BE EVEN BETTER IF YOU POSTED IT IN THE MC CODES NOT GRPG LOL
-
you said go on viewuser.php and find etc... its profiles.php lol and great mod
-
[Mod] Search For Points [Mod] save that page and now open classes.php and paste in the following code: $this->searchuptown = $worked['searchuptown']; and dont forget to add the link to your city.php so members and go on it, that should be it, enjoy! P.S --> you can change the turns and how many you collect on there look for: for ($i=1; $i<=10; $i++) that 10 means how many searches you can do on that page, if you change it to 20 you will have to edit your users sql [mysql]ALTER TABLE `grpgusers` CHANGE `searchuptown` `searchuptown` INT( 3 ) NOT NULL DEFAULT '20' [/mysql] like that and the other part is changing how many points you get look for: $randnum = rand(0,2); you can change the 2 to a different number for example 5 this will change the search find more points 0-5 chances basicly and you dont have to change the SQL for that bit Enjoy
-
Add this SQL to the database: [mysql]ALTER TABLE `grpgusers` ADD `searchuptown` int(3) NOT NULL default '10', [/mysql] make a new file called uptown.php, paste the following code in and save: <?php include 'header.php'; echo '<tr><td class="contenthead">Search Uptown</td></tr>'; echo '<tr><td class="contentcontent">'; if ($user_class->searchuptown != 0) { for ($i=1; $i<=10; $i++) { echo $i.".) "; $randnum = rand(0,2); if ($randnum == 0){ echo "You didn't find anything."; } else { echo "You found ".$randnum."!"; } $total+= $randnum; echo " "; } echo " You found a total of ".$total." points by searching uptown!"; $newpoints = $user_class->points + $total; $result = mysql_query("UPDATE `grpgusers` SET `points` = '".$newpoints."', `searchuptown` = '0' WHERE `id`='".$user_class->id."'"); } else { echo "You have already searched down town as much as you can today."; } echo '</td></tr>'; include 'footer.php'; ?> open up rollover.php and find: $result2 = mysql_query("UPDATE `grpgusers` SET `money` = '".$newmoney."', `rmdays` = '".$newrmdays."', `bank` = '".$newbank."', `searchdowntown` = '100' WHERE `username` = '".$username."'"); and replace with: $result2 = mysql_query("UPDATE `grpgusers` SET `money` = '".$newmoney."', `rmdays` = '".$newrmdays."', `bank` = '".$newbank."', `searchdowntown` = '100', `searchuptown` = '10' WHERE `username` = '".$username."'");
-
Because i guess he was not good as he was ment to be, i bet if you give me like a month and i could made a engine like this lol never mind, looks like we are the ones that are making mods for this engine
-
[Mod] Voting Page [Mod] Dont forget to add the link for the vote page in header Now open up rollover.php ( your crons page ) and find: $result = mysql_query("SELECT * FROM `grpgusers`"); while($line = mysql_fetch_assoc($result)) { $updates_user = new User($line['id']); $newmoney = $updates_user->money; $username = $updates_user->username; $newrmdays = $updates_user->rmdays - 1; $newrmdays = ($newrmdays < 0) ? 0 : $newrmdays; if($newrmdays > 1) { $interest = .04; } else { $interest = .02; } and replace with $result = mysql_query("SELECT * FROM `grpgusers`"); while($line = mysql_fetch_assoc($result)) { $updates_user = new User($line['id']); $newmoney = $updates_user->money; $username = $updates_user->username; $newvote = $updates_user->vote + 1; $newrmdays = $updates_user->rmdays - 1; $newrmdays = ($newrmdays < 0) ? 0 : $newrmdays; if($newrmdays > 1) { $interest = .04; } else { $interest = .02; } and your done
-
Run this SQL through your database: [mysql] ALTER TABLE `grpgusers` ADD `vote` INT( 11 ) NOT NULL DEFAULT '1' [/mysql] Now open up classes.php and paste in the page: $this->vote = $worked['vote']; now save and close now crate a new file call vote.php and copy the following codes and paste and save the page: <?php include 'header.php'; if ($_GET['spend'] == "energy"){ if($user_class->vote > 0) { $newvote = $user_class->vote - 1; $result = mysql_query("UPDATE `grpgusers` SET `vote` = '".$user_class->maxenergy."', `vote`='".$newvote."' WHERE `id`='".$_SESSION['id']."'"); echo Message("You spent a vote and refilled your energy."); } else { echo Message("You don't have enough vote, silly buns."); } } ?> <tr><td class="contenthead">Vote Shop</td></tr> <tr><td class="contentcontent"> Welcome to the Vote Shop, here you can spend your Vote on various things.</td></tr> <tr><td class="contentcontent"> <table> <tr> <td>[url='vote.php?spend=energy']Vote Energy[/url]</td> <td> - 1 Vote</td> </tr> </table> </td></tr> <?php include 'footer.php'; ?>
-
Well you know i do, and ive made a few mods that people can use, maybe one day GRPG will be big like mc codes but i hope that happens, then it stops all the noobs from wanting a game,
-
Thanks and which bit are you stuck on? that one was a tricky sticky one but i managed it ok, just when you remembering it when you tested it, lool
-
should be $this->profileSIG = $worked['profileSIG'];$this->profilemusic = $worked['profilemusic'];