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.

But it did’nt worked.

I need these pictures:

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.”


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.