Need help with changepass cmd (mysql,whirlpool)
#1

Hey.

I've been trying to set up a changepass command, but after many attempts I still can't find a way to get it working.
I'm using BlueG's R7 MySQL plugin and Whirlpool hash.

Here's one failed changepass example I've tested;

pawn Код:
CMD:changepass(playerid, params[])
{
    if (gPlayerInfo[playerid][pLogged] == 0)
        return SendClientMessage( playerid, -1, "You need to be logged in to use this. " );
    if( isnull( params ) )
        return SendClientMessage( playerid, -1, "USAGE: /changepass [New password]. " );
    new query[128];
    mysql_function_query(gHandle, query, true, "ChangePass", "d", playerid);
    return 1;
}

forward ChangePass(playerid);
public ChangePass(playerid)
{
    new query[128];
    format(query, sizeof(query), "UPDATE `users` SET `pass`='%s' WHERE `id`='%d'", gPlayerInfo[playerid][pPass], gPlayerInfo[playerid][pID]);
    SendClientMessage(playerid, -1, "You have successfully changed your password.");
    return 1;
}
With this code the password doesn't change at all and "You have successfully changed your password." doesn't appear.

Help is appreciated and rep will be given to helpers
Reply


Messages In This Thread
Need help with changepass cmd (mysql,whirlpool) - by Capua - 01.11.2014, 14:24
Re: Need help with changepass cmd (mysql,whirlpool) - by Stinged - 01.11.2014, 14:32
Respuesta: Need help with changepass cmd (mysql,whirlpool) - by Cerealguy - 01.11.2014, 14:40
Re: Respuesta: Need help with changepass cmd (mysql,whirlpool) - by Capua - 01.11.2014, 17:08
Re: Need help with changepass cmd (mysql,whirlpool) - by gtakillerIV - 01.11.2014, 17:48
Re: Need help with changepass cmd (mysql,whirlpool) - by Capua - 01.11.2014, 18:53
Re: Need help with changepass cmd (mysql,whirlpool) - by gtakillerIV - 01.11.2014, 19:00
Re: Need help with changepass cmd (mysql,whirlpool) - by Capua - 01.11.2014, 19:44
Re: Need help with changepass cmd (mysql,whirlpool) - by Stinged - 02.11.2014, 07:02
Re: Need help with changepass cmd (mysql,whirlpool) - by Stinged - 02.11.2014, 15:07
Re: Need help with changepass cmd (mysql,whirlpool) - by Capua - 02.11.2014, 17:58
Re: Need help with changepass cmd (mysql,whirlpool) - by [HiC]TheKiller - 02.11.2014, 19:12
Re: Need help with changepass cmd (mysql,whirlpool) - by Capua - 03.11.2014, 19:47
Re: Need help with changepass cmd (mysql,whirlpool) - by Runn3R - 03.11.2014, 20:13
Re: Need help with changepass cmd (mysql,whirlpool) - by Capua - 03.11.2014, 20:22
Re: Need help with changepass cmd (mysql,whirlpool) - by [HiC]TheKiller - 03.11.2014, 22:49
Re: Need help with changepass cmd (mysql,whirlpool) - by Capua - 09.11.2014, 14:56
Re: Need help with changepass cmd (mysql,whirlpool) - by Capua - 09.11.2014, 17:08

Forum Jump:


Users browsing this thread: 4 Guest(s)