Jump to content
MakeWebGames

Recommended Posts

Posted

Okay so i have been working on an merit's/Awards mod with images

and i have everything done

Like images/auto give awards/merits/merits trader

When a player gets to lets say level 5

they get an Awards (1) once viewed it goes to (0)

What i need help with is ...

How to get the award image ( once earned ) to show in view user

Am just totally stuck here :/ any help would be a great help!

Posted

I'm not very good with php but I would assume that you would have to make a separate area (table) on the users profile much like the users profile pic and add a link showing the award.

Posted (edited)

@ Newttster Thank's but way ahead of you there dude the mod is almost 100% complete just the issue of getting the images into view users once earned

@ Illusions i give that way a go but failed i mean i got them to show but when they got level 10 the level 5 award went away any way to make more then one if statment's?

i mean i got up to here

if($ir['level'] ==5)

{

echo '<br /><center><table style='border-style:solid;border-width:1px;border-color:#303030;' width='100%' cellpadding='5' border='1'>

<th bgcolor=grey><b><center>Awards</center></b></th>

</tr>

<tr>

<td><b><img src='images/awards/lvl5.png' alt='Level 5 Award' title='Level 5 Award' ></b></td>

</tr>

</table>';

}

 

or am i going about it in the wrong way :/

Edited by MrAnthony
Posted

call this file ranking.php this is just for an example you can change whats needed..

 

<?PHP
// ADD WHAT EVER YOU WANT TO THIS LIST IF YOU CREATE A NEW $ EXAMPLE $energy YOU WILL NEED TO ADD THAT TO THE VIEWUSER.PHP //
// EXAMPLE <tr><td width=50% class='h'><center> $levaw $rnk $crim </center></td></tr> WOULD BECOME //
// <tr><td width=50% class='h'><center> $levaw $rnk $crim $energy</center></td></tr> //

if($r['level'] >= 5) { $levaw="<img src='images/awards/level5.png'/>"; }
if($r['level'] >= 10) { $levaw="<img src='images/awards/level5.png'/>"; }
if($r['level'] >= 15) { $levaw="<img src='images/awards/level5.png'/>"; }
if($r['level'] >= 20) { $levaw="<img src='images/awards/level20.png'/>"; }
if($r['level'] >= 25) { $levaw="<img src='images/awards/level25.png'/>"; }
if($r['level'] >= 30) { $levaw="<img src='images/awards/level30.png'/>"; }
if($r['level'] >= 35) { $levaw="<img src='images/awards/level35.png'/>"; }
if($r['rank'] == 2) { $rnk="<img src='images/awards/rank2.png'/>"; }
if($r['rank'] == 3) { $rnk="<img src='images/awards/rank3.png'/>"; }
if($r['rank'] == 4) { $rnk="<img src='images/awards/rank4.png'/>"; }
if($r['rank'] == 5) { $rnk="<img src='images/awards/rank5.png'/>"; }
if($r['offences'] > 200) { $crim="<img src='images/awards/crimes200.png'/>"; }
if($r['offences'] > 400) { $crim="<img src='images/awards/crimes400.png'/>"; }
if($r['offences'] > 600) { $crim="<img src='images/awards/crimes600.png'/>"; }
if($r['offences'] > 1000) { $crim="<img src='images/awards/crimes800.png'/>"; }
?>

 

Now in your viewuser.php

add

 

include "ranking.php";
print "</td></tr></table><table width=50%>
<tr><td width=50% class='h'><hr/><center>Awards</center></td></tr>
<tr><td width=50% class='h'><center> $levaw $rnk $crim </center></td></tr>
<tr><td width=50% class='h'><center>End</center></td></tr></table>";

 

This is only as an example but the same principal applies..

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...