04.09.2012, 16:38
pawn Код:
public LoadUser_data(playerid, name[], value[]) //new function with playerid, player name and value
{
INI_String("Password", PlayerInfo[playerid][Password], 129);
pawn Код:
new hashPassword[129];
// WP_Hash(hashPassword,sizeof(hashPassword),inputtext);
WP_Hash(hashPassword, 129, inputtext);
new
uFile[35]; //variable for file
format(uFile, 35, USER_FILE, GetName(playerid));
new
INI:playerFile = INI_Open(uFile);
INI_SetTag(playerFile,"DATA");
INI_WriteString(playerFile, "Password", hashPassword);
pawn Код:
new hashPassword[129];
// new inputtext = strval(inputtext);
// WP_Hash(hashPassword,sizeof(hashPassword),inputtext);
// WP_Hash(inputtext,sizeof(inputtext),hashPassword);
WP_Hash(hashPassword, 129, inputtext);
//WP_Hash(wpHash, sizeof(wpHash), inputtext);
if(!strcmp(inputtext,PlayerInfo[playerid][Password]))return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"You have entered an incorrect password.\n"COL_WHITE"Type your password below to login.","Login","Quit");
Thanks