SA-MP Forums Archive
Y.Ini saving problem - 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: Y.Ini saving problem (/showthread.php?tid=646821)



Y.Ini saving problem - maksicnm - 24.12.2017

So i make a basic pass input register ( i'll later add for year, mail, state etc.)
But problem is SAVING.
Y.INI saves it like this for some reason
PHP код:
[data]
Vip 0
GameMaster 
= -1
Admin 
= -1
BorbeniStil 
= -1
Drzava 
0
God 
0
Mail 
0
Pol 
0
Banka 
0
Zlato 
0
Password 
123456 
PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == DIALOG_PASS)
    if(!
response) return Kick(playerid);
    if(
response)
    {
        if(
strlen(inputtext) < || strlen(inputtext) > 30) return ShowPlayerDialog(playeridDIALOG_PASSDSI""SRVBOJA"AferaOGC - "BELA"Registracija naloga"""BELA"Vas nalog nije registrovan...\n"BELA"Unesite lozinku za vas nalog u polje dole.\n"BELA"Lozinka NE SME imati "CRVENA"< 6 && > 24 "BELA"karaktera!""Prihvati""Izlaz");
        {
            new 
string[64];
            
format(stringsizeof(string), ""SRVBOJA"AG-RPG - "BELA"Vasa lozinka: "ZUTA"%s", (inputtext));
            
SCM(playerid, -1string);
            new 
INI:File INI_Open(Korisnici(playerid));
            
INI_SetTag(File,"data");
            
INI_WriteString(File,"Password", (inputtext));
            
INI_WriteInt(File,"Zlato",0);
            
INI_WriteInt(File,"Banka",0);
            
INI_WriteInt(File,"Pol",0);
            
INI_WriteInt(File,"Mail",0);
            
INI_WriteInt(File,"God",0);
            
INI_WriteInt(File,"Drzava",0);
            
INI_WriteInt(File,"BorbeniStil",-1);
            
INI_WriteInt(File,"Admin",-1);
            
INI_WriteInt(File,"GameMaster",-1);
            
INI_WriteInt(File,"Vip",0);
            
INI_Close(File);
        }
    }
    return 
1;

I need it like this:
PHP код:
[data]
Password 123456
Vip 
0
GameMaster 
= -1
Admin 
= -1
BorbeniStil 
= -1
Drzava 
0
God 
0
Mail 
0
Pol 
0
Banka 
0
Zlato 




Re: Y.Ini saving problem - Hunud - 24.12.2017

you need to hash it


Re: Y.Ini saving problem - maksicnm - 24.12.2017

Fine than...


Re: Y.Ini saving problem - maksicnm - 24.12.2017

That didn't fixed it...
PHP код:
[data]
Vip 0
GameMaster 
= -1
Admin 
= -1
BorbeniStil 
= -1
Drzava 
0
God 
0
Mail 
0
Pol 
0
Banka 
0
Zlato 
0
Password 
228131566 



Re: Y.Ini saving problem - GTLS - 24.12.2017

Hashing is not what he's looking for to solve his current problem idk why'd you even suggest it.

OT: Try reversing the statements I mean write the password line at the last.