Problem In Login System
#7

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"Registering...","{FF0000}You have entered an invalid password.\n""Type your password below to register a new account.","Register","Quit");
                    
dini_Create(UserPath(playerid));
                    
dini_Set(UserPath(playerid),"Password",inputtext);
                    
dini_IntSet(UserPath(playerid),"Cash",0);
                    
dini_IntSet(UserPath(playerid),"Admin",0);
                    
dini_IntSet(UserPath(playerid),"Kills",0);
                    
dini_IntSet(UserPath(playerid),"Deaths",0);
                    
dini_IntSet(UserPath(playerid),"WantedLevel",0);
                    
dini_IntSet(UserPath(playerid),"Vip",0);
                    
dini_IntSet(UserPath(playerid),"Score",0);
                    
dini_IntSet(UserPath(playerid),"Condoms",0);
                    
dini_IntSet(UserPath(playerid),"Banned",0);
                    
dini_IntSet(UserPath(playerid),"Jailed",0);
                    
dini_IntSet(UserPath(playerid),"Drugs",0);
                    
dini_IntSet(UserPath(playerid),"Nopm",0);
                    
dini_IntSet(UserPath(playerid),"Bank",0);
                    
dini_IntSet(UserPath(playerid),"Sausages",0);
                    
dini_IntSet(UserPath(playerid),"PassChange",0);
                    
dini_IntSet(UserPath(playerid),"Mute",0);
                    
ShowPlayerDialog(playeridDIALOG_SUCCESS_1DIALOG_STYLE_MSGBOX,"{008000}Success!","{FF0000}Registered and autologged! Now all your data are saved. (Money,score,robberies,wanted level etc)","Ok","");
                }
            }
        }
        case 
DIALOG_LOGIN
        { 
            if (!
response) return Kick(playerid); 
            if (!
inputtext[0] || strcmp(inputtextdini_Get(UserPath(playerid), "Password"))) return ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_INPUT"Login""{FF0000}You have entered an incorrect password.\nType your password below to login.""Login""Quit"); 
            
ShowPlayerDialog(playeridDIALOG_SUCCESS_2DIALOG_STYLE_MSGBOX"{008000}Success!""{FFFF00}You have successfully logged in!""Ok"""); 
        }
    }
    return 
1

Reply


Messages In This Thread
Problem In Login System - by CarRamper - 18.08.2016, 08:53
Re: Problem In Login System - by Tass007 - 18.08.2016, 09:15
Re: Problem In Login System - by CarRamper - 18.08.2016, 09:51
Re: Problem In Login System - by Tass007 - 18.08.2016, 10:03
Re: Problem In Login System - by Konstantinos - 18.08.2016, 10:11
Re: Problem In Login System - by CarRamper - 18.08.2016, 10:11
Re: Problem In Login System - by Tass007 - 18.08.2016, 11:08

Forum Jump:


Users browsing this thread: 2 Guest(s)