Author Topic: Derma Help because I suck  (Read 728 times)

0 Members and 1 Guest are viewing this topic.

Offline BlueNova

  • Full Member
  • ***
  • Posts: 113
  • Karma: 13
  • The most powerful force in the universe.
Derma Help because I suck
« on: June 20, 2019, 11:32:17 AM »

I need some Derma help because Derma in Gmod is the absolute bane of my existence and I suck at it. In essence what I'm trying to do is create a little buy menu for an RP entity we're making and I'm using DModelPanel but the model is consistently either tiny or at the wrong angle. I can't use the Vectors to fix it to save my life so any help would be appreciated.

Code: Lua
  1. local weaponPanel = vgui.Create("DPanel", sheet)
  2. weaponPanel:SetSize(500, 350)
  3. weaponPanel.Paint = function(self, w, h) draw.RoundedBox(4, 0, 0, w, h, Color(224, 223, 213, self:GetAlpha())) end
  4. sheet:AddSheet("Weapons", weaponPanel, "icon16/bomb.png")
  6. local usp = vgui.Create("DModelPanel", weaponPanel)
  7. usp:SetSize(100, 100)
  8. usp:SetModel('models/weapons/w_pist_fokkususp.mdl')
  9. usp:SetCamPos(Vector(2, 0, 15))
  10. usp:SetLookAt(Vector(2, 2, 10)) --This is the closest I got to making it look good but it's from a top/down view which I couldn't seem to change

This is what the above code produces

Thanks for any help