openmultiplayer / openmultiplayer/open.mp
SetPlayerObjectMaterial with custom models/textures
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 641
- Forks
- 208
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
Unable to use SetPlayerObjectMaterial with textures from server DFFs/TXDs.
To Reproduce
AddSimpleModel(-1, 19379, -5001, "myModel1.dff", "myTxd1.txd");
AddSimpleModel(-1, 19379, -5002, "myModel2.dff", "myTxd2.txd");
...
myObject = CreatePlayerObject(playerid, -5001, x, y, z, 0.0, 0.0, 0.0, 300.0);
SetPlayerObjectMaterial(playerid, myObject, 0, -5002, "mytxd2", "myTexture", 0xFFFFFFFF);
Expected behavior
I expected to be able to use textures from custom txds the same as i would use them from the game txds.
Release version
OMP v1.4.0.2779
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the sequence using AddSimpleModel, CreatePlayerObject, and SetPlayerObjectMaterial with server-provided DFF and TXD files. Compare the custom-texture behavior with the documented game-TXD behavior, then verify that the custom texture is applied to the player object as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100