O que se passa!?
#1

Eu entro no server e me registo com a password "portugal", relogo faзo o login com a password "p" e o faz o login ou entao "gdfklgdf" qualquer palavara faz o login, nгo sei o que se passa com o sistema! alguem me ajuda!

Ai ta a parte do login, o gamemode nгo apresenta erros nem nada!

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch( dialogid )
    {
        case DIALOG_REGISTER:
        {
            if (!response) return Kick(playerid);
            if(response)
            {
                if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_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);
                pLogged[playerid] = 1;
                //SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
                //SpawnPlayer(playerid);
                ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,"Sucesso!","{FFFFFF}Conta registada com sucesso!\nPor favor reloga!","Ok","");
                Kick(playerid);
			}
        }

        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);
					ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,"Sucesso!","{FFFFFF}Login bem sucedido!\nTeamSpeak IP: {00BFFF}ts72.light-speed.com:6620","Ok","");
					pLogged[playerid] = 1;
                }
                else
                {
                	new string[256];
        			format(string, sizeof(string), "{FA0000}Password incorrecta!\n{FFFFFF}Por favor digite a password corretamente em baixo!");
        			ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Login", string, "Login", "Cancelar");
                }
                return 1;
            }
        }
    }
                return 0;
            }
Reply


Messages In This Thread
O que se passa!? - by CJoao - 02.09.2011, 09:11
Re: O que se passa!? - by CJoao - 02.09.2011, 09:45
Re: O que se passa!? - by FireCat - 02.09.2011, 09:47
Re: O que se passa!? - by Pharrel - 02.09.2011, 09:50
Re: O que se passa!? - by CJoao - 02.09.2011, 09:55
Re: O que se passa!? - by FireCat - 02.09.2011, 09:56
Re: O que se passa!? - by CJoao - 02.09.2011, 09:57
Re: O que se passa!? - by FireCat - 02.09.2011, 09:58
Re: O que se passa!? - by CJoao - 02.09.2011, 10:00
Re: O que se passa!? - by Pharrel - 02.09.2011, 10:03

Forum Jump:


Users browsing this thread: 1 Guest(s)