SA-MP Forums Archive
Class selection after being spawned has been toggled - 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: Class selection after being spawned has been toggled (/showthread.php?tid=642951)



Class selection after being spawned has been toggled - ElMaestro123 - 10.10.2017

Hello, I need help asap, when my player spawns, after he spawns, he gets class selection and he stands on the spawn coordinates, how to disable that class selection?


Re: Class selection after being spawned has been toggled - whadez - 10.10.2017

Код:
public OnPlayerRequestClass(playerid, classid) {
#pragma unused classid
// Make sure you've got your SetSpawnInfo here
    TogglePlayerSpectating(playerid, true); // Puts player in spectator mode -> cant see the bottom buttons
    TogglePlayerSpectating(playerid, false); // Spawns player (OnPlayerSpawn), also get rid of SpawnPlayer(), and use TogglePlayerSpectating(playerid, false) for spawning the player.
}