Is it possible to make it so that on a PropetySheet, only admins can see a tab?

Does anyone possibly know how I could make it so that only administrators could view certain tabs in a “DPropertySheet”? Like I have some that I want normal users to see, but then I have one that I want only administrators to see. Could anybody possibly help me?

Try checking to see which group the player is in, if they are a normal player draw everything except that tab, if they are an admin draw everything including that tab.

I would say just give it a try and if you can’t get it to work show us what you got so far.

When you’re making the menu, just say

[lua]if LocalPlayer():IsAdmin() then sheet:AddSheet(args); end[/lua]

It appears if you’re an administrator or not when I do it, this is that are of the code:

if LocalPlayer():IsAdmin() then
    PropertySheet:AddSheet("Administration", SheetItemSix, "gui/silkicons/application_view_detail", false, false, "blah blah blah" )

When I created it I referenced off this. So I’m not sure what the “false, false” are.

Also, may I ask you how you did that syntax thing with your post? I tried to quote it but it doesn’t pop up saying it. :S

What I would do is something like
[lua]if LocalPlayer():IsAdmin() then
Code for the stuff on the PropertySheet
Message saying you are not admin that shows instead of all the buttons n stuff.

For some reason any of the things I use it keeps making it so administrators and non-administrators can see it.

I added you on Steam.

Garry broke IsAdmin() and IsSuperAdmin() on the client in the last update.

] lua_run_cl for k,v in pairs(player.GetAll()) do print(v:Nick(),v:IsSuperAdmin()) end
Bot01 false
-=SiN=- Cuber true
Seems to work fine

I think he means just on the client. Unless that code you put is on the client Cubar, then I don’t know. Because it works fine saying text when I come on, but on the client it’s broken.

IsAdmin works perfectly fine.

Not on the client sided parts.

Anyways, I switched my steam folders on hard drives, and I lost everything, so I’m going to restart the game mode.

The two falses on the AddSheet function are just Booleans saying if its true then you can stretch the box on the x / y axis. First one is X second one is Y

Oh, okay! Thanks a lot for that! So if they were set to true the person could change the size of that box pretty much?

lua_run_cl = client

Yes, precisely.

Well, thanks. That’s the only thing I don’t like about Lua so far, there’s so many like, unexplained (in a way) things lol

It was in the wiki good sir, here is the link.

Oh, I feel dumb. I’ve never checked that top Syntax bar.

This code won’t work anyway.

There will be a blank panel just floating, use this instead:

[lua]if LocalPlayer():IsAdmin() then
PropertySheet:AddSheet(“Administration”, SheetItemSix, “gui/silkicons/application_view_detail”, false, false, “blah blah blah” )