need little help wich login system
#7

U mean: He wants to login and to login and to login? Take mine, oldie!

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""WHITE"Registering...",""RED"You have entered an invalid password.\n"WHITE"Type your password below to register a new account.","Register","Quit");
                    if(
INI_Open(getINI(playerid))) {
                        
INI_WriteString("Password",inputtext);
                        
INI_WriteInt("Cash"0);
                        
INI_WriteInt("Admin"0);
                        
INI_WriteInt("Score"0);
                        
INI_Save();
                        
INI_Close();
                        
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_INPUT,""WHITE"Login",""WHITE"Type your password below to login.","Login","Quit");
                    }
                }
            } case 
DIALOG_LOGIN: {
                if(!
response) return Kick playerid );
                if(
response) {
                    if(!
strlen(inputtext)) return ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_INPUT""WHITE"Login",""RED"You have entered an invalid password.\n"WHITE"Type your password below to login.","Login","Quit");
                    if(
INI_Open(getINI(playerid))) {
                        
INI_ReadString(PlayerInfo[playerid][pPass],"Password",20);
                        if(
strcmp(inputtext,PlayerInfo[playerid][pPass],false)) {
                            
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_INPUT""WHITE"Login",""RED"You have entered an incorrect password.\n"WHITE"Type your password below to login.","Login","Quit");
                        }
                        
GivePlayerMoneyplayeridINI_ReadInt"Cash" ) );
                        
PlayerInfo[playerid][pAdmin] = INI_ReadInt("Admin");
                        
SetPlayerScoreplayeridINI_ReadInt"Score" ) );
                        
INI_Close();
                    }
                }
            }
        }
        return 
1;
    } 
Reply


Messages In This Thread
need little help wich login system - by doreto - 04.08.2011, 09:03
Re: need little help wich login system - by doreto - 04.08.2011, 09:12
Re : need little help wich login system - by Soumi - 04.08.2011, 09:20
Re: need little help wich login system - by doreto - 04.08.2011, 09:25
Re : need little help wich login system - by Soumi - 04.08.2011, 09:28
Re: need little help wich login system - by doreto - 04.08.2011, 09:38
AW: need little help wich login system - by samtey - 04.08.2011, 09:46
Re : need little help wich login system - by Soumi - 04.08.2011, 09:46
AW: need little help wich login system - by samtey - 04.08.2011, 09:49
Re: need little help wich login system - by doreto - 04.08.2011, 09:58

Forum Jump:


Users browsing this thread: 1 Guest(s)