[B]I am making an admin server for my panel and I am having some problems.
I can't use it in my server but it worked fine in singleplayer.
There is anyway I can add so just some certain groups in ULX can use that command??[/B]
[CODE]
if (CLIENT) then
net.Receive("__hkOpenDialog",function()
if LocalPlayer() == net.ReadEntity() then
local frame = vgui.Create("DFrame")
frame:SetSize(500,500)
frame:Center()
frame:SetTitle("Admin Menu")
frame:SetVisible(true)
frame:MakePopup()
frame:SetBackgroundBlur(true)
frame.Paint = function (s , w , h)
draw.RoundedBox(5,0,0,w , h, Color(40,40,40))
draw.RoundedBox(5,3,3,w-6 , h-6, Color(50,50,50))
end
local labelneurax = vgui.Create("DLabel", frame)
labelneurax:SetPos(210,25)
labelneurax:SetSize(100,40)
labelneurax:SetText("NEURAX GAMING")
local labelathos = vgui.Create("DLabel", frame)
labelathos:SetPos(415,468)
labelathos:SetSize(100,40)
labelathos:SetText("Made By - Athos")
local buttonjedi = vgui.Create("DButton", frame)
buttonjedi:SetPos(170, 70)
buttonjedi:SetSize(160,40)
buttonjedi:SetText("Teleport to the Jedi Temple")
buttonjedi:SetColor( Color(0,92,196) )
buttonjedi.Paint = function(s , w , h)
draw.RoundedBox(3,0,0,w,h,Color(255,255,255))
end
function buttonjedi:DoClick ()
RunConsoleCommand("say", "/tp jedi")
ply:ChatPrint ("You teleported to the Jedi Temple")
frame:Remove()
end
local buttonsith = vgui.Create("DButton", frame)
buttonsith:SetPos(170, 130)
buttonsith:SetSize(160,40)
buttonsith:SetText("Teleport to the Sith Temple")
buttonsith:SetColor( Color(255,50,50) )
buttonsith.Paint = function(s , w , h)
draw.RoundedBox(3,0,0,w,h,Color(255,255,255))
end
function buttonsith:DoClick ()
RunConsoleCommand("say", "/tp sith")
ply:ChatPrint ("You teleported to the Sith Temple")
frame:Remove()
end
local buttonkashyyyk = vgui.Create("DButton", frame)
buttonkashyyyk:SetPos(170, 190)
buttonkashyyyk:SetSize(160,40)
buttonkashyyyk:SetText("Teleport to Kashyyyk")
buttonkashyyyk:SetColor( Color(0,220,94) )
buttonkashyyyk.Paint = function(s , w , h)
draw.RoundedBox(3,0,0,w,h,Color(255,255,255))
end
function buttonkashyyyk:DoClick ()
RunConsoleCommand("say", "/tp kashyyyk")
ply:ChatPrint ("You teleported to Kashyyyk")
frame:Remove()
end
local buttonsnow = vgui.Create("DButton", frame)
buttonsnow:SetPos(170, 250)
buttonsnow:SetSize(160,40)
buttonsnow:SetText("Teleport to the Snow Planet")
buttonsnow:SetColor( Color(70,70,70) )
buttonsnow.Paint = function(s , w , h)
draw.RoundedBox(3,0,0,w,h,Color(255,255,255))
end
function buttonsnow:DoClick ()
RunConsoleCommand("say", "/tp snow")
ply:ChatPrint ("You teleported to the Snow Planet")
frame:Remove()
end
end
end)
end
if (SERVER) then
local fcSendMsg = function(hPlayer)
util.AddNetworkString("__hkOpenDialog")
net.Start("__hkOpenDialog")
net.WriteEntity(hPlayer)
net.Broadcast()
end
hook.Add("PlayerSay","m_hkPlayerSayDialogCommand",function(hPlayer,sText)
if hPlayer:IsAdmin() then
if sText == "!adminmenu" then
fcSendMsg(hPlayer)
end
end
end)
end
[/CODE]
[QUOTE=Athods;49607102]I am making an admin server for my panel.[/QUOTE]
Well I'd say that's your problem. Why does your panel need a whole server?!
Thats to make easier for my server admins, and I would like to make a way so when the panel works on the server only certain groups on ULX can use the command, its just a simple panel I made.
[QUOTE=Athods;49607173]Thats to make easier for my server admins, and I would like to make a way so when the panel works on the server only certain groups on ULX can use the command, its just a simple panel I made.[/QUOTE]
huh
Sorry, you need to Log In to post a reply to this thread.