[DUDB] Change Password
#1

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 ?
Reply
#2

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

can you make a dini tut no hashing please D:
Reply
#4

Thanks, never thought of that :$
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)