- ts = db_get(playerstats_db, sprintf("team#%d:%s", stof(t), strcat(PLAYERSTATS_SCOREBOARD, "score")));
- if(ts != "")
- url_fputs(fh, sprintf("e %s %s\n", strcat(PLAYERSTATS_SCOREBOARD, "teamscore"), (ts != "" ? ts : "0")));
+ for(e = events_last; (en = db_get(playerstats_db, sprintf("*:%s", e))) != ""; e = en)
+ {
+ float v;
+ v = stof(db_get(playerstats_db, sprintf("team#%d:%s", stof(t), e)));
+ if(v != 0)
+ url_fputs(fh, sprintf("e %s %g\n", e, v));
+ }