Register System
#1

On my script I am currently developing, my friend went onto it, registered, relogged and he apparently could not get in 'Invalid password' so I checked his account in the 'Accounts' folder and his password was '0' and he had set his password in text, please help


CODE:

Код:
public OnPlayerDisconnect(playerid, reason)
{
	new INI:File = INI_Open(UserPath(playerid));
	INI_SetTag(File,"data");
	INI_WriteInt(File,"Password",PlayerInfo[playerid][pKey]);
	INI_WriteInt(File,"Level",PlayerInfo[playerid][pLevel]);
	INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
	INI_WriteInt(File,"RespectPoints",PlayerInfo[playerid][pConnectTime]);
    INI_WriteInt(File,"Registered",PlayerInfo[playerid][pReg]);
    INI_WriteInt(File,"Gender",PlayerInfo[playerid][pSex]);
    INI_WriteInt(File,"Age",PlayerInfo[playerid][pAge]);
    INI_WriteInt(File,"Cash",PlayerInfo[playerid][pCash]);
    INI_WriteInt(File,"Tutorial",PlayerInfo[playerid][pTut]);
	INI_Close(File);
	return 1;
}
Код:
                if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Registering...",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Type 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,"Level",0);
				INI_WriteInt(File,"Admin",0);
				INI_WriteInt(File,"RespectPoints",0);
    			INI_WriteInt(File,"Registered",0);
    			INI_WriteInt(File,"Gender",0);
	    		INI_WriteInt(File,"Age",0);
  			  	INI_WriteInt(File,"Cash",0);
    			INI_WriteInt(File,"Tutorial",0);
                INI_Close(File);
   				SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
      			SpawnPlayer(playerid);
			}
EDIT: They can log in when they do not enter a password, the dialog box comes up, they press enter with nothing inside and they log in?
Reply


Messages In This Thread
Register System - by MrCallum - 08.03.2015, 12:53
Re: Register System - by Gammix - 08.03.2015, 13:02
Re: Register System - by MrCallum - 08.03.2015, 13:04

Forum Jump:


Users browsing this thread: 1 Guest(s)