ID:144700
 
Code:
for(var/mob/T in world)
if(T.client)
var/text="<tr><td>"
var/icon/AA = new(T.icon,T.icon_state)
if(T.payPal) text+="<a class='Pay' href='?src=\ref[usr];Pay=1;[T.key]'><font color=green>[T.name]</a>"
else text+="<font color=silver>[T.name]"
T << browse_rsc(AA)
text+="</td><td><img src=\"[AA]\"></td>"


Problem description:

I'm trying to display the icon of the person in a browser/who window. anyone know a way to do this because my way wont >.> Or maybe its impossible i dont know.
Just output "\icon[t]"
In response to Jp
uhmm, can you clarify because that itself doesnt work >.>
In response to Drakiel
Try something like this
"<IMG CLASS=icon SRC=\ref[src.AA]>
"
In response to Drakiel
If you're outputting to the BYOND text window, "\icon[M]" will output M's icon to the window. I believe it works in the browser, too.
In response to A.T.H.K
tried that it doesnt work.

and jp, /icon doesnt seem to work in the ds browser

ill probably do something else than display icon i guess. though it would be nice.
In response to Drakiel
To show an image on html im pretty sure it must be downloaded first browse_rsc i dunno im to tired but i hope it helps

p.s HOST d talk ya bum.
In response to A.T.H.K
Maybe I did something wrong, but I could never get the icon macros to work in the browser, but this works. I used this for a similar situation, I wanted to show the icon of an item in a browser window.

proc
Info(mob/M)
if(istype(src,/obj/item))
//Get the icon you want, and send it to the client as icon.dmi
M << browse_rsc(icon(icon,icon_state),"icon.dmi")
var/html = // Whatever your html is
// Use this to show the icon:
// <IMG CLASS=icon SRC=icon.dmi>
M<<browse(html,"window=info;size=300x400")
In response to Drumersl
mob/verb/Show_Me()
usr<<browse_rsc(usr.icon,"icon2show")//loads the icon to be used in the browser (icon,reference name)
usr<<browse("<img src=icon2show>")//displays the icon in the browser by using the reference name


however! to do something like this as a who list you have to browse_rsc each icon type (ie: Humans, Dark Elf, Monkeys) to a different variable, otherwise all players will end up looking like the last player to show up on the who list
Also i wouldnt recomend doing a browser who list that shows player icons because it takes a while to load <.<

and no, icon text macros dont work in browsers
As Drumersdl, ATHK, and Falacy states, you do have to use browse_rsc() to show icons in the browser. You should use the second argument, but if you don't, I beleive they send icons to the cache defaultly by the name of they're \ref.