Help to set DImage for Gun Seller NPC

Hi guys, im trying to create a gun seller npc which is contains images. I need help to set images to “DarkRP (Weapon)” images. I don’t know how can i do that.
I did tryed:



    local ak47img = vgui.Create( "DImage", frame )	
    ak47img:SetPos( 10, 35 )	
    ak47img:SetSize( 150, 150 )	
    ak47img:SetImage( "w_ak47" )


With the .png 's of DarkRP weapons.

http://puu.sh/kkQP0/9e1d4bd179.png

But it did’nt worked.

http://puu.sh/kkQRN/9ab8ff43ec.png

I need these pictures:

http://puu.sh/kkR5H/74ebcdabbf.jpg

Did you try



ak47img:SetImage( "w_ak47.png" )


I think it needs the .png extension…

Yep, I tested it and for me it works with .png [del](damn, that needs better documentation)[/del]

“The path of the image to load. When no file extension is supplied the VMT file extension is used.”

DImage/SetImage

Oh, nevermind then (I don’t usually check the var descriptions for that kind of stuff)

Even though some stuff might not be documented, theres many stuff still documented everyone actually even oversees :wink: I love the wiki and I have it open constantly.