ID:268039
 
mob
Stat()
statpanel("Stat")
stat("Your Icon:","[src.icon]")


i want it to show the players icon but that code shows the filename i tried
        stat("Your Icon:","(src)")


But that shows your name and your icon i just want the icon so could anyone please help?
The only way to display an icon in a statpanel is to display an atom. If you're dead set on having the icon without the name, you'll need to create a new obj or atom/movable, set it's icon to match the mob, set it's name to "", and display that in the statpanel.

mob
var/tmp/atom/movable/icon_display = new()
/* tmp so it doesn't save and bloat your savefiles
with copies of your icon */

New()
..()
icon_display.icon = icon
icon_display.name = ""

Stat()
stat("Your icon:",icon_display)


For more details on statpanels, check out http://www.byondscape.com/ascape.dmb/Shadowdarke.2003-0322/