Jump to content
MakeWebGames

shrek1609

Members
  • Posts

    310
  • Joined

  • Last visited

    Never

Everything posted by shrek1609

  1. Re: Gang war surrender error Thank you that was doing my head in trying to work it out :)
  2. Re: Help please Hi could you give me an example please of how to get it to just allow letters, numbers, spaces and underscore, and you'll be fine. thanks :)
  3. On Mccodes i'm having problems if somebody has the user name with a ' in it for example Don't hit me... It causes a mysql error when they are attacking someone forum entries etc :) Is there anyway round this please :)
  4. Re: V2 Escape from Jail mod   here you go...
  5. Re: IP Banning tool [V1] + [V2]     Go through the code mate and change admin.php to staff.php :)
  6. Re: IP Banning tool [V1] + [V2] i spent a hour trying to get this to work kept saying the ipbans folder couldnt be found :( Kept checking chmods permissions and the code couldnt work out what was wrong... After a hour realised i was logged into my wrong ftp account and had added the ipbans folder to one of my other websites :lol: but anyway fantastic mod thanks very much already come in very handy :)
  7. Re: Quick help please The last two posts have gone totally over my head :( I dont suppose you could simplify what i need to do for an idiot could you :) thanks
  8. Re: Quick help please thanks for that but didn't work i'm afraid only changed my name for me viewing it only :(
  9. Re: Cant get will bar to go up Go into your mysql database and check the value of the maxwill in users table... I had this problem and i had made a mistake on coding and had made it where it was decreasing the maxwill instead of the will and maxwill ended up as 0 If it is that just run a sql query Update users SET maxwill=100
  10. Re: Urgent help needed please its ok scrap previous post :-D i've cheated and moved the forums around so first forum is just an announcements forum and thats fine as its only members who don't get a new topic link, staff do :)
  11. Re: Quick help please thanks for that will give it a try :)
  12. I've set my forums up and all is fine barring the first forum there is no option for a new topic this is on the first forum only... anybody help with this urgently please :)
  13. Re: Quick help please its not an error code that comes up what happens is when a member tries to send a message to say me the font code over flows the "to" box in the message and errors it
  14. Re: Quick help please Thanks for the reply was looking for the colour change to be throughout the game ie mainmenu, viewuser, userlists, halloffame, forums etc
  15. Have you any idea how i can set coloured names for staff members... Wrapping user name in font tags works BUT it buggers up the mailbox they can't receive messages with the name wrapped in font tags :(
  16. Re: V2 Escape from Jail mod Thank you will modify my post now and my code :)
  17. This is my first proper mod i have coded so please be kind :) Users have the option of attempting to break out of jail, costs 5 brave and can only be attempted once every five minutes... Failure to break out results in a longer prison sentence :) Create a file called jailbreak.php   <?php include("globals.php"); if($ir['jail']==0) { die("You arent in jail!"); } if($ir['break']==0) { die("you already attempted a Prison Break within the last 5 minutes, please try again later"); } if($ir['brave'] < 5) { die("You don't have enough Brave to attempt this!"); } if(rand(1,100) <= 20) { print "You used the old file in a cake trick and escaped out of the County Jail."; mysql_query("UPDATE users SET jail=0 WHERE userid=$userid",$c); mysql_query("UPDATE users SET break=0 WHERE userid=$userid",$c); mysql_query("UPDATE users SET brave=brave-5 WHERE userid=$userid",$c); } else { $jailtime=(int) rand(1,20); print "You were caught attempting to break out of the City Jail. The Guards haul you back and added $jailtime minutes to your jail sentence."; mysql_query("UPDATE users SET jail=jail+$jailtime WHERE userid=$userid", $c); mysql_query("UPDATE users SET break=0 WHERE userid=$userid",$c); mysql_query("UPDATE users SET brave=brave-5 WHERE userid=$userid",$c); mysql_query("UPDATE users SET jailreason='Caught attempting to escape' WHERE userid=$userid", $c); } ?>   Mysql code ALTER TABLE `users` ADD `break` INT( 11 ) NOT NULL DEFAULT '1';   Add to cron_fivemins.php   $db->query("UPDATE users SET break=1");   add to jail.php   <h5>[b]<font color='red'>Attempt to Escape from Jail!!! (5 Brave Req) </font>[url='jailbreak.php']<font color='green'>[do]</font>[/url][/b]</h5>   Please post what you think and remember this is my first mod :) p.s. pretty sure i dont need the session_start(); if someone would care to confirm i don't
  18. Does anyone know if its possible to implement bbcode into messages on V2 please or if anyone knows how to would be very grateful :)
  19. Re: [mccode] Streets for v2.0 Hi thanks for replying i've got it sussed now got some help with it... no it was a random item so i couldnt just put the name of item in :(
  20. Re: [mccode] Streets for v2.0 Can you help please :-D I'm trying to get it to say the name of the item found when you search the streets... So far i have added this...   if ($chance == 9) { $itemidexplore = rand(2,60); $find=$db->query("SELECT itmname FROM items WHERE itmid=$itemidexplore",$c); print "You found a [b] $find [/b]";   It then says You found a Resource id #14 I know its something simple i'm doing wrong but please help... p.s. I am trying to learn this stuff :wink:
  21. Re: V2 crimes formular need tutorial This is how i've got it to work using percentages :-D ((LEVEL*50)/LEVEL) I've made mine a starting percentage that slowly gets a higer percentage as they gain levels... ((LEVEL*90)/LEVEL)+(LEVEL*0.25)
  22. Re: Please help with time in header sorted now i've added a javascript clock instead of the page refresh clock included with script :-D
  23. I'm trying to add the time in header.php below the title logo...   print <<<OUT [img=title.png] <table width='100%' class='table' valign='top'><tr><td width=50%>echo date ('F j, Y')." ". date('g:i:s a')); </td><td width=50%><a href='voting.php'>[b]Vote For Rewards[/b]<font color='red'>[b] | [/b]</font><a href='donator.php'>[b]Upgrade Account[/b]<font color='red'>[b] | [/b]</font></td></tr></table> <table width="100%" class='tab' cellpadding="0" cellspacing="0"> <tr> <td width="20%" valign="top">   if i add this   echo date ('F j, Y')." ". date('g:i:s a'));   above   print <<<OUT   The the clock displays... add it inside the table then it doesn't... could anyone help me with this please i am sure its something simple thanks
  24. Re: Tutorial: v1 - v2 Conversion Thank you just finished my first V1 - V2 conversion !!! and it works :-o thanks again :-D
  25. Go easy this is my first mod i've done and considering a couple of days ago i knew nothing ? Its an upgraded hall of fame... Which now has all user names as clickable links to the users profile and now shows if users are online or offline... <?php include "globals.php"; $filters=array( 'nodon' => 'AND donatordays=0', 'don' => 'AND donatordays > 0', 'all' => ''); $filter=(isset($filters[$_GET['filter']])) ? $_GET['filter'] : 'all'; $myf=$filters[$filter]; $bt1=($filter=="nodon") ? "[b]" : ""; $bet1=($filter=="nodon") ? "[/b]" : ""; $bt2=($filter=="don") ? "[b]" : ""; $bet2=($filter=="don") ? "[/b]" : ""; $bt3=($filter=="all") ? "[b]" : ""; $bet3=($filter=="all") ? "[/b]" : ""; print" <table width='75%' cellspacing='1' class='head'><tr><td><h3>Hall of Fame</h2></td></tr></table> Filter: [$bt1[url='halloffame.php?action={$_GET[']Non-Donators[/url]$bet1 | $bt2[url='halloffame.php?action={$_GET[']Donators[/url]$bet2 | $bt3[url='halloffame.php?action={$_GET[']All Users[/url]$bet3] <table width=75% cellspacing=1 class='table'> <tr> <td>[url='halloffame.php?action=level&filter={$filter}']LEVEL[/url]</td> <td>[url='halloffame.php?action=money&filter={$filter}']MONEY[/url]</td> <td>[url='halloffame.php?action=respect&filter={$filter}']RESPECT[/url]</td> <td>[url='halloffame.php?action=crystals&filter={$filter}']CRYSTALS[/url]</td> <td>[url='halloffame.php?action=total&filter={$filter}']TOTAL STATS[/url]</td> </tr> <tr> <td>[url='halloffame.php?action=strength&filter={$filter}']STRENGTH[/url]</td> <td>[url='halloffame.php?action=agility&filter={$filter}']AGILITY[/url]</td> <td>[url='halloffame.php?action=guard&filter={$filter}']GUARD[/url]</td> <td>[url='halloffame.php?action=labour&filter={$filter}']LABOUR[/url]</td> <td>[url='halloffame.php?action=iq&filter={$filter}']IQ[/url]</td> </tr> </table>"; switch($_GET['action']) { case "level": hof_level(); break; case "money": hof_money(); break; case "crystals": hof_crystals(); break; case "respect": hof_respect(); break; case "total": hof_total(); break; case "strength": hof_strength(); break; case "agility": hof_agility(); break; case "guard": hof_guard(); break; case "labour": hof_labour(); break; case "iq": hof_iq(); break; } function hof_level() { global $db,$ir,$c,$userid, $myf; print " Showing the 20 users with the highest levels <table width=75% cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> <th>Level</th><th>Status</th> </tr>"; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 0 $myf ORDER BY level DESC,userid ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['userid'] == $userid) { $t="[b]";$et="[/b]"; } else { $t="";$et=""; } { if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; } print "<tr> <td>$t$p$et</td> <td>$t[url='viewuser.php?u={$r[']{$r['gangPREF']} {$r['username']}[/url] [{$r['userid']}]$et</td> <td>$t{$r['level']}$et</td><td>$on</td> </tr>"; } } print "</table>"; } function hof_money() { global $db,$ir,$c,$userid, $myf; print "Showing the 20 users with the highest amount of money <table width=75% cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> <th>Money</th><th>Status</th> </tr>"; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 0 $myf ORDER BY money DESC,userid ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['userid'] == $userid) { $t="[b]";$et="[/b]"; } else { $t="";$et=""; } { if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; } print "<tr> <td>$t$p$et</td> <td>$t[url='viewuser.php?u={$r[']{$r['gangPREF']} {$r['username']}[/url] [{$r['userid']}]$et</td> <td>$t\$".money_formatter($r['money'],'')."$et</td> <td>$on</td></tr>"; } } print "</table>"; } function hof_crystals() { global $db,$ir,$c,$userid, $myf; print "Showing the 20 users with the highest amount of crystals <table width=75% cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> <th>Crystals</th><th>Status</th> </tr>"; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 0 $myf ORDER BY crystals DESC,userid ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['userid'] == $userid) { $t="[b]";$et="[/b]"; } else { $t="";$et=""; }{ if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; } print "<tr> <td>$t$p$et</td> <td>$t[url='viewuser.php?u={$r[']{$r['gangPREF']} {$r['username']}[/url] [{$r['userid']}]$et</td> <td>$t".money_formatter($r['crystals'],'')."$et</td><td>$on</td> </tr>"; } } print "</table>"; } function hof_respect() { global $db,$ir,$c,$userid; print "Showing the 20 gangs with the highest amount of respect <table width=75% cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>Gang</th> <th>Respect</th> </tr>"; $q=$db->query("SELECT * FROM gangs ORDER BY gangRESPECT DESC,gangID ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['gangID'] == $ir['gang']) { $t="[b]";$et="[/b]"; } else { $t="";$et=""; } print "<tr> <td>$t$p$et</td> <td>$t{$r['gangNAME']} [{$r['gangID']}]$et</td> <td>$t".money_formatter($r['gangRESPECT'],'')."$et</td> </tr>"; } print "</table>"; } function hof_total() { global $db,$ir,$c,$userid, $myf; print "Showing the 20 users with the highest total stats <table width=75% cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th><th>Status</th> </tr>"; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 0 $myf ORDER BY (us.strength+us.agility+us.guard+us.labour+us.IQ) DESC,u.userid ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['userid'] == $ir['userid']) { $t="[b]";$et="[/b]"; } else { $t="";$et=""; } { if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; } print "<tr> <td>$t$p$et</td> <td>$t[url='viewuser.php?u={$r[']{$r['gangPREF']} {$r['username']}[/url] [{$r['userid']}]$et</td><td>$on</td> </tr>"; } } print "</table>"; } function hof_strength() { global $db,$ir,$c,$userid, $myf; print "Showing the 20 users with the highest strength <table width=75% cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th><th>Status</td> </tr>"; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 0 $myf ORDER BY us.strength DESC,u.userid ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['userid'] == $ir['userid']) { $t="[b]";$et="[/b]"; } else { $t="";$et=""; } { if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; } print "<tr> <td>$t$p$et</td> <td>$t[url='viewuser.php?u={$r[']{$r['gangPREF']} {$r['username']}[/url] [{$r['userid']}]$et</td><td>$on</td> </tr>"; } } print "</table>"; } function hof_agility() { global $db,$ir,$c,$userid, $myf; print "Showing the 20 users with the highest agility <table width=75% cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th><th>Status</th> </tr>"; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 0 $myf ORDER BY us.agility DESC,u.userid ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['userid'] == $ir['userid']) { $t="[b]";$et="[/b]"; } else { $t="";$et=""; } { if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; } print "<tr> <td>$t$p$et</td> <td>$t[url='viewuser.php?u={$r[']{$r['gangPREF']} {$r['username']}[/url] [{$r['userid']}]$et</td><td>$on</td> </tr>"; } } print "</table>"; } function hof_guard() { global $db,$ir,$c,$userid, $myf; print "Showing the 20 users with the highest guard <table width=75% cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th><th>Status</th> </tr>"; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 0 $myf ORDER BY us.guard DESC,u.userid ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['userid'] == $ir['userid']) { $t="[b]";$et="[/b]"; } else { $t="";$et=""; } { if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; } print "<tr> <td>$t$p$et</td> <td>$t[url='viewuser.php?u={$r[']{$r['gangPREF']} {$r['username']}[/url] [{$r['userid']}]$et</td><td>$on</td> </tr>"; } } print "</table>"; } function hof_labour() { global $db,$ir,$c,$userid, $myf; print "Showing the 20 users with the highest labour <table width=75% cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th><th>Status</th> </tr>"; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 0 $myf ORDER BY us.labour DESC,u.userid ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['userid'] == $ir['userid']) { $t="[b]";$et="[/b]"; } else { $t="";$et=""; } { if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; } print "<tr> <td>$t$p$et</td> <td>$t[url='viewuser.php?u={$r[']{$r['gangPREF']} {$r['username']}[/url] [{$r['userid']}]$et</td><td>$on</td> </tr>"; } } print "</table>"; } function hof_iq() { global $db,$ir,$c,$userid, $myf; print "Showing the 20 users with the highest IQ <table width=75% cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th><th>Status</th> </tr>"; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 0 $myf ORDER BY us.IQ DESC,u.userid ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['userid'] == $ir['userid']) { $t="[b]";$et="[/b]"; } else { $t="";$et=""; } { if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; } print "<tr> <td>$t$p$et</td> <td>$t[url='viewuser.php?u={$r[']{$r['gangPREF']} {$r['username']}[/url] [{$r['userid']}]$et</td><td>$on</td> </tr>"; } } print "</table>"; } $h->endpage(); ?>
×
×
  • Create New...