SA-MP Forums Archive
[DUDB] Change Password - 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: [DUDB] Change Password (/showthread.php?tid=165425)



[DUDB] Change Password - Lorrden - 04.08.2010

Is there a function for this?
I've searched forums and read through the dudb.inc file but can't find anything..
Otherwise, could someone tell me how to do ?


Re: [DUDB] Change Password - JaTochNietDan - 04.08.2010

Just make a command with parameters, then to set the new password, hash the parameters and save to the file.

pawn Код:
dUserSetINT(PlayerName(playerid)).("password_hash",udb_hash(params));
Example

pawn Код:
dcmd_changepass(playerid,params[])
{
    if(!PLAYERLIST_authed[playerid]) return SendClientMessage(playerid,red,"You need to be logged in!");
    if(!strlen(params)) return SendClientMessage(playerid,red,"[USAGE]: /changepass <password>");
    dUserSetINT(PlayerName(playerid)).("password_hash",udb_hash(params));
    return 1;
}



Re: [DUDB] Change Password - Kar - 04.08.2010

can you make a dini tut no hashing please D:


Re: [DUDB] Change Password - Lorrden - 04.08.2010

Thanks, never thought of that :$