kjh45
|
  |
| Joined: 15 Feb 2009 |
| Total Posts: 256 |
|
|
| 05 Dec 2013 04:49 PM |
How would I make it so a admin gets a extra GUI Button? So like how do I have it check the players name to see if it is in the list and then makes the button visible? |
|
|
| Report Abuse |
|
|
|
| 05 Dec 2013 04:57 PM |
local admins = {}
local gui = script.Parent local adminBtn = gui.AdminBtn local lPlr = game.Players.LocalPlayer
local function ChkAdmin(plr) for i,v in pairs(admins) do if v:lower() == plr.Name:lower() then return true end end return false end
if ChkAdmin(lPlr) then adminBtn.Visible = true else adminBtn:Destroy() end |
|
|
| Report Abuse |
|
|
kjh45
|
  |
| Joined: 15 Feb 2009 |
| Total Posts: 256 |
|
| |
|
| |
|
kjh45
|
  |
| Joined: 15 Feb 2009 |
| Total Posts: 256 |
|
|
| 05 Dec 2013 05:43 PM |
| what do you mean change btn? |
|
|
| Report Abuse |
|
|
transIate
|
  |
| Joined: 20 Jun 2013 |
| Total Posts: 2699 |
|
|
| 05 Dec 2013 07:07 PM |
he got it off of kohl's admin
LOL
'FreeScriptMaker'
its a skod |
|
|
| Report Abuse |
|
|
BetterBe
|
  |
| Joined: 25 Jan 2009 |
| Total Posts: 1034 |
|
|
| 05 Dec 2013 07:11 PM |
Admins = {} for i, v in pairs(Admins) do if game.Players.LocalPlayer.Name == v then Gui.Visible = true break; else Gui.Visible = false end end
--in a local script (make sure its in PlayerGui just in case of Load times.-- |
|
|
| Report Abuse |
|
|
|
| 05 Dec 2013 07:28 PM |
| Your a moron I just made that. |
|
|
| Report Abuse |
|
|
BetterBe
|
  |
| Joined: 25 Jan 2009 |
| Total Posts: 1034 |
|
|
| 05 Dec 2013 07:30 PM |
| you my good sir, i do not care for, because i do not read what the other people scripted, i was sharing what i thought so deal with it. And anyhow this is a forum, so don't get all worked up over a couple lines of coding that resembled yours when it wasn't even an intentional Copy. |
|
|
| Report Abuse |
|
|
BetterBe
|
  |
| Joined: 25 Jan 2009 |
| Total Posts: 1034 |
|
|
| 05 Dec 2013 07:31 PM |
| also there is much of your code that is redundant and inefficient now that i look. at it. |
|
|
| Report Abuse |
|
|
|
| 05 Dec 2013 07:31 PM |
| I wasn't talking to you what made you think I was talking to you? I guess transIate isn't the only moron on this thread. |
|
|
| Report Abuse |
|
|
BetterBe
|
  |
| Joined: 25 Jan 2009 |
| Total Posts: 1034 |
|
|
| 05 Dec 2013 07:33 PM |
| like i said read above. your an alt that cant use the main account because your opinions make you look bad when you use primitive social skills such as this. |
|
|
| Report Abuse |
|
|
|
| 05 Dec 2013 07:37 PM |
| I didn't make this account to post on the forum I just wanted to help people and then you get butthurt. |
|
|
| Report Abuse |
|
|
BetterBe
|
  |
| Joined: 25 Jan 2009 |
| Total Posts: 1034 |
|
|
| 05 Dec 2013 07:41 PM |
| yes you do help people by making scripts, but i don't appreciate foul talk on the forum, and im pretty sure there are others as well. if you have a problem with someone just simply keep it in your head like they teach in K-5th grade. |
|
|
| Report Abuse |
|
|
kjh45
|
  |
| Joined: 15 Feb 2009 |
| Total Posts: 256 |
|
|
| 05 Dec 2013 07:43 PM |
| @Betterbe that script did not work. And no fighting please. |
|
|
| Report Abuse |
|
|
Madified
|
  |
| Joined: 19 Apr 2011 |
| Total Posts: 5292 |
|
| |
|
BetterBe
|
  |
| Joined: 25 Jan 2009 |
| Total Posts: 1034 |
|
| |
|
|
| 05 Dec 2013 07:59 PM |
@Better's script
Gui = script.Parent -- you forgot this.. Admins = {} for i, v in pairs(Admins) do if game.Players.LocalPlayer.Name == v then Gui.Visible = true break; else Gui.Visible = false end end |
|
|
| Report Abuse |
|
|
BetterBe
|
  |
| Joined: 25 Jan 2009 |
| Total Posts: 1034 |
|
|
| 05 Dec 2013 08:26 PM |
| i didnt forget it, i put Gui.Visible = false/true because Gui was implied that HE specified the GUI because i didnt know the hierarchy. |
|
|
| Report Abuse |
|
|
|
| 05 Dec 2013 08:30 PM |
Well he obviously doesn't know how to this though
So say, Put this in the gui |
|
|
| Report Abuse |
|
|
kjh45
|
  |
| Joined: 15 Feb 2009 |
| Total Posts: 256 |
|
|
| 05 Dec 2013 09:42 PM |
| I had put the correct hierarchy. |
|
|
| Report Abuse |
|
|