ULX

Author Topic: ulx_fban?!  (Read 2865 times)

0 Members and 4 Guests are viewing this topic.

Offline sabo

  • Full Member
  • ***
  • Posts: 136
  • Karma: 2
  • Hello :)
    • The Elite Gaming
ulx_fban?!
« 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!

Offline aaron

  • Newbie
  • *
  • Posts: 14
  • Karma: 1
Re: ulx_fban?!
« Reply #1 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.

Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1270
  • Karma: 164
  • What even IS software anymore?
    • XGUI
Re: ulx_fban?!
« Reply #2 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
« Last Edit: August 31, 2013, 09:32:58 PM by Stickly Man! »
Join our Team Ulysses community discord! https://discord.gg/gR4Uye6

Offline sabo

  • Full Member
  • ***
  • Posts: 136
  • Karma: 2
  • Hello :)
    • The Elite Gaming
Re: ulx_fban?!
« Reply #3 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?!

Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1270
  • Karma: 164
  • What even IS software anymore?
    • XGUI
Re: ulx_fban?!
« Reply #4 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() )
Join our Team Ulysses community discord! https://discord.gg/gR4Uye6

Offline sabo

  • Full Member
  • ***
  • Posts: 136
  • Karma: 2
  • Hello :)
    • The Elite Gaming
Re: ulx_fban?!
« Reply #5 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??

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: ulx_fban?!
« Reply #6 on: September 02, 2013, 03:18:08 PM »
You'll need to popup your own VGUI element for the text.
Experiencing God's grace one day at a time.