like
Code: Select all
<quad style="avatar" substyle="playerlogin"/>

Moderator: NADEO
Code: Select all
<quad style="avatar" substyle="playerlogin"/>
ml ^="""<quad posn="0 0 1" sizen="24 24" image="file://Avatars/{{{Player.Login}}}/default" />""";
ah yeahspaii wrote:Try this
You're welcome!steeffeen wrote:thanks for the hint
Code: Select all
<quad posn="-37 61 2" sizen="31 25" id="1" image="file://Avatars/{{{Player.Login}}}/default" scriptevents="1"/>
Code: Select all
<script><!--
main()
{
(Page.GetFirstChild("1") as CMlQuad).SetText(Player.Avatar);
yield;
}
--></script>
Code: Select all
(Page.GetFirstChild("avatar") as CMlQuad).ImageUrl = LocalUser.AvatarUrl;
Thanks, it works!zocka wrote:Quads don't have SetText(). The have ChangeImageUrl() or ImageUrl.
You could use:PS: You shouldn't use ids like "1". Using qualified names benefits the readability of your code.Code: Select all
(Page.GetFirstChild("avatar") as CMlQuad).ImageUrl = LocalUser.AvatarUrl;
PPS: Just in case you are not on a server-manialink: {{{inlineManiaScript}}} in your xml will not be evaluated. If you are however, you can try <quad image="{{{Player.AvatarUrl}}}" /> without further ManiaScript code.
Users browsing this forum: No registered users and 1 guest