Hello! How I can hide line AddOption "4" in menu from vip, user etc? Can see only admin, operator etc.
menu:AddOption("1", function()
pl:ShowProfile()
end):SetIcon("icon16/page_copy.png")
menu:AddOption("2", function()
pl:ShowProfile()
end):SetIcon("icon16/page_copy.png")
menu:AddOption("3", function()
pl:ShowProfile()
end):SetIcon("icon16/page_copy.png")
menu:AddOption("4", function()
pl:ShowProfile()
end):SetIcon("icon16/page_copy.png")
Thank u!
Player/IsAdmin
Player/IsSuperAdmin
in an if statement?
local vipGroups = {"vip", "anothervip"} -- vip group names
if table.HasValue(vipGroups, LocalPlayer():GetUserGroup()) then
menu:AddOption("4", function()
pl:ShowProfile()
end):SetIcon("icon16/page_copy.png")
end
Please, no table.HasValue, at least in this case.
use
{
vip=true,
anothervip=true,
}
if vipGroups[LocalPlayer():GetUserGroup()]
Both are fine, it is clientside after all.
Tables
Sorry, you need to Log In to post a reply to this thread.