server-beta icon indicating copy to clipboard operation
server-beta copied to clipboard

[BUG]: Stuck at default class selection screen

Open RichanoG opened this issue 3 years ago • 10 comments

Description

Hello, I seem to be having some problems with class selection. I'm getting stuck at the default SA:MP class selection screen (see screenshot), after suiciding while I've pressed F4. This is happening after I have updated to build 6 (with the crash fixes). I'm using a slightly modified version of weapon-config.

So far, I have discovered that moving back to build 5 or just removing weapon-config has fixed the bug. I do not know what exactly seems to be the problem yet.

How to re-produce this bug

EDIT: Added code example

#include <a_samp>
#include <omp>
#include <Pawn.RakNet>
#include <crashdetect>
#include <YSI-Includes\YSI_Data\y_iterate>
#include <zcmd>

#if !defined WC_DEATH_WORLD
	#define WC_DEATH_WORLD 0x00DEAD00
#endif

forward DeathRespawn(playerid);

CMD:kill(playerid, params[])
{
	ApplyAnimation(playerid, "PED", "KO_skid_back", 4.1, 0, 0, 0, 1, 0, 1);
	SetTimerEx("DeathRespawn", 3000, false, "d", playerid);
	return 1;
}

public DeathRespawn(playerid)
{
	SetPlayerVirtualWorld(playerid, WC_DEATH_WORLD);
	//SetFakeFacingAngle(playerid, _);
	TogglePlayerSpectating(playerid, true);
	TogglePlayerSpectating(playerid, false);
	SendClientMessage(playerid, -1, "debug 3");

	ForceClassSelection(playerid);
	SetPlayerHealth(playerid, 0.0);
	SetPlayerVirtualWorld(playerid, WC_DEATH_WORLD);
	return 1;
}

public OnPlayerSpawn(playerid)
{
	SetPlayerVirtualWorld(playerid, 0);
	return 1;
}

High ping seems to make the bug appear more often (almost always).

  1. Join the server and spawn
  2. Press F4 and suicide somehow

sa-mp-270

Relevant log output

open.mp server version

open.mp server public beta build 6 (with crash fixes)

Operating system or distribution

Debian 11

Contact information

Richano#9220 [email protected]

Additional information

RichanoG avatar Jul 12 '22 09:07 RichanoG