yes its possible but saving raw passwords, ESPECIALLY in .ini files, is a very very very bad idea.
https://sampforum.blast.hk/showthread.php?tid=343019
There are tutorials on the forum on how to do this. Learn how to do it and work it into your script. A small pushstart:
pawn Код:
new Buf[129], randSalt[SALT_LENGTH], combinedHash[129], saltTmp[11], Query[500], zStr[450];
randomString(randSalt, SALT_LENGTH);
format(combinedHash, sizeof(combinedHash), "%s%s", randSalt, inputtext);
//For some really weird reason, using WP_Hash makes randSalt equal to randSalt + Buf.
//We want to save what the salt originally is though, so we set it to another variable that won't get corrupted.
WP_Hash(Buf, 129, combinedHash);
printf("saltTmp is %s", saltTmp);
//If you use Linux and try to use db_get_assoc or db_get_field on ANY empty DB field the server will CRA-A-A-ASH
//There are fixes.
//You can use .inis too, this example is just to show the values that you would write.
format(Query, sizeof(Query), "INSERT INTO `Accounts` \
(`IP`, `Name`, `Password`, `Salt`) VALUES \
('%s', '%s', '%s', '%s');",
GetPlayerIPEx(playerid), playerName(playerid), Buf, saltTmp);
stock randomString(strDest[], strLen = 10) {
while(strLen--) {
strDest[strLen] = random(2) ? (random(26) + (random(2) ? 'a' : 'A')) : (random(10) + '0');
}
}