SA-MP Forums Archive
BUG: ForceClassSelection And TogglePlayerSpectating - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: BUG: ForceClassSelection And TogglePlayerSpectating (/showthread.php?tid=329266)



BUG: ForceClassSelection And TogglePlayerSpectating - Kar - 27.03.2012

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


Re: BUG: ForceClassSelection And TogglePlayerSpectating - MP2 - 27.03.2012

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


Re: BUG: ForceClassSelection And TogglePlayerSpectating - Jay_ - 28.03.2012

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.


Re: BUG: ForceClassSelection And TogglePlayerSpectating - Hiddos - 28.03.2012

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.


Re: BUG: ForceClassSelection And TogglePlayerSpectating - beckzy - 28.03.2012

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


Re: BUG: ForceClassSelection And TogglePlayerSpectating - Kar - 28.03.2012

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 ;\


Re: BUG: ForceClassSelection And TogglePlayerSpectating - AndreT - 28.03.2012

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


Re: BUG: ForceClassSelection And TogglePlayerSpectating - CKA3KuH - 04.04.2012

This is a very important update for the roleplay servers.


Re: BUG: ForceClassSelection And TogglePlayerSpectating - beckzy - 04.04.2012

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.