SA-MP Forums Archive
dini file - 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: dini file (/showthread.php?tid=466172)



dini file - LoLeC - 26.09.2013

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;
}
}
}



Re: dini file - Voxel - 26.09.2013

Show us your enums please


Re: dini file - LoLeC - 26.09.2013

Код:
enum PlayerInfo
{
Adminlevel,
Vip,
Score,
Money,
Spawn,
Level,
Kills,
Deaths
}



Re: dini file - Voxel - 26.09.2013

Lol you need to add Password to your enums so make it:

pawn Код:
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 !


Re: dini file - Konstantinos - 26.09.2013

Quote:
Originally Posted by Voxel
Посмотреть сообщение
Lol you need to add Password to your enums so make it:

pawn Код:
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.


Re: dini file - Voxel - 26.09.2013

Okay well learned another new thing!


Re: dini file - LoLeC - 26.09.2013

does not work
now when entering the password server crashing


Re: dini file - LoLeC - 05.10.2013

SOLVED thanks


Re: dini file - EmpireSk - 05.10.2013

LoLeC nerob to cez dini rob to cez Y_ini