SA-MP Forums Archive
Password problems - 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: Password problems (/showthread.php?tid=438088)



Password problems - Latisha - 18.05.2013

I'm using this scripts but the password isn't saved on scriptfiles/users/blablabla.ini
pawn Код:
new file[64], IP[16], string[128], password[256];
            format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
            if(!dini_Exists(file))
            {
                GetPlayerIp(playerid, IP, sizeof(IP));
                dini_Create(file);
                dini_Set(file, "Password", password);
                dini_Set(file, "IP", IP);
                PlayerInfo[playerid][pLevel] = 1;
                dini_IntSet(file, "Level", PlayerInfo[playerid][pLevel]);
                format(string, sizeof(string), "SERVER: {FFFFFF}You have successfully registered on {FF6347}blablabla Roleplay{FFFFFF}.", inputtext);
                SendClientMessage(playerid, COLOR_LIGHTRED, string);



Re: Password problems - Vince - 18.05.2013

What do you expect? You're writing an empty string.


Re: Password problems - Latisha - 18.05.2013

what do you mean? i don't get it, can you just tell me the right scripts?


Re: Password problems - Xoomer - 18.05.2013

maybe this should work ?
hope
pawn Код:
new file[64], IP[16], password[256];
            format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
            if(!dini_Exists(file))
            {
                GetPlayerIp(playerid, IP, sizeof(IP));
                dini_Create(file);
                dini_Set(file, "Password", password);
                dini_Set(file, "IP", IP);
                PlayerInfo[playerid][pLevel] = 1;
                dini_IntSet(file, "Level", PlayerInfo[playerid][pLevel]);



Re: Password problems - Latisha - 18.05.2013

My real script is
pawn Код:
new file[64], IP[16], string[128], password[256];
            format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
            if(!dini_Exists(file))
            {
                GetPlayerIp(playerid, IP, sizeof(IP));
                dini_Create(file);
                dini_Set(file, "Password", password);
                dini_Set(file, "IP", IP);
                PlayerInfo[playerid][pLevel] = 1;
                dini_IntSet(file, "Level", PlayerInfo[playerid][pLevel]);
                format(string, sizeof(string), "SERVER: {FFFFFF}You have successfully registered on {FF6347}blablabla Roleplay{FFFFFF}.", inputtext);
                SendClientMessage(playerid, COLOR_LIGHTRED, string);
when I using your scripts, FATAL ERROR.


Re: Password problems - Latisha - 18.05.2013

Bump, I am really need help.


Re: Password problems - Revo - 18.05.2013

print out the value of password before writing it to the file and you will understand what Vince is saying. ( printf("Password: %s", Password); )


Re: Password problems - GWMPT - 18.05.2013

pawn Код:
new file[64], IP[16], string[128], password[256];
So you want to save a password? Dat's expert!


Re: Password problems - Latisha - 19.05.2013

Quote:
Originally Posted by Revo
Посмотреть сообщение
print out the value of password before writing it to the file and you will understand what Vince is saying. ( printf("Password: %s", Password); )
Can you tell me the right scripts? I still dont understand