[+REP] Y.INI
#1

Код HTML:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == DIALOG_REGISTER)
	{
		if(!response) return Connect(playerid, 1);
		if(response)
		{
			if(strlen(inputtext) < 6 || strlen(inputtext) > 24) return SPD(playerid, DIALOG_REGISTER, DSI, ""COL_SRV"Registering new account...", ""COL_WHITE"Your account isn't registered!\n"COL_WHITE"Type down your password, your password must be > 6 && < 24 chars.", "Register", "Kick");
			{
				new pass[128];
				format(pass, sizeof(pass), ""COL_SRV"DB:RPG > "COL_WHITE"Ok, your password is: "COL_RED"%s", inputtext);
				new INI:File = INI_Open(Users(playerid)); 
	            INI_SetTag(File,"data"); 
	            INI_WriteInt(File,"Password",udb_hash(inputtext));
	            INI_WriteInt(File,"Money",0); 
	            INI_WriteInt(File,"Gold",0); 
	            INI_WriteInt(File,"Bank",0); 
	            INI_WriteInt(File,"Sex",0); 
	            INI_WriteInt(File,"eMail",0); 
	            INI_WriteInt(File,"Years",0); 
	            INI_WriteInt(File,"FStyle",-1); 
	            INI_WriteInt(File,"Admin",-1); 
	            INI_WriteInt(File,"GameMaster",-1); 
	            INI_WriteInt(File,"Vip",0); 
	            INI_Close(File); 
	            PI[playerid][pMoney] = 2000;
	            PI[playerid][pMoneyBank] = 15000;
	            SCM(playerid, -1, pass);
			}
		}
	}
	return 1;
}
So problem is this:
Password is saved on bottom of Y.INI file instead of Top
Reply
#2

How is that a problem?
Reply
#3

Quote:
Originally Posted by Kwarde
Посмотреть сообщение
How is that a problem?
Exactly.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)