SA-MP Forums Archive
YSI\y_ini Order Question? - 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: YSI\y_ini Order Question? (/showthread.php?tid=655047)



YSI\y_ini Order Question? - Stefcaaaa - 11.06.2018

Hi guys well i do not have any problem with scripting but i want to know, why y_ini writes data like this (see picture)? I want to make Password on the top of the list. How can i do this?


Re: YSI\y_ini Order Question? - Exhibit - 11.06.2018

Just make the password save before those?


Re: YSI\y_ini Order Question? - Stefcaaaa - 11.06.2018

I did.


Re: YSI\y_ini Order Question? - Stefcaaaa - 11.06.2018

But nothing helps? Any Solution?


Re: YSI\y_ini Order Question? - Exhibit - 11.06.2018

Post the code for the register dialog

PS. This should not effect anything btw.


Re: YSI\y_ini Order Question? - Stefcaaaa - 11.06.2018

Код:
                new INI:File = INI_Open(UserPath(playerid));
                INI_SetTag(File,"data");
                INI_WriteInt(File,"Password",udb_hash(inputtext));
                INI_WriteInt(File,"Money",0);
                INI_WriteInt(File,"Admin",0);
                INI_Close(File);
   
                gPlayerLoggedIn[playerid] = 1;
This is for DIALOG_REGISTER case!

Код:
function SaveUser_data(playerid)
{
        new INI:File = INI_Open(UserPath(playerid));
	INI_SetTag(File,"data");
	INI_WriteInt(File,"Money",GetPlayerMoney(playerid));
	INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
	INI_Close(File);
}
This is for savinguserdata (under OnPLayerDisconnect)


Re: YSI\y_ini Order Question? - Exhibit - 11.06.2018

That's weird. Post the code when you save all the stuff.


Re: YSI\y_ini Order Question? - Stefcaaaa - 11.06.2018

I did function SaveUser_data(playerid) is for saving all the stuff when player disconnect!


Re: YSI\y_ini Order Question? - Exhibit - 11.06.2018

Quote:
Originally Posted by Stefcaaaa
Посмотреть сообщение
I did function SaveUser_data(playerid) is for saving all the stuff when player disconnect!
Yes post that function.


Re: YSI\y_ini Order Question? - Stefcaaaa - 11.06.2018

Код:
function SaveUser_data(playerid)
{
        new INI:File = INI_Open(UserPath(playerid));
	INI_SetTag(File,"data");
	INI_WriteInt(File,"Money",GetPlayerMoney(playerid));
	INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
	INI_Close(File);
}