BUG: ForceClassSelection And TogglePlayerSpectating
#1

Using ForceClassSelection under a dialog that is shown in OnPlayerConnect causes you to return to class selection every time you turn TogglePlayerSpectating off.

At the time I didn't know if you complete the dialog you'll be sent straight to class selection, so I was using forceclassselection anyway.

That's basically it. Tested in 0.3d R2 and 0.3e RC5
Reply
#2

Don't use ForceClassSelection under OnPlayerConnect then? Bit of a stupid thing to do..
Reply
#3

For some reason if you use TogglePlayerSpectating prior to the player dying if this function has been used on them, they will always be forced into Class Selection when they respawn, regardless of the circumstances.
Reply
#4

Quote:
Originally Posted by Jay_
Посмотреть сообщение
For some reason if you use TogglePlayerSpectating prior to the player dying if this function has been used on them, they will always be forced into Class Selection when they respawn, regardless of the circumstances.
I can confirm this. Pretty annoying tbh.
Reply
#5

https://sampforum.blast.hk/showthread.php?tid=191062
Reply
#6

Wow since 2010, I didn't know the bug existed soo long.

I think it should be fixed since 0.3e is in bug fixing stage now.

- This is a bug with no fix, I know there are alot of other bugs but most have fixes, this one doesn't.. I hope it gets fixed for 0.3e ;\
Reply
#7

Yeah, ugh, this really really really should be fixed. Lets hope it does get fixed for 0.3e final.
Reply
#8

This is a very important update for the roleplay servers.
Reply
#9

Quote:
Originally Posted by ******
Посмотреть сообщение
I can think of one solution - don't use "ForceClassSelection" until "OnPlayerDeath" ever. You could do something like:

pawn Код:
new gRespawn[MAX_PLAYERS];

hook OnPlayerDeath(playerid, killerid, reason)
{
    if (gRespawn[playerid]) ForceClassSelection(playerid), gRespawn[playerid] = false;
}

My_ForceClassSelection(playerid)
{
    gRespawn[playerid] = true;
}

#define ForceClassSelection My_ForceClassSelection
Like that, only correctly hooking things (and I'm not sure if you can use "ForceClassSelection" in "OnPlayerDeath" at all).
That would work if server owners don't mind the player dying to go to class selection, but some people want players to go straight to class selection without the player dying (e.g /classsel or /changeclass, etc). I would like to see this fixed. I reported it back in 2010 in the bug reports board.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)