[Swiftly] Shop Core
A simple plugin for Swiftly that implements the core of a shop.Installation 👀
- Скачать последнюю .
- Перетащите всё из архива в папку addons/swiftly.
- Настройте подключение к базе данных в файле addons/swiftly/configs/databases.json с ключом shop, как в следующем примере:
Configuring the plugin 🧐
- После установки плагина вам нужно изменить префикс в файле addons/swiftly/configs/plugins (необязательно), а если хотите, вы можете изменить сообщения в файле addons/swiftly/translations.
- Чтобы в магазине были доступные для покупки предметы, вам нужно установить модули. Ознакомьтесь с этим списком модулей .
Shop Core Exports 🛠️
| 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 |

Requirements
Commands
sw_shop - Главное меню
sw_credits - Посмотреть свои кредиты
sw_items - Посмотреть купленные предметы (инвентарь)
sw_givecredits - Выдать кредиты игроку (только для администраторов)
sw_removecredits - Удалить кредиты у игрока (только для администраторов)