ID:1612525
 
(See the best response by FKI.)
Is where the icon is defined.
        var/icon/I=icon('Ranks.dmi',icon_state="Rookie")
src.Rank=I

Works with this but cannot be re-sized.
world<<"\icon[usr.Rank] [usr.name]: [T]"

Doesn't work with. No icon is there with this.
world<<"<img src=[usr.Rank] width=32 height=32>[usr.name]: [T]"

Problem description:
Trying to figure out how to re-size the icon I'm making go into the output box.
You have to edit the output's CSS to change an image's size. Go into your interface and make a class for the image, setting its accordingly. An example from GOA:

.villageicon img.icon { width: 18; height: 14; }


Then you'd re-write this

world<<"\icon[usr.Rank] [usr.name]: [T]"


to

world<<"<span class = "classname">\icon[usr.Rank] [usr.name]: [T]</span>"


Last I checked that worked. Edit: You're probably going to have to escape those quotes too, fyi.
var/icon/I=icon('Ranks.dmi',icon_state="Rookie"){bound_width=32;bound_height=32}
src.Rank=I


and then the msg to the world
world<<"\icon[usr.Rank] [usr.name]: [T]"
wat
In response to Baird Techie
Best response
Go into your interface and into the window where the output is. Click the output and press Enter/Return (or right-click it and open the menu), and go to the farthest right I believe and you'll see a section where you can enter CSS.

Apply with the span html tag.
In response to FKI
FKI wrote:
Go into your interface and into the window where the output is. Click the output and press Enter/Return (or right-click it and open the menu), and go to the farthest right I believe and you'll see a section where you can enter CSS.

Apply with the span html tag.

Yeah I know that, just don't remember doing all that back in the day.
Back in the day, CSS script was put into client.script.
Baird Techie wrote:
> world<<"<img src=[usr.Rank] width=32 height=32>[usr.name]: [T]"
>


just an FYI, if you wanted to do it like this, you'd want to use
"\ref[user.Rank]" //rather than just [usr.Rank]


The reference entry for the icon text macro explains how the \icon macro works, it expands to:
"<IMG CLASS=icon SRC=\ref[usr.icon] ICONSTATE='[usr.icon_state]'>"
In response to Tarundbz
Tarundbz wrote:
> var/icon/I=icon('Ranks.dmi',icon_state="Rookie"){bound_width=32;bound_height=32}
> src.Rank=I
>
>

and then the msg to the world
>
> world<<"\icon[usr.Rank] [usr.name]: [T]"
>


Please stop doing this. The above code is so wrong it's not even funny.