SA-MP Forums Archive
Forcing a player to register before spawning - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Forcing a player to register before spawning (/showthread.php?tid=647387)



Forcing a player to register before spawning - HoNEYKISS - 04.01.2018

Can anyone tell me how to force a player /register before spawning?Do I have to use OnPlayerRequestSpawn?and how do I have to do that


Re: Forcing a player to register before spawning - NealPeteros - 04.01.2018

Set up your register/login dialogs in OnPlayerConnect, then at the end of those dialogs, use SetSpawnInfo and SpawnPlayer

Quote:
Originally Posted by SAMP Wikipedia
Returning 0 in this callback will prevent the player from spawning. The player can be forced to spawn when SpawnPlayer is used.
OnPlayerRequestClass


Re: Forcing a player to register before spawning - RogueDrifter - 04.01.2018

Yeah Ex:
PHP код:
public OnPlayerRequestSpawn(playerid)
{
    if(!
Registered[playerid]) return 0;
    return 
1;

returning 0 will turn off response for the spawn button.
EDIT: oh well neal said it.


Re: Forcing a player to register before spawning - SonnyGamer - 04.01.2018

If you are using normal admin system, you can disable auto-login and set must-register to 1