Ulysses
General => Developers Corner => Topic started by: NinjaRun09 on June 08, 2013, 06:24:49 PM
-
I am going to add some addons, but I don't want everybody using them. How can I make these sweps/props admin only?
-
Will depend on each addon.
http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexdd36.html for general lua code. *You'll need to learn a bit of lua to use it. Not overly difficult.
Sweps have a variable at the top of the file (or at least, should) that you enable/disable.*
SWEP.AdminSpawnable = true // Is the swep spawnable for admin
SWEP.Spawnable = false // Can everybody spawn this swep ? - If you want only admin keep this false and adminsapwnable true.
* = At least, up until Gmod12 they did...I have no idea if it changed in Gmod 13
-
Will depend on each addon.
http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexdd36.html for general lua code. *You'll need to learn a bit of lua to use it. Not overly difficult.
Sweps have a variable at the top of the file (or at least, should) that you enable/disable.*
SWEP.AdminSpawnable = true // Is the swep spawnable for admin
SWEP.Spawnable = false // Can everybody spawn this swep ? - If you want only admin keep this false and adminsapwnable true.
* = At least, up until Gmod12 they did...I have no idea if it changed in Gmod 13
So what should I use to edit the workshop files? Notepad++ good?
-
You can't edit workshop files without extracting them from their compressed format. If you do that you will no longer be able to update it with workshop.