Author Topic: Please help  (Read 2271 times)

0 Members and 1 Guest are viewing this topic.

Offline lampman13

  • Jr. Member
  • **
  • Posts: 71
  • Karma: -10
Please help
« on: August 29, 2015, 07:55:08 PM »
I am making a  custom admin menu but I want to know how to "reset" the panel. so that when I click the kick button it will do what it needs to do for the kick thing ( set buttons, textentry, and plist ) but then when I click the ban button or anything I dont know how to "clear" everything that was there when the kick button was pressed.
« Last Edit: August 30, 2015, 05:53:07 PM by lampman13 »

Offline lampman13

  • Jr. Member
  • **
  • Posts: 71
  • Karma: -10
Re: Please Help
« Reply #1 on: August 30, 2015, 05:52:39 PM »
Can anyone help?

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 476
  • Karma: 84
  • I write code
Re: Please help
« Reply #2 on: August 30, 2015, 07:05:59 PM »
There is no way to 'reset' what you did. Garry's Mod doesn't know what you want to reset. If you want to clear everything that happened, you have to set them manually back to the way they were before. If you give me an example I can explain more in-depth.
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.

Offline lampman13

  • Jr. Member
  • **
  • Posts: 71
  • Karma: -10
Re: Please help
« Reply #3 on: September 03, 2015, 12:05:23 PM »
ok so when someone presses say kick it opens a plist and a textbox with a button that says kick that would inturn use that and kick the player selected. but then if someone presses kick but needs say the blacklist things or the ban things how would I make it so it would get rid of all the things opened by the kick button and open the other.

Offline lampman13

  • Jr. Member
  • **
  • Posts: 71
  • Karma: -10
Re: Please help
« Reply #4 on: September 03, 2015, 12:07:08 PM »
so basically when you press the kick button it would open stuff but when you clicked on another button it would take away the stuff that was previously opened and open the new thing

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 476
  • Karma: 84
  • I write code
Re: Please help
« Reply #5 on: September 03, 2015, 06:00:58 PM »
Well as I said before if you wanted to remove something you would have to hide the elements. An easy way to accomplish what you want would be to put the kick stuff in a new panel and then just hide/remove that panel when they click on another button.
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.

Offline lampman13

  • Jr. Member
  • **
  • Posts: 71
  • Karma: -10
Re: Please help
« Reply #6 on: September 11, 2015, 12:06:27 PM »
oh thanks