Jump to content
MakeWebGames

Recommended Posts

Posted

Hi i was wondering if someone could make a hall of fame to show the following:

level

busts

top gangs

most wanted (basically most crimes done)

highest rank (uses the player ranks mod on here)

most hated (most enemies)

most liked(most friends)

faction kills (not too bothered if you cant do this one)

i would like it to show the top 20 players of each section thanks!

Posted

its not too difficult to add more features to your hall of fame...ive added quite a few new additions to mine..ill show u a quick example below..

first you make a link to the new info..an example would be :

 

[url='halloffame.php?action=crimes&filter={$filter}']Crimes[/url]

 

notice the action=crimes part..this is important because it defines the function you will be using..

next find :

 

switch($_GET['action']) 
{

 

this is where they define the functions for each listing in the HOF...you will need to add a new switch.

an example would be :

 

case "crimes":  ## this is the name defined in the link 
hof_crimes();   ## this is the function it defines
break;

 

now last you have to add the actual function, an example would be :

function hof_crimes()
{
global $db,$ir,$c,$userid, $myf;
print "Showing the 20 users with the most Crimes Passed

<table width=75% cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> <th>Crimes Passed</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 u.crimesd 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=""; }
print "<tr> <td>$t$p$et</td> <td>[$t{$r['gangPREF']}] {$r['username']} [{$r['userid']}]$et</td> <td> {$r['crimesd']} </td> </tr>";
}
print "</table>";
}

 

$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 u.crimesd DESC,u.userid ASC LIMIT 20");

 

this is the query that gets the HOF info you will be using :

ORDER BY u.crimesd ## crimesd is the data i added to the users table to store how many crimes someone has passed..you will need to edit this to what ever data you will be using..

 

you can use that as a layout to add new data to the HOF just change the required info...

also for the above function to work you would need to add a few new fields to your users table..

and you would also need to edit the docrime.php so that when ever someone does a crime it updates the crimes data in the users table...

so dont load that in thinking it will work :P...its purely an example and is to be used as a layout :P...

also im not the best of teachers, so if its unclear to you sorry :P

but I hope that helps you

cheers

Posted

I cant do it like that tho cos mines different :( here it is:

 

<?php
/*
-- Created By Kyle
-- Price: FREE;
-- Keep notice.
*/

//Pop ups then closed
session_start();
$close_window = '<script LANGUAGE="JavaScript">
function closePg(){
window.close();
return true;
}
</script>
<body onLoad="return closePg()"></body>';
$display_o = "Session installed now closing.

".$close_window;
if($_GET['filter'] == 1)
{
  $_SESSION['filter'] = "ASC";
  echo $display_o;
}
else if($_GET['filter'] == 2)
{
  $_SESSION['filter'] = "DESC";
  echo $display_o;
}
if($_GET['don'] == 1)
{
  $_SESSION['donator'] = "AND donatordays=0";
  echo $display_o;
}
else if($_GET['don'] == 2)
{
  $_SESSION['donator'] = "AND donatordays>0";
  echo $display_o;
}
else if($_GET['don'] == 3)
{
  $_SESSION['donator'] = "";
  echo $display_o;
}

//if not filter & donator
if(!$_SESSION['filter'])
{
  $_SESSION['filter'] = "DESC";
}
if(!$_SESSION['donator'])
{
  $_SESSION['donator'] = "";
}

include("globals.php");

//SETTINGS//
$header_image = "http://rapid-riot.com/images/header.jpg"; //Pic to display in <th>
$border = 0; //Border on your game
$td_align = "center"; //Align the <td>
$filter = $_SESSION['filter']; //Filter - leave as is for both hall of shame and hall of fame built in one.
$donator = $_SESSION['donator']; //Donator - leave as is for all donators non donators all.


//SECURITY//
if($_GET['display'])
{
  $allowed = array
  (
    	level,
    	crystals,

    	bails,
    	Referrals,
    	busts,
    	hof_crimes,
    	friend_count,
    	enemy_count,
    	_blank,
  );
  if(!in_array($_GET['display'],$allowed))
  {
 	echo 'Input not allowed.';
 	$h->endpage();
 	exit;
  }
}
$filter_asc = "<a href=\"javascript:void(0)\" onclick=\"window.open('?filter=1','Pop Up','width=1, height=1'); return false;\">Ascending Order</a>";
$filter_desc = "<a href=\"javascript:void(0)\" onclick=\"window.open('?filter=2','Pop Up','width=1, height=1'); return false;\">Descending Order</a>";
$donator_non = "<a href=\"javascript:void(0)\" onclick=\"window.open('?don=1','Pop Up','width=1, height=1'); return false;\">Non Donators</a>";
$donator_all = "<a href=\"javascript:void(0)\" onclick=\"window.open('?don=3','Pop Up','width=1, height=1'); return false;\">All Users</a>";
$donator_onl = "<a href=\"javascript:void(0)\" onclick=\"window.open('?don=2','Pop Up','width=1, height=1'); return false;\">Only Donators</a>";
echo '
<h1>Hall Of Fame</h1>
[b]Filter:[/b] '.$filter_asc.' | '.$filter_desc.'

[b]Donator\'s: '.$donator_non.' | '.$donator_all.' | '.$donator_onl.'


<table class="table" width="75%" border="'.$border.'">
  <tr>
 	<th>[url="?display=level&x=1"]LEVEL[/url]</th>


 	<th>[url="?display=busts&x=1"]BUSTS[/url]</th>
  </tr>
  <tr>
 	<th>[url="?display=bails&x=1"]BAILS[/url]</th>
 	<th>[url="?display=friend_count&x=1&dj=Most Liked"]MOST LIKED[/url]</th>
 	<th>[url="?display=enemy_count&x=1&dj=Most Hated"]MOST HATED[/url]</th>
 	<th>[url="?display=_blank&x=2"]HIGHEST HOUSE[/url]</th>
 	<th>[url="?display=_blank&x=3"]TOP GANG[/url]</th>
  </tr>
</table>';
if($_GET['x'] == 1)
{
  if(!$_GET['dj'])
  {
 	$var = ucfirst(htmlspecialchars($_GET['display']));
  }
  else
  {
 	$var = $_GET['dj'];
  }
  echo '

Showing user\'s order by '.$var.' '.$filter.'


  <table class="table" width="75%" border="'.$border.'">
 	<tr>
    	<th>Username</th>
    	<th>'.$var.'</th>
 	</tr>
 	<tr><!- Kyles Hall of fame Enhanced -!>';
    	$display = htmlspecialchars($_GET['display']);
    	$fetch = mysql_query("SELECT * FROM users WHERE user_level != 0 ".$donator." ORDER BY ".$display." ".$filter.",userid ASC LIMIT 20");
    	while($t = mysql_fetch_assoc($fetch))
    	{
       	if($display == "money")
       	{
          	$t[$display] = money_formatter($t['money']);
       	}
       	else if($display == "crystals")
       	{
          	$t[$display] = number_format($t['crystals']);
       	}
       	if($ir['userid'] == $t['userid'])
       	{
              	$t['username'] = "[b]".$t['username']."[/b]";
       	}
       	echo '
    	<td align="'.$td_align.'">[url="viewuser.php?u='.$t['userid'].'"]'.$t['username'].'[/url] ['.$t['userid'].']</a></td>
    	<td align="'.$td_align.'">'.$t[$display].'</td>
 	<tr>';
    	}
    	echo '
 	</tr>
  </table>';
}
if($_GET['x'] == 2)
{
  echo '
Showing user\'s order by Highest House in '.$filter.'


  <table class="table" width="75%" border="'.$border.'">
 	<tr>
    	<th>Username</th>
    	<th>House</th>
 	</tr>
 	<tr><!- Kyles Hall of fame Enhanced -!>';
    	$fetch = mysql_query("SELECT * FROM users WHERE user_level!=0 ".$donator." ORDER BY maxwill ".$filter.",userid ASC LIMIT 20") or die(mysql_error());
    	while($t = mysql_fetch_assoc($fetch))
    	{
       	$house = mysql_fetch_assoc(mysql_query("SELECT * FROM houses WHERE hWILL=".$t['maxwill'])) or die(mysql_error());
       	echo '
    	<td align="'.$td_align.'">[url="viewuser.php?u='.$t['userid'].'"]'.$t['username'].'[/url] ['.$t['userid'].']</a></td>
    	<td align="'.$td_align.'">'.$house['hNAME'].'</td>
 	<tr>';
    	}
    	echo '
 	</tr>
  </table>';
}
if($_GET['x'] == 3)
{
  echo '
Showing gang\'s order by highest respect in '.$filter.'


  <table class="table" width="75%" border="'.$border.'">
 	<tr>
    	<th>Gang Name</th>
    	<th>Gang Respect</th>
 	</tr>
 	<tr><!- Kyles Hall of fame Enhanced -!>';
    	$fetch = mysql_query("SELECT * FROM gangs ORDER BY gangRESPECT ".$filter." LIMIT 20") or die(mysql_error());
    	while($t = mysql_fetch_assoc($fetch))
    	{
       	echo '
    	<td align="'.$td_align.'">[url="gangs.php?action=view&ID='.$t['gangID'].'"]'.$t['gangNAME'].'[/url]</td>
    	<td align="'.$td_align.'">'.$t['gangRESPECT'].'</td>
 	<tr>';
    	}
    	echo '
 	</tr>
  </table>';
}
if($_GET['x'] == 4)
{
  $var = ucfirst(htmlspecialchars($_GET['display']));
  echo '
Showing user\'s order by '.$var.' stats in '.$filter.'


  <table class="table" width="75%" border="'.$border.'">
 	<tr>
    	<th>Username</th>
 	</tr>
 	<tr>';
    	if($_GET['display'] == "total")
    	{
       	$fetch = mysql_query("SELECT * FROM userstats ORDER BY (strength+agility+guard+labour+IQ) ".$filter." LIMIT 20") or die(mysql_error());
    	}
    	else
    	{
       	$fetch = mysql_query("SELECT * FROM userstats ORDER BY ".$_GET['display']." ".$filter." LIMIT 20") or die(mysql_error());
    	}
    	while($t = mysql_fetch_assoc($fetch))
    	{
       	$user = mysql_fetch_assoc(mysql_query("SELECT * FROM users WHERE userid=".$t['userid'])) or die(mysql_error());
       	echo '
    	<td align="'.$td_align.'">[url="viewuser.php?u='.$user['userid'].'"]'.$user['username'].'[/url]</td>
 	<tr>';
    	}
    	echo '
 	</tr>
  </table>';
}
function hof_crimes()
{
global $ir,$c,$userid;
print "Showing the 20 users with the highest amount of crimes

<table width=75%><tr style='background: gray'> <th>Pos</th> <th>User</th> <th>Crimes Done</th> </tr>";
$q=mysql_query("SELECT u.*,g.* FROM users u LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 0 ORDER BY crimes DESC,userid ASC LIMIT 20", $c);
$p=0;
while($r=mysql_fetch_array($q))
{
$p++;
if($r['userid'] == $userid) { $t="[b]";$et="[/b]"; } else { $t="";$et=""; }
print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td> <td>$t".money_formatter($r['crimes'],'')."$et</td> </tr>";
}
print "</table>";
}
$h->endpage();
?>
Posted
not sure what your wanting out of that ranks mod, but i have one very near that rank mod your talking about

[mccode v2] Ranks

if thats the mod your talking about here PM me and i can show you what i have.

Yes thats the mod i use but i need a hall of fame for it to show the highest ranks
Posted

I modified that ranks mod to work for me, i have those as the users job ranks. and those are in the HOF to see.

i also added job rank pics to the jobs page and on the users profile. though i dont have the pics showing in this HOF.

if it helps you get to what your after you can have a look at this HOF using a standard V2 halloffame.php

 

[mysql]<?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") ? "" : "";

$bet1=($filter=="nodon") ? "" : "";

$bt2=($filter=="don") ? "" : "";

$bet2=($filter=="don") ? "" : "";

$bt3=($filter=="all") ? "" : "";

$bet3=($filter=="all") ? "" : "";

print "<h3>Hall Of Fame</h3><hr />

Filter: [$bt1Non-Donators$bet1 | $bt2Donators$bet2 | $bt3All Users$bet3]<hr />

<table width=90% border=1 cellspacing=1 class='table'>

<tr>

<td>LEVEL</td>

<td>MONEY</td>

<td>RESPECT</td>

<td>CRYSTALS</td>

<td>TOTAL STATS</td>

<td>RANK</td>//////////////////////////add the link for the ranks selection

</tr>

<tr> <td>STRENGTH</td> <td>AGILITY</td> <td>GUARD</td> <td>LABOUR</td> <td>IQ</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;

case "jobrank"://////////////case for the ranks

hof_jobrank();

break;

}

function hof_level()

{

global $db,$ir,$c,$userid, $myf;

print "Showing the 20 users with the highest levels

<table width=75% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> <th>Level</th> </tr>";

$q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 2 $myf ORDER BY level DESC,userid ASC LIMIT 20");

$p=0;

while($r=$db->fetch_row($q))

{

$p++;

if($r['userid'] == $userid) { $t="";$et=""; } else { $t="";$et=""; }

print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td> <td>$t{$r['level']}$et</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% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> <th>Money</th> </tr>";

$q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 2 $myf ORDER BY money DESC,userid ASC LIMIT 20");

$p=0;

while($r=$db->fetch_row($q))

{

$p++;

if($r['userid'] == $userid) { $t="";$et=""; } else { $t="";$et=""; }

print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td> <td>$t\$".money_formatter($r['money'],'')."$et</td> </tr>";

}

print "</table>";

}

function hof_crystals()

{

global $db,$ir,$c,$userid, $myf;

print "Showing the 20 users with the highest amount of rations

<table width=75% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> <th>Rations</th> </tr>";

$q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 2 $myf ORDER BY crystals DESC,userid ASC LIMIT 20");

$p=0;

while($r=$db->fetch_row($q))

{

$p++;

if($r['userid'] == $userid) { $t="";$et=""; } else { $t="";$et=""; }

print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td> <td>$t".money_formatter($r['crystals'],'')."$et</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% border=1 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="";$et=""; } 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% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</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 != 2 $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="";$et=""; } else { $t="";$et=""; }

print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</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% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</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 != 2 $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="";$et=""; } else { $t="";$et=""; }

print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</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% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</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 != 2 $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="";$et=""; } else { $t="";$et=""; }

print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</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% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</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 != 2 $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="";$et=""; } else { $t="";$et=""; }

print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</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% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</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 != 2 $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="";$et=""; } else { $t="";$et=""; }

print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</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% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</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 != 2 $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="";$et=""; } else { $t="";$et=""; }

print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td> </tr>";

}

print "</table>";

}

//////////////////////////////////////////////new function to show ranks as i have them

function hof_jobrank()

{

global $db,$ir,$c,$userid, $myf;

print "Showing the 20 users with the highest Rank

<table width=75% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> </tr>";

$q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level !=2 $myf ORDER BY u.jobrank DESC,u.userid ASC LIMIT 20");

$p=0;

while($r=$db->fetch_row($q))

{

$p++;

if($r['userid'] == $ir['userid']) { $t="";$et=""; } else { $t="";$et=""; }

print "<tr>

<td>$t$p$et</td>

<td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td>

</tr>";

}

print "</table>";

}

//////////////////////////////////////////////end rank function

$h->endpage();

?>[/mysql]

Posted
I modified that ranks mod to work for me, i have those as the users job ranks. and those are in the HOF to see.

i also added job rank pics to the jobs page and on the users profile. though i dont have the pics showing in this HOF.

if it helps you get to what your after you can have a look at this HOF using a standard V2 halloffame.php

 

[mysql]<?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") ? "" : "";

$bet1=($filter=="nodon") ? "" : "";

$bt2=($filter=="don") ? "" : "";

$bet2=($filter=="don") ? "" : "";

$bt3=($filter=="all") ? "" : "";

$bet3=($filter=="all") ? "" : "";

print "<h3>Hall Of Fame</h3><hr />

Filter: [$bt1Non-Donators$bet1 | $bt2Donators$bet2 | $bt3All Users$bet3]<hr />

<table width=90% border=1 cellspacing=1 class='table'>

<tr>

<td>LEVEL</td>

<td>MONEY</td>

<td>RESPECT</td>

<td>CRYSTALS</td>

<td>TOTAL STATS</td>

<td>RANK</td>//////////////////////////add the link for the ranks selection

</tr>

<tr> <td>STRENGTH</td> <td>AGILITY</td> <td>GUARD</td> <td>LABOUR</td> <td>IQ</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;

case "jobrank"://////////////case for the ranks

hof_jobrank();

break;

}

function hof_level()

{

global $db,$ir,$c,$userid, $myf;

print "Showing the 20 users with the highest levels

<table width=75% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> <th>Level</th> </tr>";

$q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 2 $myf ORDER BY level DESC,userid ASC LIMIT 20");

$p=0;

while($r=$db->fetch_row($q))

{

$p++;

if($r['userid'] == $userid) { $t="";$et=""; } else { $t="";$et=""; }

print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td> <td>$t{$r['level']}$et</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% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> <th>Money</th> </tr>";

$q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 2 $myf ORDER BY money DESC,userid ASC LIMIT 20");

$p=0;

while($r=$db->fetch_row($q))

{

$p++;

if($r['userid'] == $userid) { $t="";$et=""; } else { $t="";$et=""; }

print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td> <td>$t\$".money_formatter($r['money'],'')."$et</td> </tr>";

}

print "</table>";

}

function hof_crystals()

{

global $db,$ir,$c,$userid, $myf;

print "Showing the 20 users with the highest amount of rations

<table width=75% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> <th>Rations</th> </tr>";

$q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 2 $myf ORDER BY crystals DESC,userid ASC LIMIT 20");

$p=0;

while($r=$db->fetch_row($q))

{

$p++;

if($r['userid'] == $userid) { $t="";$et=""; } else { $t="";$et=""; }

print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td> <td>$t".money_formatter($r['crystals'],'')."$et</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% border=1 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="";$et=""; } 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% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</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 != 2 $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="";$et=""; } else { $t="";$et=""; }

print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</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% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</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 != 2 $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="";$et=""; } else { $t="";$et=""; }

print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</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% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</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 != 2 $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="";$et=""; } else { $t="";$et=""; }

print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</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% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</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 != 2 $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="";$et=""; } else { $t="";$et=""; }

print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</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% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</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 != 2 $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="";$et=""; } else { $t="";$et=""; }

print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</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% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</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 != 2 $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="";$et=""; } else { $t="";$et=""; }

print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td> </tr>";

}

print "</table>";

}

//////////////////////////////////////////////new function to show ranks as i have them

function hof_jobrank()

{

global $db,$ir,$c,$userid, $myf;

print "Showing the 20 users with the highest Rank

<table width=75% border=1 cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> </tr>";

$q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level !=2 $myf ORDER BY u.jobrank DESC,u.userid ASC LIMIT 20");

$p=0;

while($r=$db->fetch_row($q))

{

$p++;

if($r['userid'] == $ir['userid']) { $t="";$et=""; } else { $t="";$et=""; }

print "<tr>

<td>$t$p$et</td>

<td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td>

</tr>";

}

print "</table>";

}

//////////////////////////////////////////////end rank function

$h->endpage();

?>[/mysql]

job ranks? no im on about game ranks m8 lol
Posted

Those are the ranks from the rank mod your talking about bro, you can reword it anyhow you like. Just alter the code slightly to your liking.

 

I just took the ranks mod and spun it up to get what i wanted out of it.

 

 

Make a new colum in the users table called ranks, and insert into it the new rank when they reach the level at whitch they get the rank. then have the ranks show in the HOF.

Posted
Those are the ranks from the rank mod your talking about bro, you can reword it anyhow you like. Just alter the code slightly to your liking.

 

I just took the ranks mod and spun it up to get what i wanted out of it.

 

 

Make a new colum in the users table called ranks, and insert into it the new rank when they reach the level at whitch they get the rank. then have the ranks show in the HOF.

its not as easy as that tho m8 as i have already tried that
Posted

you will have to have a table or a column within the users table to make this work, there has to be info stored to pull it to the hof for you.

no info=no ranks showing in hof

[mccode v2] Ranks Mod!!!!

there is mine with screen shots of if working, now i know its not exactly what you are after here. BUT it will show that it can be done, you just have to figure out how within your game setup.

 

that givin what kind of game do you have?

i may be able to help you make this work for you also.

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...