openmultiplayer / openmultiplayer/open.mp

[BUG]: SetSpawnInfo bug if I use AddSimpleModel

Open
#581 6 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

Description

I use this before SpawnPlayer. The player spawns with the specified skin in SA-MP but with the CJ skin in OMP
SetSpawnInfo(playerid, DEFAULT_TEAM, CharacterSkin[playerid], CharacterLastX[playerid], CharacterLastY[playerid], CharacterLastZ[playerid], CharacterLastA[playerid], 0, 0, 0, 0, 0, 0);

EDIT: I use a custom model for a textdraw, I noticed that if I remove it from artconfig.txt it works just fine

How to re-produce this bug

EDIT: AddSimpleModel(-1, 19379, -1000, "td.dff", "id.txd"); in artconfig.txt

TogglePlayerSpectating(playerid, true) in OnPlayerConnect

SetSpawnInfo
TogglePlayerSpectating(playerid, false)
SpawnPlayer

Relevant log output

n/a

open.mp server version

Build 9

Operating system or distribution

windows 10

Contact information

discord rave#9806

Additional information

n/a

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 involving AddSimpleModel in artconfig.txt, TogglePlayerSpectating, SetSpawnInfo, and SpawnPlayer. Compare the spawn result with and without the custom model and identify why the CJ skin replaces the specified skin; done means the reproduced sequence spawns with the requested skin while the custom model remains available.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
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.