PDA

View Full Version : dini file


LoLeC
26/09/2013, 12:44 PM
hi,
anybody know how to fix it pls
when enter the password does not create the file
thanks


if(dialogid == 10 && response == 1)
{
new s[50], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(s, sizeof(s),"/Users/%s.sav", name);
if(strlen(inputtext) == 0)
{
ShowPlayerDialog(playerid,10,DIALOG_STYLE_PASSWORD ,"{FF0000}Register","{FF0000}You must enter a password!\n{FFFFFF}Enter your password","Register","Close");
}
if (strlen(inputtext) > 0)
{
if(!fexist(s))
{
dini_Create(s);
dini_IntSet(s, "Password", udb_hash(inputtext));
gPlayerLogged[playerid] = 1;
}
}
}

Voxel
26/09/2013, 02:06 PM
Show us your enums please

LoLeC
26/09/2013, 02:22 PM
enum PlayerInfo
{
Adminlevel,
Vip,
Score,
Money,
Spawn,
Level,
Kills,
Deaths
}

Voxel
26/09/2013, 02:25 PM
Lol you need to add Password to your enums so make it:


enum PlayerInfo
{
Adminlevel,
Vip,
Score,
Money,
Spawn,
Level,
Kills,
Deaths,
Password
}


Dont forget to add it to the other places as well, so everywhere u got this list of stats that go in your account file add Password under it.

hope i helped !

Konstantinos
26/09/2013, 02:27 PM
Lol you need to add Password to your enums so make it:


enum PlayerInfo
{
Adminlevel,
Vip,
Score,
Money,
Spawn,
Level,
Kills,
Deaths,
Password
}


Dont forget to add it to the other places as well, so everywhere u got this list of stats that go in your account file add Password under it.

hope i helped !

Not necessarily. He can use inputtext to get the password for registering and again inputtext plus loading the password directly to compare it when it's about login.

Voxel
26/09/2013, 02:31 PM
Okay well learned another new thing!

LoLeC
26/09/2013, 06:14 PM
does not work
now when entering the password server crashing

LoLeC
05/10/2013, 07:04 PM
SOLVED thanks

EmpireSk
05/10/2013, 07:06 PM
LoLeC nerob to cez dini rob to cez Y_ini ;)