Problem: user System
#1

I am having problems with my log-in screen at the moment. When I press cancel I have to be kicked but somehow I can continue to the class selection.

Code from dialogresponse:
Код:
    if(response)
    {
        switch(dialogid)
        {
            case DIALOG_REGISTER:
            {
                if(!response) return Kick(playerid);
                                if(response)
                                {
                                        if(!strlen(inputtext))
                                        {
                                                ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "{00FFFF}Register", "{FFFFFF}Please enter your password to register.\n{FF0000}You can't leave this empty.", "OK", "Cancel");
                                                return 1;
                                        }
										new hashpass[128];
                                        new INI:file = INI_Open(Path(playerid));
                                        INI_WriteString(file,"Password",hashpass);
                                        INI_WriteInt(file,"Money",0);
                                        INI_WriteInt(file,"Score",0);
                                        INI_WriteInt(file,"Deaths",0);
                                        INI_WriteInt(file,"Admin",0);
                                        INI_Close(file);
                                        return 1;
                                }
                        }
                        case DIALOG_LOGIN:
                        {
                                if(!response) return Kick(playerid);
                                if(response)
                                {
                                        new hashpass[129];
			                            if(!strcmp(hashpass, pStats[playerid][password], false))
			                            {
                                                INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid);
                                        }
                                        else
                                        {
                                            SendClientMessage(playerid, COLOR_ACMDSCOMDIR, "You have to log-in in order to play.");
                                            Kick(playerid);
										}
										return 0;
									}
							}
					}
			}
		return 1;
	}
If somebody could help me I'd be happy. Thanks already.
Reply


Messages In This Thread
Problem: user System - by [WA]iRonan - 27.11.2013, 13:51
Re: Problem: user System - by ]Rafaellos[ - 27.11.2013, 13:53
Re: Problem: user System - by [WA]iRonan - 27.11.2013, 13:58
Re: Problem: user System - by [WA]iRonan - 28.11.2013, 05:34
Re: Problem: user System - by [WA]iRonan - 28.11.2013, 13:46
Re: Problem: user System - by ikbenremco - 28.11.2013, 13:48
Re: Problem: user System - by [WA]iRonan - 28.11.2013, 13:56
Re: Problem: user System - by Lajko1 - 28.11.2013, 14:02
Re: Problem: user System - by ikbenremco - 28.11.2013, 14:03
Re: Problem: user System - by [WA]iRonan - 28.11.2013, 14:23

Forum Jump:


Users browsing this thread: 2 Guest(s)