Garry's Mod

Garry's Mod

M General Store
7 Comments
MaTth3w  [author] 30 Dec, 2021 @ 6:55pm 
Well adding inv support shouldn't be too difficult. However adding the other 2 would probably require a rework/rewrite of quite a bit of code. I would suggest at least have experience of coding your own addon. But again, the config menu code was not written the best and will probably take a bit of understanding.
okuphelele 30 Dec, 2021 @ 6:44pm 
What would it take for me to create the two features? And how much coding experience do I need exactly?
MaTth3w  [author] 30 Dec, 2021 @ 6:39pm 
Sadly those 2 features are not available in this addon. And bc I'm done with gmod in general it's unlikely I will add those features. Also if you have a some coding experience you can change it from spawning besides them to adding it directly to their inv. (depending on what inv your using).
okuphelele 30 Dec, 2021 @ 10:49am 
I found the admin menu. Your addon is great because it does not require a specific inventory system to function (only the items spawn next to the npc which is confusing). And there is a robbing feature. There are a couple things that I have been wanting to do with this but am not sure how to:

1. Create stores that have their own individual data and sell different things
Ex.) a grocery store, 7/11, furniture store... all with different items.
2. Create a store that sells only to a specific job.
Ex.) a police weapon dealer
MaTth3w  [author] 30 Dec, 2021 @ 10:30am 
you will need to go into the config settings located in the folder lua / gen_store_config / config.lua (remember this is an addon for servers, look at how to install above for help) and add the user groups you want to access the config menu. For example:

GEN_STORE.Admins = {
["superadmin"] = true,
["admin"] = false,
["eventteam"] = false
}

and add a usergroup like manager or head admin and set to true.

GEN_STORE.Admins = {
["superadmin"] = true,
["admin"] = false,
["eventteam"] = false,
["headadmin"] = true
}

Once you do that, restart the server and you can access the menu with that usergroup through the store menu and the top left.

I hope this helps, if you have more questions, feel free to ask.
okuphelele 29 Dec, 2021 @ 4:58pm 
how do you open the in-game shop config?
MaTth3w  [author] 13 Nov, 2021 @ 9:08pm 
That was a mistake