Password Fuzzie Account

Started by Finch, Apr 08, 2015, 05:15 AM

Previous topic - Next topic

Finch

Well i am using Fuzzie Account system but i am facing problem on setpassword command when i set password it say on console password does not exist and password also didnt change this is command

else if ( cmd == "setpassword" )
{
           if( stats[ player.ID ].Logged == false ) MessagePlayer( "Error - You don't have Login acess.", player);
   else if ( stats[ player.ID ].Level < 7 ) MessagePlayer( "Error - You don't have access to it.", player);
else if ( !text ) qPrivMessage( "Syntax, " + cmd + " [Nick/ID] [Password]",player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) qPrivMessage( "Error: Invalid Player.",player );
else {
local newpass = GetTok( text, " ", 2);
if ( newpass == null ) qPrivMessage("Enter A Valid Password.",player );
else {
qPrivMessage("Admin " + player + " Set Your Password To: " + newpass + ".", plr);
qPrivMessage(" Changed Password Of " + plr.Name + " To: " + newpass + ".", player);
QuerySQL(sqliteDB,"UPDATE Accounts SET Password='" + SHA256( password ) + "' WHERE Name='" + plr.Name + "'");
}
}
}
}
Beztone is a scripter but he is too stupid

Thijn

You copy pasted the query, but you have to change "password" in the SHA256 function to newpass.

Finch

Beztone is a scripter but he is too stupid

EK.IceFlake

#3
Quote from: Finch on Apr 08, 2015, 06:38 AMcan u give there example?
Change
QuerySQL(sqliteDB,"UPDATE Accounts SET Password='" + SHA256( password ) + "' WHERE Name='" + plr.Name + "'");to
QuerySQL(sqliteDB,"UPDATE Accounts SET Password='" + SHA256( newpass ) + "' WHERE Name='" + plr.Name + "'");And please, next time FREAKING TRY TO FIND THE ERROR INSTEAD OF POSTING A EXABILLION STUPID ERROR TOPICS HERE!!!
Edit: I noticed this is my 123rd post :P