• TTT scoreboard administration
    46 replies, posted
Here is the fix for the ban. If you want the ban to pop up a ban menu just copy and paste my configuration: I hope you dont mind if I post this here, I have just added some stuff to it and I plan on getting other things to work as well, such as Privatemessage... :) [code] function PANEL:DoRightClick() local ply = self.Player if IsValid(ply) then surface.PlaySound("buttons/button9.wav") local options = DermaMenu() options:AddOption("Copy Name", function() SetClipboardText(ply:Nick()) surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/user_edit.png") options:AddOption("Copy SteamID", function() SetClipboardText(ply:SteamID()) surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/tag_blue.png") options:AddSpacer() options:AddOption("Open Profile", function() ply:ShowProfile() surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/world.png") options:AddSpacer() if IsValid(ply) && LocalPlayer():IsAdmin() or LocalPlayer():IsSuperAdmin() then local adminop,subimg = options:AddSubMenu("Admin") subimg:SetImage("icon16/lorry.png") adminop:AddOption("Slay Next Round", function() RunConsoleCommand("ulx","slaynr",ply:Nick()) surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/add.png") adminop:AddOption("Remove Slay Next Round", function() RunConsoleCommand("ulx","rslaynr",ply:Nick()) surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/cross.png") adminop:AddOption("View Slay Next Round", function() RunConsoleCommand("ulx","vslaynr",ply:Nick()) surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/information.png") adminop:AddSpacer() adminop:AddOption("Slay Now", function() RunConsoleCommand("ulx","slay",ply:Nick()) surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/cut_red.png") adminop:AddOption("Kick", function() RunConsoleCommand("ulx","kick",ply:Nick(),"You were kicked") surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/door_out.png") adminop:AddSpacer() adminop:AddOption("FBan", function() RunConsoleCommand("xgui","fban",ply:Nick()) surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/delete.png") adminop:AddOption("XBan", function() RunConsoleCommand("xgui","xban",ply:Nick()) surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/delete.png") adminop:AddSpacer() adminop:AddOption("Mute", function() RunConsoleCommand("ulx","mute",ply:Nick()) surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/asterisk_yellow.png") adminop:AddOption("Gag", function() RunConsoleCommand("ulx","gag",ply:Nick()) surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/asterisk_orange.png") adminop:AddSpacer() adminop:AddOption("Spectate", function() RunConsoleCommand("ulx","spectate",ply:Nick()) surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/zoom.png") adminop:AddSpacer() options:Open() end end end [/code] Ill just cut this out for further explaination: [code]adminop:AddOption("Ban", function() RunConsoleCommand("xgui","fban",ply:Nick()) surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/delete.png")[/code] as you can see the command run in the console is not ulx, it is xgui. The fban is "FreezeBan" so when ever you click on ban (in scoreboard) it will auto freeze the player and you will have a menu to insert reason and ban time. If you dont want the freeze just insert "xban" instead of "fban". If a group of your staff can not freeze then they will not be able to use fban, so xban should be an option as well. To the error with users menu poping up in the upper left corner, I dont know a fix and would love if anyone would post one hahah :D If I have one other than giving all the full list of commands Ill post here ;)
Amazing, and i think its better than the one on coderhire
Hey, I am wondering if anyone could help me. I'm trying to add another sub menu within my admin sub menu, my code is below and I've added "-- Another SubMenu 'name'" to show where I propose another sub menu to be added. Any help is great appreciated! [LUA]local ply = self.Player if ply:IsValid() then surface.PlaySound("buttons/button9.wav") local options = DermaMenu() options:AddOption("Copy Name", function() SetClipboardText(ply:Nick()) surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/user_edit.png") options:AddOption("Copy SteamID", function() SetClipboardText(ply:SteamID()) surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/tag_blue.png") options:AddOption("Open Profile", function() ply:ShowProfile() surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/world.png") options:AddSpacer() local adminop,subimg = options:AddSubMenu("Admin") subimg:SetImage("icon16/lorry.png") -- Another SubMenu "Teleport" adminop:AddOption("Bring", function() RunConsoleCommand("ulx","bring",ply:Nick()) surface.PlaySound("buttons/button9.wav") end) adminop:AddOption("Go To", function() RunConsoleCommand("ulx","goto",ply:Nick()) surface.PlaySound("buttons/button9.wav") end) adminop:AddOption("TP", function() RunConsoleCommand("ulx","teleport",ply:Nick()) surface.PlaySound("buttons/button9.wav") end) -- Another SubMenu "Force Spectator" adminop:AddOption("Enable", function() RunConsoleCommand("ulx","fspec",ply:Nick()) surface.PlaySound("buttons/button9.wav") end) adminop:AddOption("Disable", function() RunConsoleCommand("ulx","unspec",ply:Nick()) surface.PlaySound("buttons/button9.wav") end) -- Another SubMenu "Slay Queue" adminop:AddOption("Remove Slay Next Round", function() RunConsoleCommand("ulx","slaynr",ply:Nick()) surface.PlaySound("buttons/button9.wav") end) adminop:AddOption("RDM", function() RunConsoleCommand("ulx","slaynr",ply:Nick(), "RDM") surface.PlaySound("buttons/button9.wav") end) adminop:AddOption("Attempted RDM", function() RunConsoleCommand("ulx","slaynr",ply:Nick(), "Attempted RDM") surface.PlaySound("buttons/button9.wav") end) adminop:AddOption("False KOS", function() RunConsoleCommand("ulx","slaynr",ply:Nick(), "False KOS") surface.PlaySound("buttons/button9.wav") end) adminop:AddOption("Traitor Baiting", function() RunConsoleCommand("ulx","slaynr",ply:Nick(), "Traitor Baiting") surface.PlaySound("buttons/button9.wav") end) -- Another SubMenu "Slay" adminop:AddOption("Slay", function() RunConsoleCommand("ulx","slay",ply:Nick()) surface.PlaySound("buttons/button9.wav") end) adminop:AddOption("RDM", function() RunConsoleCommand("ulx","slay",ply:Nick(), "RDM") surface.PlaySound("buttons/button9.wav") end) adminop:AddOption("Attempted RDM", function() RunConsoleCommand("ulx","slay",ply:Nick(), "Attempted RDM") surface.PlaySound("buttons/button9.wav") end) adminop:AddOption("False KOS", function() RunConsoleCommand("ulx","slay",ply:Nick(), "False KOS") surface.PlaySound("buttons/button9.wav") end) adminop:AddOption("Traitor Baiting", function() RunConsoleCommand("ulx","slay",ply:Nick(), "Traitor Baiting") surface.PlaySound("buttons/button9.wav") end) -- Another SubMenu "Gag" adminop:AddOption("Enable", function() RunConsoleCommand("ulx","gag",ply:Nick()) surface.PlaySound("buttons/button9.wav") end) adminop:AddOption("Disable", function() RunConsoleCommand("ulx","gag",ply:Nick()) surface.PlaySound("buttons/button9.wav") end) -- Another SubMenu "Mute" adminop:AddOption("Enable", function() RunConsoleCommand("ulx","mute",ply:Nick()) surface.PlaySound("buttons/button9.wav") end) adminop:AddOption("Disable", function() RunConsoleCommand("ulx","unmute",ply:Nick()) surface.PlaySound("buttons/button9.wav") end) -- Another SubMenu "Gimp" adminop:AddOption("Enable", function() RunConsoleCommand("ulx","gimp",ply:Nick()) surface.PlaySound("buttons/button9.wav") end) adminop:AddOption("Disable", function() RunConsoleCommand("ulx","ungimp",ply:Nick()) surface.PlaySound("buttons/button9.wav") end) -- Another SubMenu "Ban" adminop:AddOption("FBan", function() RunConsoleCommand("xgui","fban",ply:Nick()) surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/delete.png") adminop:AddOption("XBan", function() RunConsoleCommand("xgui","xban",ply:Nick()) surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/delete.png") -- Another SubMenu "Kick" adminop:AddOption("RDM", function() RunConsoleCommand("ulx","kick",ply:Nick(),"You've have been kicked for RDM.") surface.PlaySound("buttons/button9.wav") end) adminop:AddOption("Attempted RDM", function() RunConsoleCommand("ulx","kick",ply:Nick(),"You've have been kicked for Attempted RDM.") surface.PlaySound("buttons/button9.wav") end) adminop:AddOption("False KOS", function() RunConsoleCommand("ulx","kick",ply:Nick(),"You've have been kicked for False KOS.") surface.PlaySound("buttons/button9.wav") end) adminop:AddOption("Traitor Baiting", function() RunConsoleCommand("ulx","kick",ply:Nick(),"You've have been kicked for Traitor Baiting.") surface.PlaySound("buttons/button9.wav") end) adminop:AddOption("Being a pain", function() RunConsoleCommand("ulx","kick",ply:Nick(),"You've have been kicked for being a pain.") surface.PlaySound("buttons/button9.wav") end) adminop:AddOption("Spawn", function() RunConsoleCommand("ulx","spawn",ply:Nick()) surface.PlaySound("buttons/button9.wav") end) adminop:AddOption("Karma", function() RunConsoleCommand("ulx","karma", ply:Nick(), "1000", "Has had their Karma reset to 1000") surface.PlaySound("buttons/button9.wav") end) options:Open() end end[/LUA]
How easy would this be to modify so it works with Evolve? People really need to stop assuming that ULX is the only admin mod in existence.
[QUOTE=NiandraLades;42607661]How easy would this be to modify so it works with Evolve? People really need to stop assuming that ULX is the only admin mod in existence.[/QUOTE] You can, if you look closely you see that it only runs a ulx command via console, nothing special. So for Evolve, you'll just have to run the console commands with the proper arguments. As I have never worked with Evolve, I can't help you much specifically.
[QUOTE=NiandraLades;42607661]How easy would this be to modify so it works with Evolve? People really need to stop assuming that ULX is the only admin mod in existence.[/QUOTE] just modify it do like [lua]RunConsoleCommand("evolve", "ban", ply:Nick(), 60, "Banned")[/lua] (i dont know evolve ban command, just an example)
We are running a server with a custom rank (Donormin) [CODE][ERROR] gamemodes/terrortown/gamemode/vgui/sb_row.lua:285: attempt to call method 'IsDonormin' (a nil value) 1. DoRightClick - gamemodes/terrortown/gamemode/vgui/sb_row.lua:285 2. unknown - lua/vgui/dlabel.lua:201[/CODE] have no idea how to fix this but: [CODE]if IsValid(ply) && LocalPlayer():IsAdmin() or LocalPlayer():IsSuperAdmin() or LocalPlayer():IsDonormin() then[/CODE] is clearly wrong, if someone knows where I can find any information on how to fix this or know what the problem is I would be greatful for every litte help I can get
Because IsDonormin isn't in core gmod you need to do 'ply:IsUserGroup("donormin")' so [CODE]if IsValid(ply) && LocalPlayer():IsAdmin() or LocalPlayer():IsSuperAdmin() or ply:IsUserGroup("donormin") then[/CODE] That should do it.
It did, thanks Ejbaker
where is the download link?
[QUOTE=FixerFischer;42968904]where is the download link?[/QUOTE] You don't need a download like.. The code is pasted inside the OP... Open your eyes for once
[QUOTE=FixerFischer;42968904]where is the download link?[/QUOTE] Just copy-paste the code where it tells you to in the directions.
I don't like cookie cutter ban/kick reasons, so I made a quick edit that opens a text box for you to type a reason when banning. It's set to automatically do permanent bans, but you can always modify it however you want. Here's my ban option. [CODE]adminop:AddOption("Ban", function() local banreason_pnl = vgui.Create( "DFrame" ) banreason_pnl:Center() banreason_pnl:SetSize( 500, 50 ) banreason_pnl:SetTitle( "Banning Reason" ) banreason_pnl:ShowCloseButton( false ) banreason_pnl:SetVisible( true ) banreason_pnl:MakePopup() banreason_pnl:SetDraggable( true ) local banreason_txt = vgui.Create( "DTextEntry", banreason_pnl ) banreason_txt:SetPos( 20,25 ) banreason_txt:SetTall( 20 ) banreason_txt:SetWide( 450 ) banreason_txt:SetEnterAllowed( true ) banreason_txt.OnEnter = function() RunConsoleCommand("ulx", "ban", ply:Nick(), "0", banreason_txt:GetValue()) surface.PlaySound("buttons/button9.wav") banreason_pnl:SetVisible( false ) end end):SetImage("icon16/user_delete.png")[/CODE] There's probably an easier way to do this, feel free to post your version if there is.
[QUOTE=FixerFischer;42968904]where is the download link?[/QUOTE] Are you stupid? He states how to add it in the post.
[QUOTE=Brendon;43075862]Are you stupid? He states how to add it in the post.[/QUOTE] Was this really necessary after 4 other people said the same thing and then comment this a week later good job sir good job.
If I have an custom rank (operator) The operator can make it only for yourself(only right click on himself)
For some reason when I did this it played the sound of the menu opining but did not show the menu. as far as I know the menu wasn't even there. This is the code I have [CODE]local ply = self.Player if LocalPlayer():IsAdmin() or LocalPlayer():IsSuperAdmin() then surface.PlaySound("buttons/button9.wav") local options = DermaMenu() options:AddOption("Copy Name", function() SetClipboardText(ply:Nick()) surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/user_edit.png") options:AddOption("Copy SteamID", function() SetClipboardText(ply:SteamID()) surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/tag_blue.png") options:AddSpacer() options:AddOption("Open Profile", function() ply:ShowProfile() surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/world.png") options:AddSpacer() if IsValid(ply) then local adminop,subimg = options:AddSubMenu("Admin") subimg:SetImage("icon16/lorry.png") adminop:AddOption("Slay Next Round", function() RunConsoleCommand("ulx","slaynr",ply:Nick()) surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/cross.png") adminop:AddOption("Slay Now", function() RunConsoleCommand("ulx","slay",ply:Nick()) surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/cut_red.png") adminop:AddOption("Kick", function() RunConsoleCommand("ulx","kick",ply:Nick(),"You were kicked") surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/door_out.png") adminop:AddOption("Ban", function() RunConsoleCommand("ulx","ban",ply:Nick(),120,"You were banned") surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/delete.png") adminop:AddSpacer() adminop:AddOption("Mute", function() RunConsoleCommand("ulx","mute",ply:Nick()) surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/asterisk_yellow.png") adminop:AddOption("Gag", function() RunConsoleCommand("ulx","gag",ply:Nick()) surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/asterisk_orange.png") adminop:AddSpacer() adminop:AddOption("Spectate", function() RunConsoleCommand("ulx","spectate",ply:Nick()) surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/zoom.png") adminop:AddSpacer() options:Open() end end[/CODE] Can someone help me?
Sorry, you need to Log In to post a reply to this thread.