server-beta
server-beta copied to clipboard
[BUG]: SetSpawnInfo bug if I use AddSimpleModel
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
Unable to reproduce it in build 10 with following code:
#include <a_samp>
main() {}
public OnGameModeInit()
{
AddCharModel(305, 20001, "lvpdpc2.dff", "lvpdpc2.txd");
AddCharModel(305, 20002, "lapdpd2.dff", "lapdpd2.txd");
AddSimpleModel(-1,19379, -2000, "wallzzz.dff", "wallzzz.txd");
return 1;
}
public OnPlayerConnect(playerid)
{
TogglePlayerSpectating(playerid, true);
SetTimerEx("spawnMe", 1500, false, "d", playerid);
return 1;
}
forward spawnMe(playerid);
public spawnMe(playerid)
{
SetSpawnInfo(playerid, 0 /* team */, 20002 /* model */, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
TogglePlayerSpectating(playerid, false);
SpawnPlayer(playerid);
}
Could you please check if bug is solved in build 10?
Not solved in build 10, it works well if the SetSpawnInfo model is a custom one, but try using a model from 1 to 311
I need to know if this issue still persists @ravesamp
@AmyrAhmady it's still an issue.
If I load the streamer plugin, it happens every time. If I don't load it, it only happens after gmx
is used. I vaguely remember other players could see the correct skin while the affected player saw the CJ skin, but this should be tested
public OnGameModeInit()
{
AddCharModel(305, 20001, "lapd1.dff", "lapd1.txd");
}
public OnPlayerConnect(playerid)
{
TogglePlayerSpectating(playerid, true);
}
CMD:spawn(playerid, params[])
{
SetSpawnInfo(playerid, 0, 101, 0.0, 0.0, 3.0, 0.0, WEAPON_FIST, 0, WEAPON_FIST, 0, WEAPON_FIST, 0);
TogglePlayerSpectating(playerid, false);
return 1;
}
@ravesamp would you please test it with this? https://github.com/openmultiplayer/open.mp/actions/runs/5232472246
I have the same problem, build 1.2.0.2673 The problem occurs even if you do not use a custom skin, regardless of the skin, it falls into skin 0 (cj). It also only occurs if artworks are enabled and in 0.3.DL If you use version 0.3.7 the problem does not occur.