problem with saving the achievements
#1

https://imgur.com/a/G73bY
in this screenshot you can see the achievements complete.

if i restart the server, the achievs become incomplete and i can do them at infinity.

the database is saving the first time when i complete the achievements, but them can be recompleted infinity times.

how can i fix it?

the function which saves the achievements in database:

Code:
function SalvareRealizari(playerid) {
	new string[256], query[256];
	format(string, sizeof(string),
		"%d|%d|%d|%d",
		PlayerInfo[playerid][pAchievement][0], PlayerInfo[playerid][pAchievement][1], PlayerInfo[playerid][pAchievement][2], PlayerInfo[playerid][pAchievement][3]);

	format(query, sizeof(query),
		"UPDATE `users` SET `Realizari`='%s' WHERE `ID`='%d'", string, PlayerInfo[playerid][pSQLID]);
	mysql_tquery(SQL, query, "","");
	return 1;
}
Reply


Messages In This Thread
problem with saving the achievements - by enzulikeS - 09.03.2018, 15:31
Re: problem with saving the achievements - by Meller - 09.03.2018, 17:24
Re: problem with saving the achievements - by enzulikeS - 09.03.2018, 18:42
Re: problem with saving the achievements - by Meller - 09.03.2018, 18:47
Re: problem with saving the achievements - by enzulikeS - 09.03.2018, 18:49
Re: problem with saving the achievements - by enzulikeS - 10.03.2018, 09:11
Re: problem with saving the achievements - by PepsiCola23 - 10.03.2018, 15:16

Forum Jump:


Users browsing this thread: 1 Guest(s)