Guten Tag ihr lieben,
ich bin gerade dabei ein kleines Erfolge-System zu schreiben. Nun wollte ich aber abfragen lassen wie viele Erfolge Spieler XY schon freigeschaltet hat.
forward LoadAccountAchievement(playerid);
public LoadAccountAchievement(playerid)
{
new result[25],rows,fields;
cache_get_data(rows,fields);
if(rows)
{
cache_get_field_content(0,"Achievement1",result);
PlayerInfo[playerid][pAchievement][0] = strval(result);
cache_get_field_content(0,"Achievement2",result);
PlayerInfo[playerid][pAchievement][1] = strval(result);
cache_get_field_content(0,"Achievement3",result);
PlayerInfo[playerid][pAchievement][2] = strval(result);
cache_get_field_content(0,"Achievement4",result);
PlayerInfo[playerid][pAchievement][3] = strval(result);
cache_get_field_content(0,"Achievement5",result);
PlayerInfo[playerid][pAchievement][4] = strval(result);
}
return true;
}