dini file
#1

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;
}
}
}
Reply
#2

Show us your enums please
Reply
#3

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

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 !
Reply
#5

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.
Reply
#6

Okay well learned another new thing!
Reply
#7

does not work
now when entering the password server crashing
Reply
#8

SOLVED thanks
Reply
#9

LoLeC nerob to cez dini rob to cez Y_ini
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)