24.06.2010, 13:58
hi,
well in my server i use dini and io_write.
I would like to know how i can do that the password_hash will be saved correctly.
this one works, but will this works for all players and will not bug ?
i used io_write that the file deletes all old things (example when i add or remove some variables) and saves the new variables which i created in the script.
well in my server i use dini and io_write.
I would like to know how i can do that the password_hash will be saved correctly.
this one works, but will this works for all players and will not bug ?
pawn Код:
if(LoggedIn[playerid] == 1)
{
new tmpHASH;
new filestr[128];
format(filestr,sizeof(filestr),"Oyuncu/%s.ini",PlayerName(playerid));
tmpHASH = dini_Int(filestr,"password_hash");
new File: file = fopen(filestr, io_write);
if (file)
{
dini_IntSet(filestr,"password_hash",tmpHASH);
dini_IntSet(filestr,"Money",GetPlayerMoney(playerid));
dini_IntSet(filestr,"Score",GetPlayerScore(playerid));
dini_IntSet(filestr,"Kills",Kills[playerid]);
dini_IntSet(filestr,"Deaths",Deaths[playerid]);
dini_IntSet(filestr,"Level",PlayerInfo[playerid][pAdmin]);
}
fclose(file);
}