Ulysses
Ulysses Stuff => General Chat & Help and Support => Topic started by: sabo on August 31, 2013, 03:26:27 PM
-
Hey.
There is a command "!fban <player>".
But I can not figure out what to type in console to get the fban menu...
Basically I need it for this:
adminop:AddOption("Ban", function() RunConsoleCommand("ulx","ban",ply:Nick(),120,"You were banned") surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/delete.png")
If you right click on a player it will show you some options, 1 of them is banning, currently it is to be set with a default timer.
I want my staff to be able to actually write a reason and adjust the time by popping up a menu (!fban)
Can anyone help me out in this?
Thank you!
-
Typing 'xgui fban' into the console brings the fban menu up if that's what you mean.
-
Yup, so you should be able to change your RunConsoleCommand to be:
RunConsoleCommand("xgui","fban",ply:Nick())
The xgui console command has a few other nifty things too, like being able to show a specific tab by doing "xgui show bans". The reason why it's separate from other ulx commands is when I originally worked on XGUI, it was just going to be an addon for ULX, not included by default :P
-
Yup, so you should be able to change your RunConsoleCommand to be:
RunConsoleCommand("xgui","fban",ply:Nick())
The xgui console command has a few other nifty things too, like being able to show a specific tab by doing "xgui show bans". The reason why it's separate from other ulx commands is when I originally worked on XGUI, it was just going to be an addon for ULX, not included by default :P
xgui show bans would show the whole tab right?
It can not show the bans of the said person correct?
Also, I would like to add a way so you can PM via scoreboard: -> right click on someones name -> click PM -> menu opens where you can write the message -> click send and it is done
Is that possible/already out there?!
-
Yes, "xgui show bans" would show the whole bans tab, presuming they have permission to see it.
I'm not quite sure if I fully understand your second question, but there is a now a search box on the bans tab you can type the admins name/SteamID in to show only who they have banned (no way to automate that at the moment, I'm afraid)
Yes, you can PM via GUI-- just use something like this when send is clicked: RunConsoleCommand( "ulx", "psay", <playername>, textbox:GetValue() )
-
Yes, "xgui show bans" would show the whole bans tab, presuming they have permission to see it.
I'm not quite sure if I fully understand your second question, but there is a now a search box on the bans tab you can type the admins name/SteamID in to show only who they have banned (no way to automate that at the moment, I'm afraid)
Yes, you can PM via GUI-- just use something like this when send is clicked: RunConsoleCommand( "ulx", "psay", <playername>, textbox:GetValue() )
Okay, the bans are fine but I really want the PM :(
here is what I get as error:
[ERROR] gamemodes/terrortown/gamemode/vgui/sb_row.lua:387: attempt to index global 'textbox' (a nil value)
1. DoClick - gamemodes/terrortown/gamemode/vgui/sb_row.lua:387
2. OnMouseReleased - lua/vgui/dlabel.lua:206
3. unknown - lua/vgui/dmenuoption.lua:116
With this as line:
options:AddOption("Private Message", function() RunConsoleCommand("ulx","psay",<playername>,textbox:GetValue()) surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/user_comment.png")
Is there even a textbox for PM??
-
You'll need to popup your own VGUI element for the text.