Garry's Mod

Garry's Mod

Not enough ratings
M General Store
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: NPC
Addon Tags: Movie, Scenic
File Size
Posted
Updated
5.670 MB
13 Nov, 2021 @ 4:05pm
13 Nov, 2021 @ 8:53pm
2 Change Notes ( view )

Subscribe to download
M General Store

Description
(WARNING: I don't recommend using this, some of the code for the config menu was not written the best. I'm done scripting for gmod so I might as well post this. AGAIN, you probably should not use this for servers atm. But hey, if you wish to fix some of my code and stuff, be my guest. Just please message me as I would like to know, just because. But you probably wont do that....lol, anyways good luck...lol)

You can use it and it will work but expect a minor bug or 2, and if you can do some lua stuff, you can probably find a fix! GOOD LUCK

Here are the pictures:
https://imgur.com/a/FcwWoGo

Github:
https://github.com/Matthew-Cool/m_gen_store/tree/main

Also if you see gmod store stuff, ye long story short I suck a lot, so you probably should not use this....haha rip kms :(

Features:
  • Endless config
    A small amount of non-in-game config options.
    In-game config for almost all settings and making shop items.
    A large theme config to change colors, sounds, icons, etc.
  • VIP Discount
  • VIP Exclusive Items
  • CP/Govt Discount
  • Supports weapons, entities (ex: ammo), health, and armor!
  • Customizable icons (exit, rob menu, etc.)
  • Robbery Features:
    Cooldown
    Only rob 1 store at a time (can be changed)
    Robbery amount
    Robbery Time
    Distance Warning to the robber
    A custom-built CP/govt notification
    Amount of CP/Govt online so players can rob
    CP/Govt Kill Reward
    VIP Rob Bonus Money
    Custom Robbery Alarm and CP Notification Sound
    Robbery Menu has a quick close; just press any button on the keyboard to close the menu quickly.
  • Store Item Features:
    Model
    Description if enabled
    Categories
    Max HP/Armor
  • Console Commands:
    Save
    Spawn
    Clear
  • Event Lock (user groups can be changed for event staff)
  • Admin Control Menu to use console commands
  • Theme Config (What can you change/edit)
    Overhead
    Menu colors etc.
    Notifications
    Item Panel Colors
    NPC Model
    Sounds
    Icons (ones in the content pack, I was going to do imgur but I'm not doing gmod anymore.)
  • Random Spawns
    This can be enabled in the config. If you do this you can select how many npc's spawn out of the ones that were saved by the save command. They will not repeat.

Content is here: https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2515922328
(Auto download option available in config)

How to install:
Take the folder and drop it into your server addon folder. In-game config settings will be automatically made when restarting the server. Again tho, read the warning below.

(WARNING: I don't recommend using this, some of the code for the config menu was not written the best. I'm done scripting for gmod so I might as well post this. AGAIN, you probably should not use this for servers atm. But hey, if you wish to fix some of my code and stuff, be my guest. Just please message me as I would like to know, just because. But you probably wont do that....lol, anyways good luck...lol)

If you want to get in contact with me, please message me on discord at Matthew#2139 and mention its about this, thanks! :)
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