Skip to content

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

Open
@ReshiramZekrom1

Description

@ReshiramZekrom1

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
(441a63a)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingnightly

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions