PayDay/Level Up help
#6

Keep that and try this:
PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch( 
dialogid )
    {
        case 
DIALOG_REGISTER:
        {
            if (!
response) return Kick(playerid);
            if(
response)
            {
                if(!
strlen(inputtext)) return ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_INPUT""COL_WHITE"Registering...",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Type 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,"Kills",0);
                
INI_WriteInt(File,"Deaths",0);
                
INI_WriteInt(File,"Score",0);
                
INI_WriteInt(File,"Admin",0);
                
INI_Close(File);
                
SetSpawnInfo(playerid001958.331343.1215.36269.15000000);
                
SpawnPlayer(playerid);
                
ShowPlayerDialog(playeridDIALOG_SUCCESS_1DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"Thanks! You are registered at, "COL_LIGHTBLUE"District Gaming","Ok","");
            }
        }
        case 
DIALOG_LOGIN:
        {
            if ( !
response ) return Kick playerid );
            if( 
response )
            {
                if(
udb_hash(inputtext) == PlayerInfo[playerid][pPass])
                {
                    
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid);
                    
SetPlayerScore(playeridPlayerInfo[playerid][pScore]);
                    
GivePlayerMoney(playeridPlayerInfo[playerid][pCash]);
                    
ShowPlayerDialog(playeridDIALOG_SUCCESS_2DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"You have successfully logged in!","Ok","");
                }
                else
                {
                    
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"You have entered an incorrect password.\n"COL_WHITE"Type your password below to login.","Login","Quit");
                }
                return 
1;
            }
        }
    }
    return 
1;

Reply


Messages In This Thread
PayDay/Level Up help - by Escobabe - 20.09.2017, 19:42
Re: PayDay/Level Up help - by aoky - 20.09.2017, 19:58
Re: PayDay/Level Up help - by Escobabe - 20.09.2017, 20:23
Re: PayDay/Level Up help - by aoky - 20.09.2017, 20:25
Re: PayDay/Level Up help - by Escobabe - 20.09.2017, 20:31
Re: PayDay/Level Up help - by aoky - 20.09.2017, 20:33
Re: PayDay/Level Up help - by Escobabe - 20.09.2017, 20:37
Re: PayDay/Level Up help - by Logic_ - 20.09.2017, 21:01
Re: PayDay/Level Up help - by Escobabe - 20.09.2017, 21:04
Re: PayDay/Level Up help - by aoky - 20.09.2017, 21:06

Forum Jump:


Users browsing this thread: 2 Guest(s)