FANDOM



mds_player_avatar

mds_player_avatar - echo the player's avatar image.

Description

null mds_player_avatar(string $name [,string $attributes])

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

Parameters

name
Name of the player to display the avatar.
not case sensitive.
attributes
HTML attributes that will be added to the image tag

Return Values

Returns NULL.
The image is echoed directly by the function.

Restrictions

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

Examples

example #1

mds_player_avatar('Rendril Revant');


example #2

mds_player_avatar('Rendril Revant','border=1 style="border : 2px dotted #999;"');


example #3

 HTML

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

 MDScript

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

See Also


Community content is available under CC-BY-SA unless otherwise noted.