Hello.
I am having a problem with this derma menu i just made.
[lua]include(‘shared’)
function npc_doctor( )
local DFrame1 = vgui.Create('DFrame')
DFrame1:SetSize(360, 223)
DFrame1:SetPos(147, 96)
DFrame1:SetTitle('Doctor Bob')
DFrame1:SetDeleteOnClose(false)
DFrame1:MakePopup(
local DPanel1 = vgui.Create('DPanel', DFrame1)
DPanel1:SetSize(337, 92)
DPanel1:SetPos(158, 128)
local DPanel2 = vgui.Create('DPanel', DFrame1)
DPanel2:SetSize(80, 80)
DPanel2:SetPos(157, 230)
local SpawnIcon1 = vgui.Create('SpawnIcon', DFrame1)
SpawnIcon1:SetPos(167, 239)
SpawnIcon1:SetModel('models/player/kleiner.mdl')
local DPanel3 = vgui.Create('DPanel', DFrame1)
DPanel3:SetSize(252, 79)
DPanel3:SetPos(244, 232)
local DButton1 = vgui.Create('DButton', DFrame1)
DButton1:SetSize(241, 23)
DButton1:SetPos(248, 237)
DButton1:SetText('Yes I am')
DButton1.DoClick = function()
end
local DButton2 = vgui.Create('DButton', DFrame1)
DButton2:SetSize(241, 23)
DButton2:SetPos(248, 263)
DButton2:SetText('No im just looking around')
DButton2.DoClick = function()
end
local DLabel1 = vgui.Create('DLabel', DFrame1)
DLabel1:SetPos(166, 136)
DLabel1:SetText('Hello Sir. Are you intrested in becoming a doctor?')
DLabel1:SizeToContents()
DLabel1:SetTextColor(Color(255, 255, 255, 255))
end
usermessage.Hook( “npc_doctor”, npc_doctor)
[/lua]
It’s not showing up in-game. I connected it to the npc i made and it works u press ‘E’ on it and the DFrame will pop up but the buttons won’t. So I was wondering if someone could fix it.