Garry's Mod

Garry's Mod

Sandbox Weapon Shop and Money System
180 Comments
RoShamBo 25 Aug @ 3:31am 
Thank you!
Famous5000  [author] 25 Aug @ 2:59am 
@RoShamBo
Should be possible inside of the configuration menu, right-click the weapon and hit delete. Not entirely certain on categories, but if it isn't automatically deleted on last weapon going missing, pretty sure it's the same deal. Don't remember if it happens automatically or not.
RoShamBo 25 Aug @ 2:57am 
Any way to remove weapons or weapon categories?
Famous5000  [author] 23 Aug @ 5:25pm 
@Nukl3ar
Steam problem. Delete the mod locally, validate files, and then relaunch the game.
Nukl3ar 23 Aug @ 5:23pm 
When I go to options there is nothing under WeShop Admin or Client. It used to work before though.
Famous5000  [author] 16 Aug @ 2:31am 
@The Bird 6053

The armor/health systems depend on what your *max health* is set to via the gamemode or other means. Though in every single addon I've seen with armor stuff, the max has been 255. Take that with a grain of salt though.

If you want an addon which can adjust your max health, consider ULX.
The Bird 6053 15 Aug @ 3:06pm 
Is there a way to make the HP/Armor in the shop be uncapped? (so you can buy more even if you have over 100 HP/Armor) If not then that'll probably be a cool thing to add as an option.
Famous5000  [author] 14 Aug @ 4:56am 
@hl267
The ammo limiter is set to what you set the max ammo you can purchase.

And yes that is a planned feature but with me not doing programming for a while you'll need to either apply a pull request to implement it yourself or wait for someone else to do it, or for me to return to programming work.
hl267 14 Aug @ 2:03am 
It looks like the ammo maximum capacity was limited to the half life 2. Is there anyway we can disable it?
Famous5000  [author] 9 Aug @ 6:26pm 
And yes it does say the addon *will not work* in Sandbox. It won't, but the entities it provides will still be spawnable. Which is enough for the printers I provided.
Famous5000  [author] 9 Aug @ 6:26pm 
@Anny the Nerd Vaporeon

Try this for the entities that the printers require: https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=874053982&searchtext=printer

Spawn the stamps, the individual printer upgrades, and the tray. The paper entity is *not* used.
Anny the Nerd Vaporeon 9 Aug @ 12:49pm 
Well, I tried everything but I can't get the printer to recognize the paper or the water.

I made custom entities, it didn't work, I tried using just props, it didn't work either.

I don't know what to do and I'll probably just give up on the idea and go back to just messing around with the standard sandbox with NPC battles.
Anny the Nerd Vaporeon 9 Aug @ 11:39am 
@Famous5000

Do I need to create the entities or nah just use some props? bc i don't understand LITERALLY ANYTHING.
Famous5000  [author] 9 Aug @ 2:29am 
@Anny the Nerd Vaporen

You'd need to find where GMOD Blueprints stores its file and then put the files you downloaded into that folder.

@infernal

No, nor is it planned.
infernal 8 Aug @ 12:14pm 
compat with nmoney?
Anny the Nerd Vaporeon 8 Aug @ 11:49am 
I still don't understand how to import or modify them. When I download the files, they only contain random letters in no particular order.
Anny the Nerd Vaporeon 8 Aug @ 7:35am 
@Famous5000

Thank you very much, that will be very helpful. Just one question, I have never imported anything before, so I don't know how to do it.
Famous5000  [author] 7 Aug @ 5:41pm 
@Anny the Nerd Vaporeon

Grab GMOD Blueprint, then look in here for a couple of examples of money printers I've set up.

First one prints money packets over 4 kills, second one is over time as long as you feed it the entities it requires. You can edit them yourself once you download them and import them.

https://drive.google.com/drive/folders/12f4RBSw7EwpZPNOwZ1zYlYl0Lh1w6leI?usp=drive_link
Anny the Nerd Vaporeon 7 Aug @ 12:22pm 
I was wondering if there is a mod or if it is possible to create a mod that does the same thing as a “money printer” or “money generator.” (Sorry if this is a bit silly or stupid, but I can't find any mods that recreate the money mechanics of darkRP.)

(I was trying to make a darkRP server, but it kept crashing or corrupting the mod, so I had to use this add-on in the sandbox that I had been using for a long time on my sandbox server.)
meierhans 2 Aug @ 6:10am 
Thanks! I will post bugs and suggestions directly on Github from now on, until further notice.
If you want to see you addon in full action, you can always visit Gibhaus Lambda Campaign server. Tuned prices and rewards quite a bit until mechanics felt right. Now you have to grind for a while until you can afford one of the better weapons. And dying costs 33%, so it really hurts. Scales so much better for different player counts than regular HL2. Would not be possible without this addon!
Famous5000  [author] 31 Jul @ 2:45am 
Sorry, not trello, Github.
Famous5000  [author] 31 Jul @ 2:45am 
@meierhans
I'll add those suggestions to the trello for the future.
meierhans 30 Jul @ 4:53am 
@Famous5000 Oh shit, sorry for annoying you! Possible I red this before you added it?

I tried to contact the dev of smooth pickup, sadly he has comments disabled on his addon. Maybe you could just make the money nocollide with player?

And, one more request: On my modded HL2 Coop server, I would like to limited to amount of weapons per slot. But HL2 itself uses two weapons per slot. Could you make a convar, that allows the maximum weapons per slot?
NexTnTMa5ter 28 Jul @ 2:36pm 
if anyone wonding how to hotkey the shop is ( bind x wblbuy )
Famous5000  [author] 27 Jul @ 2:08pm 
I can't believe I need to state this but read the top freaking section of this addon's description .
Famous5000  [author] 27 Jul @ 12:23am 
@meierhans
If you look at the pinned issue on the Github, NPCs are a very mixed bag with spawning, it is a known issue, and it is not planned to be worked on at the moment by me. If it works, great, if it doesn't work, not officially supported by the addon, unfortunately.

There is a way to bypass this by making your own scripted entity [SENT] and having the thing spawn that instead. This way that SENT can then create the respective NPC with the correct weapons and that will make it functional. GMOD Blueprints is a great example for this. I've already linked it before so it shouldn't be hard to find, but, unfortunately that is not something I will be supporting for now.
meierhans 27 Jul @ 12:20am 
Ah, before I forget, something else. I use the Smooth Pickup addon that recently came up. Money will not work for this, in contrast it will even have physics, trying to pick up a larger amount will result in jittery shake for player. Better to ask Smooth Pickup dev for this?
meierhans 27 Jul @ 12:18am 
I run your addon on my coop server, it is a great help to balance out single player campaign maps for multiple player. No more people coming first eating up all the goodies, you kill, you buy.

I recently started to add NPCs to my shop, which you can either make follow you by pressing E on them, or just use buddy mod to fully command them. Sadly I noticed that most of them will not spawn with their default weapon. Actually most spawn without any weapon at all. Could this be fixed without to much effort? Willing to switch to beta if needed.

If you want to take a look, you find the server under "Half Life 2 Campaign" gamemode, it is called Gibhaus Lambda.

best!
NexTnTMa5ter 26 Jul @ 1:22pm 
it will not give me money on kills i messed round in the setting and its not fixing it
radBitch28 21 Jul @ 1:41pm 
It uses props. That's why I like it.
Famous5000  [author] 21 Jul @ 1:02pm 
That is indeed correct.

Also I wasn't aware of that crafting system. Yeah I was aware of `WeShop` because I took over it but I wasn't aware of the crafting system.

I'd make sure that the system you linked supports using entities instead of props for ingredients.
radBitch28 20 Jul @ 10:17pm 
I'll look into that blueprint thing sometime. You're saying I can use it to create entities out of props, and I'd be able to spawn those entities from this mod's shop feature? If that's true that would be really useful.
radBitch28 20 Jul @ 10:10pm 
Apologies, I assumed you had worked on this mod because you and its author have worked together on others.
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3516448778
Famous5000  [author] 20 Jul @ 10:08pm 
Huh? Crafting system? I don't think I ever created a crafting system. You might be thinking of JMOD...

And if you do decide you want to go that route, I strongly suggest you try out GMOD Blueprints as from there you can actually set up custom entity names, and even hide them from the spawn menu/make them admin only so players can't spawn them in, as well as coding custom behavior for it. Link for that is here: https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=1986113409&searchtext=Blueprint
radBitch28 20 Jul @ 10:05pm 
To be used in conjunction with your crafting system. I wanted to make a certain prop which is marked as a crafting material to be buyable from the store while it is restricted from the spawnmenu so that it is only available through exchanging WeMoney, meaning the player would need to kill an NPC or complete a crafting recipe that produces WeMoney in order to acquire that particular crafting material.
Famous5000  [author] 20 Jul @ 10:02pm 
*Props are NOT entities.*

Their class name is prop_physics, and require their model to be set. I don't think coding in prop spawning is going to be a wise idea, since players can already do that via the spawnmenu, unless you set up other systems to prevent that.
radBitch28 20 Jul @ 3:38pm 
I want to make certain props from the spawnmenu buyable in the store, is there a way to do that? I tried adding them as entities but when I buy them they don't appear.
H E I S E N B U R G 20 Jul @ 2:27pm 
Sounds great take your time
Famous5000  [author] 20 Jul @ 11:41am 
OK, I'll add that as a suggestion for this via the Github, I may not get to it soon though.
H E I S E N B U R G 19 Jul @ 11:41pm 
yes I feel that would make a nice addition to the mod
Famous5000  [author] 19 Jul @ 8:20pm 
so...

you want the money generation to also go to the DarkRP money? Or just the shop? I might be able to make both happen as separate toggles but...
H E I S E N B U R G 18 Jul @ 8:48am 
Make it so there's a toggle in the options so you can use darkRP money instead of the mod currency
Famous5000  [author] 17 Jul @ 2:52pm 
@LAUNDROMATSKI
adding a command to transfer money should be doable, I'll see what I can do.
@H E I S E N B U R G
What would you even want in a DarkRP port of this addon?
H E I S E N B U R G 17 Jul @ 12:21pm 
pls make darkRP version I know its prob a lot of work but it would be even better in the end
radBitch28 16 Jul @ 7:05pm 
Are you considering adding an option to direct transfer money to other players or making it possible to drop currency?
Famous5000  [author] 15 Jul @ 9:14pm 
If however the three of you (@hes_madyes, @Uniresta, and @Gentleman Pyro Gaming) are still paying attention here and are still having issues, you *may* want to try the following:

1. Shut down steam (you'll want to copy these steps before you do)
2. Delete all folders within steamapps/common/GarrysMod/garrysmod/addons
3. Start up steam, then validate the files on Garry's Mod if it doesn't immediately start a download
4. Make absolutely sure that you are subscribed to either this addon OR the BETA branch. Do not subscribe to both.
5. Launch the game, and try accessing the admin options again.

If you still cannot access the admin options due to the category being empty, I will need you to create a Github report (the link to the Github is right under the UNSTABLE BRANCH warning), detail everything you have done, including a screenshot of the issue, and if you encountered any Lua errors, post those as well.
Famous5000  [author] 15 Jul @ 8:53pm 
OK I cannot replicate the issue the three of you are encountering. I am using the workshop version of the BETA branch.

Which should not have anything different since both are synced to the latest Github version.

If you can give me the Lua errors that you are encountering, I can put up a report on the Github and try to figure out what in my code could be causing it.
Famous5000  [author] 15 Jul @ 8:45pm 
what

OK. I'm going to investigate. Standby...
Gentleman Pyro Gaming 14 Jul @ 10:44am 
Yeah not to copy what Uniresta and hes_madyes said, but I'm having there issue on top of another one, the buy option and sell options, both of them just give out LUA errors.
Famous5000  [author] 11 Jul @ 8:19pm 
Unfortunately Steam is likely to blame for the missing options. As it works just fine with my setup.

If I get another report of it I will start doing extra testing to see if the server I run with this still works or not. But nothing should have changed, so everything should still be functioning...