Garry's Mod

Garry's Mod

50 ratings
Pointshop Banks, Shops and Item Gates
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Build, Roleplay
File Size
Posted
Updated
772.460 KB
1 Jun, 2017 @ 1:45am
23 Aug, 2020 @ 12:03am
15 Change Notes ( view )

Subscribe to download
Pointshop Banks, Shops and Item Gates

Description
Warning: This addon requries Pointshop 1 to be installed! It is incompatible with Pointshop 2.
Second Warning: The MySQL saving format is currently not supported by this addon!
This addon now also supports MySQL.

NOTE: If a typed/pasted model name has been mistakenly marked as 'Invalid', click on 'Verify Model' to do a server-side check.



New feature: Interfacer
- Allows for multiple shops to be accessed at once.



After 1000 hours of fiddling around in Garry's Mod, I have finally picked up the courage to start making my own addons.

This particular addon adds a Pointshop bank, a physical shop and an item gate/filter gate. Only admins may spawn shops and item gates.

These can be found in 'Entities' > 'Pointshop'. Press 'Use' (default 'E') to use any of the entities above.

The bank's saving methods are, in priority:
- based on the Pointshop sh_config's saving methods.
- stored into the server's BankStorage table.
- stored into the entity's BankStorage table.

Unlike Pointshop's shop UI, the physical shop has the ability to sell items that are admin only, unlisted or cannot be bought*. Please exercise caution when using it.

* To make an item that cannot be bought, add 'ITEM.CanPlayerBuy = false'.

The item gate/filter gate only allows users with a specified item equipped to pass.


This addon also adds some new console commands:

banks_reset [player]

- Only those who have access to the Admin tab can use it.
- Resets the bank account of [player]. If unspecified, ALL bank accounts will be reset.
- This cannot be undone. You have been warned.

banks_display [player]

- Shows the amount of cash they have in storage. Shows everyone's storage if omitted.

banks_display_adminonly [value]

- Serverside console-only command.
- Sets whether the above command:
- 0: can be accessed by anyone.
- 1: can be accessed by admins only.
- 2: can be accessed by superadmins only.
- 3: can't be accessed.

banks_add [player] [amount]

- Only those who have access to the Admin tab can use it.
- Adds [amount] to the bank account of [player].

banks_remove [player] [amount]
banks_subtract [player] [amount]

- Only those who have access to the Admin tab can use it.
- Substracts [amount] from the bank account of [player].

banks_set [player] [amount]

- Only those who have access to the Admin tab can use it.
- Sets the bank account of [player] to [amount].

banks_mysql_hostname [string]
banks_mysql_username [string]
banks_mysql_password [string]
banks_mysql_database [string]
banks_mysql_port [number]

- These convars only appear if you set MySQL as the data provider.
- Only the server console can read and store values into these convars.
- Sets the server address, username, password, database and port, respectively.
- A server restart is required for changes to take effect.



Please send me any suggestions to improve the UI. Any other suggestions/bug reports are also welcome, but don't expect me to perform and/or read all of them, as I am a really slow coder.

Thanks for reading, and have fun.

P.S.: The HUD seen in the screenshots is from Life Mod.
13 Comments
MattMX 22 Apr, 2020 @ 9:30pm 
Can you add custom itens
Piengineer12  [author] 6 Oct, 2018 @ 6:25am 
It's been a year, but I have finally added one last thing into this addon. I have no plans to further update this addon, aside from fixing bugs.
󠀡󠀡Thegreengab 1 Oct, 2018 @ 1:28pm 
Nice addon :D
Nihil 7 Sep, 2018 @ 7:54am 
Okay Thank's For Letting Me Know That It Does Work's On The Sandbox Gamemode :)
Piengineer12  [author] 7 Sep, 2018 @ 1:09am 
Of course it does, as long as the Pointshop 1 addon is subscribed to.
Nihil 4 Sep, 2018 @ 10:15am 
Does This Addon Work's On The Sandbox Gamemode?
₊˚.✩ Lushana ✩.˚ 20 Jul, 2018 @ 1:28am 
Thats fine i love this addon anyway
Piengineer12  [author] 13 May, 2018 @ 5:22am 
Unfortunately, I am rather busy nowadays dealing with life's problems. At worst, I won't be updating this addon for about six months from now. Sorry.
ahnok 6 Apr, 2018 @ 3:38am 
Thanks a lot. This addon is really something unique and deserves more recognition. Keep up the good work
Piengineer12  [author] 5 Apr, 2018 @ 11:58pm 
I'm afraid not with this setup. I'll see what I can do to the code, but it will take a while.