SA-MP Forums Archive
Login / Register Bug - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Login / Register Bug (/showthread.php?tid=459265)



Login / Register Bug - ZaakWest - 21.08.2013

Hello,

I'm hosting a Zombie Server (( Zombie Apolcalypse )) But i've a big probleme ! if you help me i'm offering Free Server 50 Slots, Skype : yacine00781

The probleme is : When I create an account It works and when I relog and I try to connect it says wrong Password, I don't know whats the probleme i think it's Whirpool or something because it's Hashed

Код:
case DIALOG_LOGIN:
        {
  			if(!response)
	        {
 				ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_MSGBOX,"Kicked",""chat" You must login to play at "NAME"","Close","");
				Kick(playerid);
	        }
            if(response)
            {
                new buf[129];
				WP_Hash(buf, sizeof(buf), inputtext);
				if(!strcmp(buf,pInfo[playerid][pPassword]))
                {
                    INI_ParseFile(UserPath(playerid), "LoadUser_data", .bExtra = true, .extra = playerid);
                    pInfo[playerid][pLogged] = 1;
				    playedtimer[playerid] = SetTimerEx("TimeOnServer", 1000, 1, "i", playerid);
				    SendClientMessage(playerid,-1,""chat""COL_LGREEN" Logged in!");
				    printf("%s",pInfo[playerid][pPassword]);
                }
                else
                {
                	new string[256];
			        format(string,sizeof(string),""chat" Welcome back %s",PlayerName(playerid));
			        ShowPlayerDialog(playerid, DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,string,""chat" Our system have detected your username registered please login","Login","Quit");
                }
                return 1;
            }



Re : Login / Register Bug - ZaakWest - 22.08.2013

bump!


Re: Login / Register Bug - BullseyeHawk - 22.08.2013

You can always debug it..

pawn Код:
case DIALOG_LOGIN:
        {
            if(!response)
            {
                ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_MSGBOX,"Kicked",""chat" You must login to play at "NAME"","Close","");
                Kick(playerid);
            }
            if(response)
            {
                new buf[129];
                WP_Hash(buf, sizeof(buf), inputtext);
                                printf("%s - %s", buf, pInfo[playerid][pPassword]);
                if(!strcmp(buf,pInfo[playerid][pPassword]))
                {
                    INI_ParseFile(UserPath(playerid), "LoadUser_data", .bExtra = true, .extra = playerid);
                    pInfo[playerid][pLogged] = 1;
                    playedtimer[playerid] = SetTimerEx("TimeOnServer", 1000, 1, "i", playerid);
                    SendClientMessage(playerid,-1,""chat""COL_LGREEN" Logged in!");
                    printf("%s",pInfo[playerid][pPassword]);
                }
                else
                {
                    new string[256];
                    format(string,sizeof(string),""chat" Welcome back %s",PlayerName(playerid));
                    ShowPlayerDialog(playerid, DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,string,""chat" Our system have detected your username registered please login","Login","Quit");
                }
                return 1;
            }
And check if they show up the same inside cmd.