Jump to content
MakeWebGames

Stat ranks on profile


Llight
 Share

Recommended Posts

how can i make the user stat ranks show up on there profile

Should be pretty simple, if you have the stats ranking on your index page (which I think comes as standard) you should just be able to copy and past the code over? It'll be something like $ir{'statsrk'} or something! Just change ir to r

Could be wrong though?

Link to comment
Share on other sites

add to your index.php

$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);

echo "
<tr>
<th width='33%'>Stat</th>
<th width='33%'>Amount</th>
<th width='34%'>Rank</th>
</tr>
<tr>
<td>Strength</td>
<td>{$ir['strength']}</td>
<td> [Ranked: {$ir['strank']}]</td>
</tr>


<tr><td>Agility</td>
<td> {$ir['agility']}</td>
<td> [Ranked: {$ir['agirank']}]</td>
</tr>

<tr><td>Guard</td>
<td> {$ir['guard']} </td>
<td>[Ranked: {$ir['guarank']}]</td>
</tr>

<tr>
<td>Labour</td>
<td>{$ir['labour']} </td>
<td>[Ranked: {$ir['labrank']}]</td></tr>

<tr>
<td>IQ</td>
<td>{$ir['IQ']} </td>
<td>[Ranked: {$ir['IQrank']}]</td></tr>
Link to comment
Share on other sites

add to your index.php
$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);

echo "
<tr>
<th width='33%'>Stat</th>
<th width='33%'>Amount</th>
<th width='34%'>Rank</th>
</tr>
<tr>
<td>Strength</td>
<td>{$ir['strength']}</td>
<td> [Ranked: {$ir['strank']}]</td>
</tr>


<tr><td>Agility</td>
<td> {$ir['agility']}</td>
<td> [Ranked: {$ir['agirank']}]</td>
</tr>

<tr><td>Guard</td>
<td> {$ir['guard']} </td>
<td>[Ranked: {$ir['guarank']}]</td>
</tr>

<tr>
<td>Labour</td>
<td>{$ir['labour']} </td>
<td>[Ranked: {$ir['labrank']}]</td></tr>

<tr>
<td>IQ</td>
<td>{$ir['IQ']} </td>
<td>[Ranked: {$ir['IQrank']}]</td></tr>

ah maybe it wasnt a standard thing! was son long ago i saw a standard set up!

Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...