Skip to content

swiftly-solution/shop-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

SwiftlyLogo

[Swiftly] Shop Core

A simple plugin for Swiftly that implements the core of the shop.

Downloads Contributors Issues License


Installation ๐Ÿ‘€

  1. Download the newest release.
  2. Everything is drag & drop, so i think you can do it!
  3. Setup database connection in addons/swiftly/configs/databases.json with the key shop like in the following example:
{
  "shop": {
    "hostname": "...",
    "username": "...",
    "password": "...",
    "database": "...",
    "port": 3306
  }
}

(!) Don't forget to replace the ... with the actual values !!

Configuring the plugin ๐Ÿง

  • 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.

Shop Exports ๐Ÿ› ๏ธ

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

Creating A Pull Request ๐Ÿ˜ƒ

  1. Fork the Project
  2. Create your Feature Branch
  3. Commit your Changes
  4. Push to the Branch
  5. Open a Pull Request

Have ideas/Found bugs? ๐Ÿ’ก

Join Swiftly Discord Server and send a message in the topic from ๐Ÿ“•โ•Žplugins-sharing of this plugin!


About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages