Forcing a player to register before spawning
#1

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
Reply
#2

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
Reply
#3

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.
Reply
#4

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


Forum Jump:


Users browsing this thread: 1 Guest(s)