01.11.2014, 18:53
What's wrong now? Still won't change.
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];
new salt[30], hash[129];
randomString(salt, SALT_LENGTH);
format(hash, sizeof(hash), "%s%s", salt, escape(params));
WP_Hash(hash, sizeof(hash), hash);
mysql_function_query(gHandle, query, false, "UPDATE `users` SET `pass`='%s' WHERE `id`='%i'", "si", "", "");
SendClientMessage(playerid, -1, "You have successfully changed your password.");
return 1;
}