openmultiplayer / open.mp

Open Multiplayer, a multiplayer mod fully backwards compatible with SA-MP
https://open.mp
Mozilla Public License 2.0
470 stars 99 forks source link

Other players can't see the correct player's skin if SetPlayerSkin is used right after SpawnPlayer #741

Open ReshiramZekrom1 opened 1 year ago

ReshiramZekrom1 commented 1 year ago

Describe the bug I noticed that if you set the skin of a player (let's call it Player_A) with SetPlayerSkinright after using SpawnPlayer, Player_A sees its PG with the skin set by SetPlayerSkin while other players see Player_A with the skin set with SetSpawnInfo (or Skin ID 0 if you didn't use it anywhere in the script). If another player joins the server, it will see Player_A with the skin set by SetSpawnInfo (or Skin ID 0).

To Reproduce At least two players needed.

  1. Use SpawnPlayer.
  2. Set a player's skin with SetPlayerSkin immediately after.

You can reproduce it with this code. It features a command used to "sync" the player by basically saving some data and respawning the player at the same position with the same weapons. The other player in front of you should type /skin ID and /sync afterwards and you'll notice the issue at once. If you pay attention, you can even see that for a moment the correct skin actually is set but it's immediately replaced by the CJ skin.

Expected behavior Other players should instead see the skin set with SetPlayerSkin.

Screenshots and/or logs

sa-mp-008

Commit hash in master (https://github.com/openmultiplayer/open.mp/commit/441a63a74712003d8a3c05745cc30c93f07922ff)

hiwyn commented 1 month ago

Bug on OPEN-MP: SetPlayerSkin is not working on SA-MP Launcher [mostly used sa-mp APK, more than 10.000.000 downloads]

Is it the same stuff?