Basically, I have 2 questions
1.) How do I make it so that only Superadmins and above can see the admin tab
2.) How do I make a custom tab that is donor and above only?
Go to sh_config.lua in the pointshop addon and change line 20 to say false.
For the custom tab create a folder in with all the other categories called donor, then create a lua file in the folder called __category.lua. In that file put:
[CODE]CATEGORY.Name = 'Donor'
CATEGORY.Icon = 'heart'
CATEGORY.AllowUserGroups = { "donor", "admin" }[/CODE]
Put all of the ranks that are allowed to use it in AllowedUserGroups
[QUOTE=Blackout338;41791067]Go to sh_config.lua in the pointshop addon and change line 20 to say false.
For the custom tab create a folder in with all the other categories called donor, then create a lua file in the folder called __category.lua. In that file put:
[CODE]CATEGORY.Name = 'Donor'
CATEGORY.Icon = 'heart'
CATEGORY.AllowUserGroups = { "donor", "admin" }[/CODE]
Put all of the ranks that are allowed to use it in AllowedUserGroups[/QUOTE]
Here's my script: [lua]CATEGORY.Name = 'VIP'
CATEGORY.Icon = 'heart'
CATEGORY.AllowUserGroups = {"superdonor"}[/lua]
It is not working
What's the error?
It doesn't show up
Are you naming the script __category.lua? No caps?
Notice how the "superdonor" in this script is yellow, and the one you made is grey. I'm not sure if that means anything, but maybe it does.
[CODE]
CATEGORY.Name = 'VIP'
CATEGORY.Icon = 'heart'
CATEGORY.AllowUserGroups = { "superdonor" }
[/CODE]
Also make sure there are 2 underlines before category.lua.
So __ not _
Heya,
Your questions are answered fairly easily with some research.
Regarding the 'Admin tab':
You can change this simply by going into the configuration file and changing some values.
The Config file is situated in 'Addons/Pointshop/lua/sh_config'
This file contains a table with configurable values.
You'll find these two lines: ( Both True ( Enabled ) by default )
[CODE]PS.Config.AdminCanAccessAdminTab = true
PS.Config.SuperAdminCanAccessAdminTab = true[/CODE]
Simply change the first one to false and you're done, save the file and exit.
The info needed to create your own category is easily obtainable:
[URL="http://pointshop.burt0n.net"]http://pointshop.burt0n.net[/URL]
If you're the lazy type you can download a pre-made donator pack.
Just google; "Pointshop donator" either go to Youtube or garrysmod.org from there.
I also recommend you learn the basics of ( G )Lua.
This way you can edit/fix or even make your own additions to Garry's Mod without having to ask others for help.
I hope this sorts out your problems. ^ ^
Sorry, you need to Log In to post a reply to this thread.