openmultiplayer / openmultiplayer/open.mp

SetPlayerObjectMaterial with custom models/textures

Open
#1,072 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.