Skip to content

engineGetModelTextures doesn't work with CJ models #4282

Open
@PlatinMTA

Description

@PlatinMTA

Describe the bug

There is no way to get the textures of the CJ clothing models using engineGetModelTextures. You can get CJ's current textures passing 0 as a parameter but this is not the same texture that is stored in the player.img and also this will only return the textures of a random CJ that's loaded, so if you have multiple CJ's with multiple clothes it won't be of use.

Steps to reproduce

engineGetModelTextures("hoodya")
engineGetModelTextures(30093)

Both will return Invalid Model ID

Image

Version

All versions

Additional context

The wiki entry is misleading. First, if you pass a ped model name ResolveModelID doesn't seem to be able to figure out what model it refers to (for example try using bmycr and then 21, the game CAN return the textures for the model bmycr but only if you pass the ID as the parameter).

If I had to guess, the issue is that this function

ushort CRenderWareSA::GetTXDIDForModelID(ushort usModelID)
returns 0, hence the model ID/name is treated as invalid.

Relevant log output

Security Policy

  • I have read and understood the Security Policy and this issue is not security related.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions