gpScripts Docs
StoreDiscordYoutube
  • 📔gpScripts
  • Clothingshop
    • Installation
    • Developers
      • Client
  • 💰InsuranceSystem
    • Installation
    • Developers
      • Client
      • Server
  • 📲Businesscards
    • Installation
    • Developers
      • Events
  • 🛡️visumsystem
    • Installation
    • Developers
      • Commands
      • Exports
      • Events
    • Code Snippets
      • QB-Garages
  • ☎️Emergencyphone
    • Installation
    • Common mistakes
      • Common mistakes
    • Developer
      • Events
  • 💵Tax-System
    • Installation
      • Step 1 - SQL-File
      • Step 2 - [QB-Core] Changes
      • Step 3 - [ESX] Changes
      • Step 4 - Restart your server
      • Step 5 - Set first deduction date
    • Exclude inactive vehicles
    • Common mistakes
      • Common mistakes
    • Developer
      • Events
Powered by GitBook
On this page
  • 1. Download
  • 2. Framework adjustments
  • 3. Insert SQL
  • 4. Set configuration file
  • 5. Translate the Script
  • 6. Explanation of Config.js
  • 7. Change Logo for clothingshops

Was this helpful?

  1. Clothingshop

Installation

Installation Steps for gp_Clothingshop.

PreviousgpScriptsNextDevelopers

Last updated 7 months ago

Was this helpful?

Please go through each step carefully and allow enough time. Support tickets opened due to simple errors will be forwarded to the documentation.

1. Download

Download the latest version of the script from your .

2. Framework adjustments

a) Open qb-clothing/client/main.lua and insert this code snipped.

-- Exports for gp_Clothingshop
exports('SaveSkin', SaveSkin)
exports('ChangeVariation', ChangeVariation)
-- end of exports for gp_Clothingshop

b) Navigate to qb-clothing/config.lua Remove every shop you do not need in Config.Shops. Remove every wardrobe you dont need in Config.OutfitChangers. Remove every clothingroom you dont need in Config.ClothingRooms.

c) Restart your Server to apply the changes! Some Scripts have qb-clothing as dependency. So do not just restart the Script!

No Framework adjustments needed!

3. Insert SQL

# Insert SQL to your database

ALTER TABLE player_outfits
ADD outfitCode BIGINT,
ADD outfitCodePrice INT;

First of all, please check whether you have a user_clothes table. If this is NOT the case, please execute this SQL, which adds the corresponding table to your database.

# Only need if you DO NOT have a user_clothes table!

CREATE TABLE IF NOT EXISTS `user_clothes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `identifier` varchar(46) DEFAULT NULL,
  `name` varchar(60) DEFAULT NULL,
  `clothesData` longtext DEFAULT NULL,
  `outfitCode` bigint(20) DEFAULT NULL,
  `outfitCodePrice` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

If you have a user_clothes table then use the following SQL

# SQL if you already have a user_clothes table

ALTER TABLE user_clothes
ADD outfitCode BIGINT,
ADD outfitCodePrice INT;

Restart your server in order to apply database changes.

4. Set configuration file

Go through the gp_Clothingshop/configs/config.lua file step by step and adjust it to suit your needs. All points are described in the file and should be clear so far.

5. Translate the Script

The script must be translated at several points.

a) Translation of gp_Clothingshop/locales/de.lua or gp_Clothingshop/locales/en.lua or create a new one like the other ones.

b) Translation of gp_Clothingshop/locales/ui_translations.js This file contains one of two halves for the translation of the UI. Simply translate this file to your liking.

c) The second half of the UI translation must be translated in gp_Clothingshop/web/index.html. This file contains the basic structure of the UI. Translate the remaining parts.

6. Explanation of Config.js

You can create clothing stores in the in-game creator. There are 3 drop-down menus for the clothing categories, blacklist and clothing categories that can be hidden.

Here is a small excerpt of ClothingCategories.

ClothingCategories: {
    basic: {
        1: {
            name: 'helmet_1',
            label: 'Helmet',
            price: 100,
            defaultPerspective: 'head',
        },
        2: {
            name: 'glasses_1',
            label: 'Glasses',
            price: 100,
            defaultPerspective: 'head',
        }
    }
},

a) “basic” is the name of the setting.

b) The added categories must be numbered consecutively.

c) Each category must contain a name, label, price and defaultPerspective.

name
label
price
defaultPerspective

data typ

string

string

number

string or nil

info

The componentID of the clothing component.

Label what is displayed in the clothing store.

The price that is charged.

The camera setting that is set when the category is selected.

Example of a new Setting named "mask":

ClothingCategories: {
    basic: {
        1: {
            name: 'helmet_1',
            label: 'Helmet',
            price: 100,
            defaultPerspective: 'head',
        },
        2: {
            name: 'glasses_1',
            label: 'Glasses',
            price: 100,
            defaultPerspective: 'head',
        }
    },
    mask: {
        1: {
            name: 'mask_1',
            label: 'Masks',
            price: 250,
            defaultPerspective: 'head',
        }
    }
}

Here is a small excerpt of ClothingBlacklist.

ClothingBlacklist: {
    basic: {
        male: {
            tshirt_1: [10, 17, 21],
        },
        female: {
            tshirt_1: [18],
        },
    }
},

a) “basic” is the name of the setting.

b) Each setting must contain both “male” and “female”, even if it is empty.

c) The individual componentIDs can now be added. The numbers that are listed in black can simply be separated by a comma.

Example of a new Setting named "noCopClothing":

ClothingBlacklist: {
    basic: {
        male: {
            tshirt_1: [10, 17, 21],
        },
        female: {
            tshirt_1: [18],
        },
    },
    noCopClothing: {
        male: {
            tshirt_1: [71, 30, 90, 102],
            torso_1: [24, 68, 83]
        },
        female: {
            tshirt_1: [72, 29, 89, 103],
            torso_1: [19, 66, 53]
        },
    }
},

The setting for noCopClothing is just an example! The numbers and categories are randomly selected and are for demonstration purposes only!

Here is a small excerpt of CategoriesToHide.

CategoriesToHide: {
    basic: {
        1: {
            name: 'helmet_1',
        },
        2: {
            name: 'mask_1',
        },
    },
},

a) “basic” is the name of the setting.

b) The added categories must be numbered consecutively.

c) "name" is the componentID that should be able to be hidden.

Example of a new Setting named "noHelemt":

CategoriesToHide: {
    basic: {
        1: {
            name: 'helmet_1',
        },
        2: {
            name: 'mask_1',
        },
    },
    noHelemt: {
        1: {
            name: 'helmet_1',
        },
    }
},

7. Change Logo for clothingshops

The logo that is displayed in the clothing stores is located in gp_Clothingshop/configs as logo.png.

You can change the logo as you wish.

Just make sure that the name is exactly "logo.png"

It is quite possible that I have overlooked translations myself and they are still in the encrypted files. If this is the case, please open a ticket on my and I will take care of it. Thanks!

keymaster account
Support Discord