Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds functions for adding new CJ clothing files #4050

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

W3lac3
Copy link
Contributor

@W3lac3 W3lac3 commented Feb 22, 2025

This feature will allow you to add new clothing files (TXD/DFF) without replace existing ones.

Example of use:

local dff = engineLoadDFF("assets/models/shirts/shirt_model_1.dff")
local txd = engineLoadTXD("assets/models/shirts/shirt_model_1.txd")

engineAddClothingModel(dff, "shirt_model_1.dff")
engineAddClothingTXD(txd, "shirt_model_1.txd")
addClothingModel("shirt_model_1", "shirt_model_1", 0)

addPedClothes(localPlayer, "shirt_model_1", "shirt_model_1", 0)

Syntax

bool engineAddClothingModel(dff Model, string FileName)

bool engineAddClothingTXD(txd Texture, string FileName)

bool addClothingModel(string ClothesTexture, string ClothesModel, int ClothesType)

bool removeClothingModel(string ClothesTexture, string ClothesModel, int ClothesType)

- engineAddClotheModel
- engineAddClotheTXD
- addClotheModel
- removeClotheModel
@Fernando-A-Rocha
Copy link
Contributor

Interesting! Just a small naming detail, clothes doesn't have singular "clothe", I would use Clothing instead, e.g. engineAddClothingModel

but why not engineAddClothingDFF ? Due to engineLoadDFF

@W3lac3
Copy link
Contributor Author

W3lac3 commented Feb 22, 2025

Interesting! Just a small naming detail, clothes doesn't have singular "clothe", I would use Clothing instead, e.g. engineAddClothingModel

but why not engineAddClothingDFF ? Due to engineLoadDFF

I didn't put DFF but Model because I based it on the engineImportTXD and engineReplaceModel functions. But I haven't finished yet, there are a few things missing from this update, such as removing the current maximum limit of clothes in the game, which is 550 (I'm still studying how to do this).

@PlatinMTA
Copy link
Contributor

It's been 84 years since I have wanted this feature, thanks dude.

One question, do these replaced models need to also be clump models (thin, fit, fat)? And, apart from the 550 id limit, any other limitation?

RP servers are going to have a field day with this.

@W3lac3
Copy link
Contributor Author

W3lac3 commented Feb 22, 2025

It's been 84 years since I have wanted this feature, thanks dude.

One question, do these replaced models need to also be clump models (thin, fit, fat)? And, apart from the 550 id limit, any other limitation?

RP servers are going to have a field day with this.

Yes, they need to be clumps following the same pattern as the CJ (Ripped, Fat and Normal). From what I've analyzed, the only limitation is the 550 limit, but as I said, I'm looking for a way to solve it.

@W3lac3 W3lac3 marked this pull request as ready for review March 17, 2025 14:04
Copy link
Contributor

@FileEX FileEX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid Hungarian notation in the code. The current coding guidelines can be found here: https://github.com/multitheftauto/mtasa-docs/blob/main/mtasa-blue/CODING_GUIDELINES.md

@W3lac3 W3lac3 requested a review from FileEX March 27, 2025 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants