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.

Example:

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

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

Edited by Rendril
Link to post
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 :/

script:
[php]echo @content[0];
@vn=@input['name'];
mds_player_avatar(@vn); [/php]

html:
[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 post
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.

Loading...
  • Forum Statistics

    16,221
    Total Topics
    176,796
    Total Posts
  • Recently Browsing

    No registered users viewing this page.

  • Upcoming Events

    No upcoming events found
  • Recent Event Reviews

×
×
  • Create New...