Garry's Mod

Garry's Mod

50 个评价
Pointshop Banks, Shops and Item Gates
   
奖励
收藏
已收藏
取消收藏
素材类型: 插件
插件类型: 工具
插件标签: 建筑, 角色扮演
文件大小
发表于
更新日期
772.460 KB
2017 年 6 月 1 日 上午 1:45
2020 年 8 月 23 日 上午 12:03
15 项改动说明 ( 查看 )

订阅以下载
Pointshop Banks, Shops and Item Gates

描述
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 条留言
MattMX 2020 年 4 月 22 日 下午 9:30 
Can you add custom itens
Piengineer12  [作者] 2018 年 10 月 6 日 上午 6:25 
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 2018 年 10 月 1 日 下午 1:28 
Nice addon :D
Nihil 2018 年 9 月 7 日 上午 7:54 
Okay Thank's For Letting Me Know That It Does Work's On The Sandbox Gamemode :)
Piengineer12  [作者] 2018 年 9 月 7 日 上午 1:09 
Of course it does, as long as the Pointshop 1 addon is subscribed to.
Nihil 2018 年 9 月 4 日 上午 10:15 
Does This Addon Work's On The Sandbox Gamemode?
₊˚.♡ Mizuki ♡.˚₊ 2018 年 7 月 20 日 上午 1:28 
Thats fine i love this addon anyway
Piengineer12  [作者] 2018 年 5 月 13 日 上午 5:22 
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 2018 年 4 月 6 日 上午 3:38 
Thanks a lot. This addon is really something unique and deserves more recognition. Keep up the good work
Piengineer12  [作者] 2018 年 4 月 5 日 下午 11:58 
I'm afraid not with this setup. I'll see what I can do to the code, but it will take a while.