09.03.2018, 15:31
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:
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; }