change password
#4

I need a new password to be saved as "udb hash" otherwise it would not work...

My code:
Quote:

dcmd_changepass(playerid, params[])
{
new OldPass[129], NewPass[129], Name[24], Slozka[40];
if(sscanf(params, "s[129]s[129]", OldPass, NewPass))
return SendClientMessage(playerid, COLOR_RUZOVA, "/changepass [old pass] [new pass]");
GetPlayerName(playerid, Name, sizeof (Name));
format(Slozka, sizeof (Slozka), "/Ucty/%s.ini", Name);

if(!strcmp(dini_Get(Slozka,"Password"), OldPass, false))
{
dini_Set(Slozka, "Password", NewPass);
SendClientMessage(playerid, COLOR_RUZOVA, "pass changed");
}
else
SendClientMessage(playerid, cervena, "bad pass");
return 1;
}

Reply


Messages In This Thread
change password - by andreyysk - 19.06.2016, 18:13
Re: change password - by andreyysk - 20.06.2016, 10:18
Re: change password - by Matz - 20.06.2016, 12:01
Re: change password - by andreyysk - 20.06.2016, 17:32

Forum Jump:


Users browsing this thread: 1 Guest(s)