Although I'm pretty sure it exists somewhere because I remember it from a DoD 1.3 server (and if it does, PLEASE link me), but I need a plug-in that allows players to view admins (that are set by the server) that are online on steam.
Basically, someone will be breaking rules and you could type /admin or !admin, it would bring up a list of them, and you could click their name to send a notification over steam that an admin is needed.
Is this possible? I swear an old community I was in had it and it was GREAT.
EDIT: Oh shit, is this the proper section? If not, I'd appreciate if a mod moved it.
I guess this is the right section. As you\re asking a question, and requesting this. But it\s simple getting a list of all admins on the server.
[QUOTE=Persious;28551626]I guess this is the right section. As you\re asking a question, and requesting this. But it\s simple getting a list of all admins on the server.[/QUOTE]
Seems like you failed to read the whole thread.
OP listing the admins that are online is the easy bit but sending them a message is most likely going to require you to use opensteamworks and make a bot that can send them a message and this is where it gets a bit more complex
In a addon.
[B]cl_init.lua[/B]
[lua]
function PrintAllAdmins()
local DermaPanel = vgui.Create( "DFrame" )
DermaPanel:SetSize( 500, 700 )
DermaPanel:Center()
DermaPanel:SetTitle( "Admin Menu" )
DermaPanel:SetVisible( true )
DermaPanel:SetDraggable( true )
DermaPanel:ShowCloseButton( true )
DermaPanel:MakePopup()
local DermaListView = vgui.Create("DListView")
DermaListView:SetParent(DermaPanel)
DermaListView:SetPos(25, 50)
DermaListView:SetSize(450, 625)
DermaListView:SetMultiSelect(false)
DermaListView:AddColumn("Name")
DermaListView:AddColumn("SteamID")
for k,v in pairs(player.GetAll()) do
if v:IsAdmin() then
DermaListView:AddLine(v:Nick(),v:SteamID())
end
end
end
concommand.Add( "ShowAdmins", PrintAllAdmins )
[/lua]
Give that a spin.
That would just list everyone who is marked as an admin in the server. He's wanting to send them a message via steam from a list of online admins.
[QUOTE=RTM xBEASTx;28553422]In a addon.
[B]cl_init.lua[/B]
[lua]
function PrintAllAdmins()
local DermaPanel = vgui.Create( "DFrame" )
DermaPanel:SetSize( 500, 700 )
DermaPanel:Center()
DermaPanel:SetTitle( "Admin Menu" )
DermaPanel:SetVisible( true )
DermaPanel:SetDraggable( true )
DermaPanel:ShowCloseButton( true )
DermaPanel:MakePopup()
local DermaListView = vgui.Create("DListView")
DermaListView:SetParent(DermaPanel)
DermaListView:SetPos(25, 50)
DermaListView:SetSize(450, 625)
DermaListView:SetMultiSelect(false)
DermaListView:AddColumn("Name")
DermaListView:AddColumn("SteamID")
for k,v in pairs(player.GetAll()) do
if v:IsAdmin() then
DermaListView:AddLine(v:Nick(),v:SteamID())
end
end
end
concommand.Add( "ShowAdmins", PrintAllAdmins )
[/lua]
Give that a spin.[/QUOTE]
thats only half the request
[editline]12th March 2011[/editline]
also your coding is worse then nomicals
It was a quick copy and paste of the wiki with a few changes.
What is so bad about it?
[QUOTE=RTM xBEASTx;28553522]It was a quick copy and paste of the wiki with a few changes.
What is so bad about it?[/QUOTE]
lots
[editline]12th March 2011[/editline]
[lua]local function PrintAllAdmins()
local DermaPanel = vgui.Create( "DFrame" )
DermaPanel:SetSize( 500, 700 )
DermaPanel:Center()
DermaPanel:SetTitle("Online Admins")
DermaPanel:MakePopup()
local DermaListView = vgui.Create("DListView")
DermaListView:SetParent(DermaPanel)
DermaListView:SetPos(25, 50)
DermaListView:SetSize(450, 625)
DermaListView:SetMultiSelect(false)
DermaListView:AddColumn("Name")
DermaListView:AddColumn("SteamID")
for k,v in pairs(player.GetAll()) do
if v:IsAdmin() then
DermaListView:AddLine(v:Nick(),v:SteamID())
end
end
end
concommand.Add("ShowAdmins", PrintAllAdmins)[/lua]
[QUOTE=notC-UNIT;28553495]thats only half the request
[editline]12th March 2011[/editline]
also your coding is worse then nomicals[/QUOTE]
You make it better and lets see how you'll do it.
[QUOTE=Persious;28553557]You make it better and lets see how you'll do it.[/QUOTE]
He did make it better, he "organized" it.
..
This might be possible ( sending the messages via steam ) using the [url=http://developer.valvesoftware.com/wiki/Steam_browser_protocol]Steam Browser Protocol[/url]
I have to admit that derma is a very very messy business, I wish there was a simpler and neater way, such as DML, I could give it a try my derma really matters to you.
[editline]12th March 2011[/editline]
I'm in bed but I could do this for you tomorrow.
Something like this:
[Lua]
function CallAnAdmin( ply )
--List all admins and their ids using above code
Admin = DermaListView:GetValue()
AdminID = Admins.comid[Admin]
Player = ply:Nick()
PlayerID = ply:SteamID()
--Does a HTML thing
--Opens "steam://friends/message/"..AdminID.."/"
[/Lua]
That's all the raw content and I should be able to make this tomorrow.
[editline]12th March 2011[/editline]
Forgot to add the table but I'm on my phone so I will write the last of the code tomorrow.
Sorry, you need to Log In to post a reply to this thread.