Ulysses

Ulysses Stuff => General Chat & Help and Support => Topic started by: sabo on August 31, 2013, 03:26:27 PM

Title: ulx_fban?!
Post 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:

Code: [Select]
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!
Title: Re: ulx_fban?!
Post by: aaron on August 31, 2013, 03:45:17 PM
Typing 'xgui fban' into the console brings the fban menu up if that's what you mean.
Title: Re: ulx_fban?!
Post by: Stickly Man! on August 31, 2013, 09:31:08 PM
Yup, so you should be able to change your RunConsoleCommand to be:
Code: [Select]
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
Title: Re: ulx_fban?!
Post by: sabo on September 01, 2013, 10:21:47 AM
Yup, so you should be able to change your RunConsoleCommand to be:
Code: [Select]
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?!
Title: Re: ulx_fban?!
Post by: Stickly Man! on September 01, 2013, 09:22:21 PM
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() )
Title: Re: ulx_fban?!
Post by: sabo on September 02, 2013, 11:09:42 AM
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:

Code: [Select]
[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:

Code: [Select]
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??
Title: Re: ulx_fban?!
Post by: Megiddo on September 02, 2013, 03:18:08 PM
You'll need to popup your own VGUI element for the text.