The Problem?
#4

PHP код:
case DIALOG_REGISTER:
{
    if (!
response) return Kick(playerid);
    if(
response)
    {
        if(!
strlen(inputtext)) return ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_INPUT"Registering...","You have entered an invalid password.\nType your password below to register a new account.","Register","Quit");
        new 
INI:File INI_Open(UserPath(playerid));
        
INI_SetTag(File,"data");
        
INI_WriteInt(File,"Password",udb_hash(inputtext));
        
INI_WriteInt(File,"Cash",0);
        
INI_WriteInt(File,"Admin",0);
        
INI_WriteInt(File,"Kills",0);
        
INI_WriteInt(File,"Deaths",0);
        
INI_Close(File);
        
        new 
stringl[128];
        new 
name[MAX_PLAYER_NAME];
        
GetPlayerName(playeridnameMAX_PLAYER_NAME);
        
format(stringlsizeof(stringl), "Porsh: {FFFFFF}You've successfully registered the name ({F2D82C}%s{FFFFFF}) with the password ({F2D82C}%s{FFFFFF})"nameinputtext);
        
SendClientMessage(playeridCOLOR_GREENstringl);
        
        
ShowPlayerDialog(playeridDIALOG_SUCCESS_1DIALOG_STYLE_MSGBOX,"Success!","Great, now please relog to save your stats!","Ok","");
    }

That should prevent the player from spawning while registering.

Now this code:
PHP код:
SetSpawnInfo(playerid001958.331343.1215.36269.15000000);
SpawnPlayer(playerid); 
Add that where the player selects their skin. If it's a dialog, then add it in where they give a response to what skin ID they want. This will make them spawn after choosing their skin.

If you want any messages to show before kicking, add a timer to kick the player after they've been shown the message.

Example:

PHP код:
SetTimerEx("KickTimer"500false"i"playerid); //Add this after showing a player a message. 
PHP код:
forward KickTimer(playerid);
public 
KickTimer(playerid)
{
    
Kick(playerid);
    return 
1;

Reply


Messages In This Thread
The Problem? - by Lixyde - 11.11.2018, 14:48
Re: The Problem? - by Mike861 - 11.11.2018, 14:49
Re: The Problem? - by Lixyde - 11.11.2018, 16:31
Re: The Problem? - by DatGuySleepy - 11.11.2018, 17:35
Re: The Problem? - by Mike861 - 11.11.2018, 17:48
Re: The Problem? - by Lixyde - 11.11.2018, 18:35
Re: The Problem? - by Mike861 - 11.11.2018, 18:39
Re: The Problem? - by Lixyde - 12.11.2018, 07:38
Re: The Problem? - by Mike861 - 12.11.2018, 08:18
Re: The Problem? - by Lixyde - 12.11.2018, 09:36
Re: The Problem? - by Mike861 - 12.11.2018, 09:40

Forum Jump:


Users browsing this thread: 3 Guest(s)