Apoligies if this is a bad question, I’m new to lua.
The issue is that when I try and make more than one of these the other stops working, for example I would like one that opens our donate page when !donate is used, or !group to open up the steam group. All help is greatly apreciated, thanks in advance.
if CLIENT then
concommand.Add("Website",function(pl,cmd,args)
local Frame = vgui.Create("DFrame")
Frame:SetSize(ScrW() - 15, ScrH() - 15)
Frame:Center()
Frame:SetTitle("Forums")
Frame:MakePopup()
Frame:SetMouseInputEnabled(true)
local html = vgui.Create("DHTML", Frame)
html:SetPos(5,25)
html:SetSize(ScrW() - 25, ScrH() - 25)
html:OpenURL("http://titanservers.tk")
end)
end
if SERVER then
hook.Add("PlayerSay", "ChatHook", function(Player, Text, Public)
if Text[1] == "!" then
Text = Text:lower()
if Text == "!website" then
Player:ConCommand("Website")
return ""
end
end
end)
end