Shop System + API
Version 0.0.1
by Exolent
Introduction
This is an advanced management plugin for a Shop menu that is highly extensive.
It allows coders to build a quick and easy shop menu that is customized to their needs.
- shop_menu_title <title>
- The title of the shop menu that is displayed to players
- Use "{$money}" to be replaced with the player's actual money
- Color codes and new lines are supported
- The default color for the title is yellow
- Default: "Shop Menu^nwYou have y{$money}"
- shop_chat_tag <tag>
- The prefix before any message in the chat shown from the Shop plugin
- Do not include the space in the tag
- Default: "[SHOP]"
- shop_spawn_menu <0|1>
- Shows the shop menu every time you spawn
- 0 = Disabled
- 1 = Enabled
- Default: 0
- say /shop
- Opens up the shop menu
- AMX Mod X version 1.8.1 or higher
You will need to compile this plugin locally with the shop.inc include file.
Once compiled, install the .amxx file like any other plugin.
If you have any chat plugins (color chat, chat tag, etc.) make sure
they are below this plugin in the plugins.ini, or else "/shop" command will not work.
See the shop.inc file for all API documentation.
See attached plugins for examples on using the API.
What you can do:
- Easily add items to the menu, all you have to do is make the items work!
- Force players to open the menu
- Override the shop plugin from using CS money to use your own system (point system plugin, unlimited money, etc.)
There are cvars generated for every item in the menu:
- shop_item_(name)_enabled <0|1>
- Determines whether an item is enabled at all in the menu
- 0 = Disabled (hidden from menu)
- 1 = Enabled
- Default: 1
- shop_item_(name)_cost <cost>
- The cost of an item in the menu
- 0 = No cost is shown in the menu
- Default: (dependent on plugin)
- shop_item_(name)_team <team>
- List of teams that can use this item
- 0 = All teams
- 1 = Terrorists
- 2 = Counter-Terrorists
- 3 = Spectators
- You can combine 1-3 with commas (eg. "1,3") to exclude 1 team
- Default: (dependent on plugin)
- shop_item_(name)_delay <seconds>
- Delay in seconds between usages of an item
- 0 = No delay
- (-1) = Once per round
- Default: (dependent on plugin)
0.0.1
- Initial release
All example plugins are not going to be updated and are only there for examples.
Any features you may want added (do not ask for items to be made) will be considered and, if reasonable, will be made.
This is not the place to ask for items to be made. Make a topic in Suggestions/Requests.
Attached Files






Wyświetl pełny artykuł