Jump to content

Clothing Shops 1.0.0

   (7 reviews)

1 Screenshot

About This File

This script lets you create your own clothing shop(s) with JSON files.

 

Installing

  • Put the files you downloaded in their respective places
  • Download & install NativeUI if you haven't yet, this script needs it
  • (Only if you're going to have paid items) Download & install Currency API then define a currency named cash.
  • Add require('clothing-shops') to client_packages/index.js
  • Set up some clothing shops (read below)
  • All done

 

Setting Up Shops

Shop data is loaded from packages/clothing-shops/shops, any JSON file there will be treated as a clothing shop. Shop file structure:

{
    // OPTIONAL, this object will be the menu banner sprite on clientside. Search for "shopui_title_" on https://wiki.rage.mp/index.php?title=Textures
    "bannerSprite": {
        "library": "shopui_title_highendfashion",
        "texture": "shopui_title_highendfashion"
    },

    // REQUIRED, this array contains the shop coordinates
    "shops": [
        { "x": 123.4, "y": 456.7, "z": 8.9 },
        { "x": 10.0, "y": 20.0, "z": 30.0 }
    ],

    // REQUIRED, this object contains item data for freemode male model
    "male": {

        // REQUIRED, this object contains all clothing item data
        "clothes": {

            // REQUIRED, this array contains item data for a component slot (https://wiki.rage.mp/index.php?title=Clothes - we're using 11 - tops here)
            "11": [
                // REQUIRED, item object(s) for component slot 11
                { "name": "Blue Burger Shot Hockey Shirt", "drawable": 282, "texture": 0 },

                // This item will need the player to have some money (handled with Currency API)
                { "name": "Blue Cluckin' Bell Hockey Shirt", "drawable": 282, "texture": 4, "price": 500 }
            ]

        },

        // REQUIRED, this property contains all prop item data (we're not gonna add any props to freemode male here, so it's just an empty object)
        "props": {}
    },

    // REQUIRED, this object contains item data for freemode female model
    "female": {

        // This time we're not adding any clothes
        "clothes": {},

        // But we're adding props
        "props": {

            // Same as above, prop slot as key (we're using 7 - bracelets)
            "7": [
                // Prop items are defined just like clothing items
                { "name": "Gold Snake Cuff", "drawable": 0, "texture": 0, "price": 200 },
                { "name": "Light Wrist Chain (R)", "drawable": 7, "texture": 0 },
                { "name": "Spiked Gauntlet (R)", "drawable": 13, "texture": 0, "price": 85 }
            ]
        }
    }
}

If this wasn't any clear, there is a file named ExampleShopFile.json inside packages/clothing-shops/. (it's the file used in the preview video, put it to shops folder if you want to load it)

I'd also recommend you to check out my "Clothing Names" resource for valid names.

Source code is available on GitHub in case you don't want to download: https://github.com/root-cause/ragemp-clothing-shops

  • Like 4

User Feedback

Create an account or sign in to leave a review

You need to be a member in order to leave a review

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Peyman

   2 of 4 members found this review helpful 2 / 4 members

Thank you so much

Link to review
SotaRex

   1 of 3 members found this review helpful 1 / 3 members

Is there a Way to save the Clothes of the Player, when i restart the Server ?

Link to review
JamesBeast

   1 of 3 members found this review helpful 1 / 3 members

thanks🤗 men👳‍♂️, got my clothes👕 shopped🛒

👕👕👕👕

🛒🛒🛒🛒

  • Like 1
Link to review
Captien

   1 of 4 members found this review helpful 1 / 4 members

root rp server when

Link to review
Filosaff

   0 of 6 members found this review helpful 0 / 6 members

why you eto vysral?

Link to review
ConnorGuy

  

Thanks this was great but I didn't use it as a clothes shop I turned this code in to a cashmachine system.

Link to review
×
×
  • Create New...