A simple plugin for Swiftly that implements the core of the shop.
- Download the newest release.
- Everything is drag & drop, so i think you can do it!
- Setup database connection in
addons/swiftly/configs/databases.jsonwith the keyshoplike in the following example:
{
"shop": {
"hostname": "...",
"username": "...",
"password": "...",
"database": "...",
"port": 3306
}
}(!) Don't forget to replace the ... with the actual values !!
- After installing the plugin, you should change the default prefix from
addons/swiftly/configs/plugins/shop/core.json(optional) - In order to have items to buy in shop, you need to install modules. Check out this list of modules.
The following exports are available:
| Name | Arguments | Description |
|---|---|---|
| RegisterItems | category_id, category_title_translation, category_items, only_one_item_equipable | Registers a new item |
| UnregisterItems | category_id | Unregisters an item |
| GetCredits | playerid | Get the credits of a player |
| GiveCredits | playerid, credits | Give credits to a player |
| RemoveCredits | playerid, credits | Remove credits from a player |
| GiveItem | playerid, itemid, shouldRemoveCredits | Gives an item to a player |
| RemoveItem | playerid, itemid, shouldRemoveCredits | Removes an item from a player |
| ToggleEquipState | playerid, itemid, state | Toggles the equip state for a player |
| HasItemEquipped | playerid, itemid | Returns the equip state of a player |
| GetItemsFromCategory | playerid, category_id | Gets all items from a category |
- Fork the Project
- Create your Feature Branch
- Commit your Changes
- Push to the Branch
- Open a Pull Request
Join Swiftly Discord Server and send a message in the topic from ๐โplugins-sharing of this plugin!