open.mp forum
[Server] TogglePlayerSpectating on&off will cause client not work after "F4" - Printable Version

+ open.mp forum (https://forum.open.mp)
-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3)
--- Forum: Support (https://forum.open.mp/forumdisplay.php?fid=12)
--- Thread: [Server] TogglePlayerSpectating on&off will cause client not work after "F4" (/showthread.php?tid=2601)



TogglePlayerSpectating on&off will cause client not work after "F4" - iLuXing - 2024-02-22

Type: Server and Client

Operating System: Windows

Server Version: omp v1.2.0.2670

Plugins Installed: No

YSI Included: No

Output (Logs): <paste a link to hastebin/pastebin with the logs included> (please remove any sensitive information)

I want player back to class select interface when player spwaned. so i make this code.
TogglePlayerSpectating on&off will cause client not work after "F4" or ForceClassSelection.
it will not back to class selection view and cant do anything only when /quit

[Image: 8odMIwFY3ihEmjr.png]

Make a try:
Code:
CMD:test(playerid){
    ForceClassSelection(playerid);
    TogglePlayerSpectating(playerid, true);
    TogglePlayerSpectating(playerid, false);
}



RE: TogglePlayerSpectating on&off will cause client not work after "F4" - Radical - 2024-02-27

https://github.com/openmultiplayer/open.mp/issues/875