24.12.2017, 10:09
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
I need it like this:
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(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_PASS)
if(!response) return Kick(playerid);
if(response)
{
if(strlen(inputtext) < 6 || strlen(inputtext) > 30) return ShowPlayerDialog(playerid, DIALOG_PASS, DSI, ""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(string, sizeof(string), ""SRVBOJA"AG-RPG - "BELA"Vasa lozinka: "ZUTA"%s", (inputtext));
SCM(playerid, -1, string);
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;
}
PHP код:
[data]
Password = 123456
Vip = 0
GameMaster = -1
Admin = -1
BorbeniStil = -1
Drzava = 0
God = 0
Mail = 0
Pol = 0
Banka = 0
Zlato = 0