Dev Just a question

Discussion in 'Hobbies' started by MetallicPie, Jan 3, 2015.

  1. MetallicPie

    MetallicPie Regular Member

    Quick question, what function do i need to use to get localuser's steam profile picture, such as the one in the tab menu, left of your name.
     
  2. Sinz

    Sinz crumble VIP Silver

    You can type
    Code:
    status
    In console to find SteamIDs of players in-game.

    From there you can use http://steamidfinder.com/ to find their profile.
     
  3. MetallicPie

    MetallicPie Regular Member

    Sorry it was unclear, i wanted the game to automatically displayed the users profile picture in their HUD. I don't want to find a profile pic of a specific person.
     
  4. Yawn.

    Yawn. Previously known as Kindle, Books, Pages.

    You'll need to be a tad more specific. What environment are you trying to accomplish this in? This section is mainly used for level design, but I'll assume you're talking about Garry's Mod Lua since it otherwise isn't possible. (Alternatives of course being VScript, and PHP but those are less common.)

    Code:
    local frame = vgui.Create("DFrame")
    
    local av = vgui.Create("AvatarImage", frame)
    av:SetPos(50,50)
    av:SetSize(32, 32)
    av:SetPlayer( LocalPlayer(), 32 )
    
    frame:SetSize( ScrW()*0.25, ScrH()*0.25 )
    frame:Center()
    frame:SetVisible( true )
    frame:MakePopup()
    
    Source: More Information...
     
  5. MetallicPie

    MetallicPie Regular Member

    thx but highwon helped me out i used

    local avatarImg = vgui.Create("AvatarImage", avatarImg)
    avatarImg:confused:etSize(64,64)
    avatarImg:confused:etPos(23,ScrH() - 150)
    avatarImg:confused:etPlayer(LocalPlayer(), 64)
     
    • Winner Winner x 1