Jump to content

Function: Mds_Player_Avatar


Recommended Posts

[b]null[/b] mds_player_avatar(string $name, string $attributes);

Will echo the player's avatar image if the name is valid, otherwise it will give a no avatar message.

Player name is not case sensitive.
The image is echoed directly by the function with only a null value returned.

The function can be called a maximum of 5 times in the script.

Attributes are not required, but if used will be given directly to the image in html.


<script type="text/javascript">
function toggle(){
var img = document.getElementById("avatar");
img.style.display = img.style.display == "none" ? "inline" : "none";
<input type="button" value="Show/Hide" onclick="toggle()" />
<br />

echo @content[0];
mds_player_avatar('Rendril Revant', 'id="avatar"');

Edited by Rendril
Link to comment
Share on other sites

It's not case sensitive...
i get my avatar by entering '*burns*' xD

apart from that... i left out the id= part, and it still works :/

[php]echo @content[0];
mds_player_avatar(@vn); [/php]

[html]<form method="post" action=""> Enter a Playername and see his/her Avatar!<br />
<input name="name" type="text" /><br /> <br />
<input name="submit" type="submit" value="Show me your looks!"/><br /> </form>[/html]

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.

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.

  • Forum Statistics

    Total Topics
    Total Posts
  • Recently Browsing

    • No registered users viewing this page.
  • Upcoming Events

    No upcoming events found
  • Recent Event Reviews

  • Create New...