[Alpha] Clothing Shops v0.2 (Last update: 05/26)

FiveM Clothing Shops (ALPHA)

Hi guys, this my very first Lua script, I hope it will be useful and it will help you in your development !

This is an addon that creates clothing shops (even more) and it allows you to edit your character, it was created for Roleplay Servers.

Download (Github repository): https://github.com/xchopin/clothing_shop

CHANGELOG

2017-05-25
- Caution: CHANGED FOLDER NAME
- Added multi-language support (US/FR)
- Added notifications on buying

  • Now, if you don’t buy clothes it doesn’t stay after leaving the shop
    2017-05-25
    -Added new SQL file for those who get in trouble with Foreign Keys

Features

  • Load skin on spawn/death
  • Fast loading
  • Try clothes before to buy them
  • Multi-language support (US/FR for now)
  • Buy new clothes (it will also update in your DBMS)
  • Blips on the map
  • Marker in shops
  • Elegant menu
  • A lot of accessories
  • Choice of the gender
  • Legacy function (in tribute of skin_customization) for a compatibility with old mods like FiveM_Cops
    ( that means skin_customization can be uninstall )

ToDo

  • Payment
  • Remove a cloth
  • More events for developers

Getting Started

1. Clone the repository

$ git clone https://github.com/xchopin/FiveM_ClothingShop.git

2. Import the SQL file into your DBMS

$ mysql> ./install.sql # or ./ugly_install.sql if you get in trouble with foreign keys

3. Create your settings file (and fill the fields)

$ cp Server/settings.lua.dist settings.lua

4. Add the dependency to your .yml

Common Issue

Linq Error: download the latest version of FiveM Server

Gameplay

  • In a special menu, press right or left arrow to change the texture
  • Press Enter or ‘A’ (Xbox) to save your choice (it will save in the database)

The floor is open to questions if needed , however I am sorry but I am not gonna teach UNIX commands for those who don’t know, please READ the Readme and try to understand what the steps mean.

Thank you

11 Likes

What do you mean by these? - Thanks for the release :wink: always good to see more people contributing.

Hi, thank you! In fact I would like to add Events for setter and getter functions on components (such as getFace or setBody that could get called from another script, it might update the database by using these events)

Removing a cloth would mean for example, taking off a jacket or glasses.

1 Like

It does not work with msql?

It’s me or the menu.lua file got an error ? :slight_smile:

Didn’t try, I added a CONSTRAINT, I don’t know how MSQL deals with it

It would be cool to do it also for msql, because the sa does not go

Awh but it’s MySQL I thought you were talking about Microsoft SQL. It’s written that MySQL is supported.

does your identifier in the users table have the same structure as in user_clothes ? Else delete the constraint but it’s not really nice to skip foreign keys.

I do not understand what you meant to say you had an example?

If the constraint is the problem you have two choices:

  • check on stackoverflow why your DBMS is yelling
  • delete the foreign key in install.sq

Btw are you using Essential Mode ?

Ok thanks for the help, but if i remove the constraint it is likely to have what?

In fact if you delete an user it won’t delete its clothes automatically. To sum it up quickly, it’s a basic security stuff

Ok okay yes it’s disturbing :confused:

Any plans for couchDB support? :confused:

If someone wants to help why not

Hey dude nice script!

Does this overwrite the “skin_customization” DB?

1 Like

Yes , and it’s compatible with old mods

1 Like

Amazing dude!

How does one fix this issue thou?

https://gyazo.com/b6d8d30416fca744f46898850d717e35

<3

Check if your identifier column in the users table has the same structure as in user_clothes (I guess I wrote varchar 255 , I am on my phone right now) if you really don’t find, remove the contrainst for now

Mine says this:
https://gyazo.com/e4032110add8c269ea647f057b7ab7ec

Do i change your .sql dump to the same value?
Or do i change the identifier to 255?