SA-MP Forums Archive
Password not writing - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Password not writing (/showthread.php?tid=187402)



Password not writing - Hornet600 - 02.11.2010

I made this code with strickens plugin
pawn Код:
command(register, playerid, params[])
{
    new string[128];
    format(string, sizeof(string), "INSERT INTO Users (Name,Password) VALUES ('%s','%s')", playerinfo[playerid][Name], playerinfo[playerid][Password]);
    mysql_query(string);
    SavePlayer(playerid);
    SendClientMessage(playerid, COLOR_YELLOW, "[ACCOUNT] Your account has been created, please login now!");
    return 1;
}
But I got one problem this is writing the Name to the DB but the Password is not Writing what is wrong here?

EDIT: Im not going make the login because theres no place to load the password xD


Re: Password not writing - Miguel - 02.11.2010

Remember to hash the password!


Re: Password not writing - Hornet600 - 02.11.2010

Can you explain me how i can make it?


Re: Password not writing - Miguel - 02.11.2010

I'm a bit busy now but, you can ask in this topic: https://sampforum.blast.hk/showthread.php?tid=65290


Re: Password not writing - Hornet600 - 02.11.2010

ok thats to encrypt the password and i just want to write the password to the DB but is not writing.what is wrong with my code?


Re: Password not writing - DVDK - 02.11.2010

Well, you just send "playerinfo[playerid][Password]" to the server which doesn't contain any information at that point, replace it with "params".


Re: Password not writing - Hornet600 - 02.11.2010

params are not working too..
pawn Код:
command(register, playerid, params[])
{
    new string[128];
    format(string, sizeof(string), "INSERT INTO Users (Name,Password) VALUES ('%s','%s')", playerinfo[playerid][Name], params);
    mysql_query(string);
    SavePlayer(playerid);
    SendClientMessage(playerid, COLOR_YELLOW, "[ACCOUNT] Your account has been created, please login now!");
    return 1;
}
Thats the code


Re: Password not writing - Hornet600 - 02.11.2010

i will try to create a call back for this