multitheftauto/mtasa-blue

Clothes from "Extras" category are incorrectly applied when reconnected

Opened this issue · 2 comments

Describe the bug

When a player using skin ID 0 approaches another player who has an "Extras" category clothing item equipped (e.g., necklace, watch, glasses), and then reconnects to the server, they are incorrectly assigned those clothing items upon reconnection. These items are only visible to the reconnecting player and not others.

Steps to reproduce

  1. Add the script below (server-side).
  2. Player A equips an accessory (in this example, a necklace).
  3. Player B moves within visible range of Player A.
  4. Player B reconnects to the server using /reconnect.
  5. Player B now has the necklace clothing applied.

Script:

addCommandHandler("clth", function (plr)
    setElementModel(plr, 0)
    for i=0, 17 do
        removePedClothes(plr, i)
    end

    addPedClothes(plr, "neckgold", "neck2", 13)
end, false)

addEventHandler("onPlayerJoin", root, function()
    spawnPlayer(source, 0, 0, 5, 0, 0)
    fadeCamera(source, true)
    setCameraTarget(source, source)
end)

Version

Server: MTA:SA Server v1.6-release-23312
Client (both): Multi Theft Auto v1.6-release-23324

Additional context

Player A & B before reconnect:

Image

Player A & B after player B reconnect:

Player A perspective (ignore different torso/legs clothes for player B) after reconnect:

Image

Player B perspective after reconnect:

Image

Relevant log output

Security Policy

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

Can confirm, seen random jewellery for years but didn't know exact steps to reproduce.

I’ve noticed this can also happen randomly after death. If multiple players are using the CJ skin but with different clothing, you might end up with another player’s outfit on your own CJ skin. I’m not sure whether this is visible only to the local player or to everyone. It doesn’t occur after every death, but when it does, the character falls as if it was hit by a car, and right after that, the clothing changes with extras too.