Making a derma only viewable by admins

I completely forgot how to do this…

Make a derma menu only openable if you are a admin ( if ply:IsAdmin()) then … ?

Simple, I just forgot.

[lua]
function OpenMenu(pl)
if pl:IsAdmin() then
– Derma stuff
end
end
concommand.Add(“open_menu”,OpenMenu)[/lua]

Like that?

What the fuck. I think i have lua virus, I have been doing that, I get errors, Same with anything, It will do random errors. Something isn’t right. I usually know this shit. Schumacher is angry now.

Is it in shared? If so, make sure it’s client-only

No i forgot i was making a lua file to stop my brother from downloading anything with lua in it, Left it on my gmod. Lmfao, Fail!

You could add this in the client menu function (derma code)…

[lua]
if !LocalPlayer():IsAdmin() then return end
[/lua]

I already did that mate, Last night. Thanks though!