So I’m trying to make a derma panel pop up when a player says “!pubg”
Here is my code:
hook.Add("PlayerSay", "OpenCFG", function(ply, text, team)
if ((text == "!pubg") && ply == LocalPlayer()) then
local igcfg = vgui.Create("DFrame")
igcfg:SetPos(0,0)
igcfg:SetSize(500,400)
igcfg:SetTitle("")
igcfg:SetVisible(true)
igcfg:ShowCloseButton(true)
igcfg:MakePopup()
igcfg:Center()
end
end)