SA-MP Forums Archive
[+REP] Y.INI - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [+REP] Y.INI (/showthread.php?tid=647452)



[+REP] Y.INI - maksicnm - 05.01.2018

Код 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


Re: [+REP] Y.INI - Kwarde - 05.01.2018

How is that a problem?


Re: [+REP] Y.INI - RogueDrifter - 05.01.2018

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