if (achieve == "secondplace") this.secondplace = value;
if (achieve == "thirdplace") this.thirdplace = value;
if (achieve == "mostdamage") this.mostdamage = value;
+ if (achieve == "suicider") this.suicider = value;
if (achieve == "airshot") this.airshot = value;
if (achieve == "amazing") this.amazing = value;
if (achieve == "secondplace") return this.secondplace;
if (achieve == "thirdplace") return this.thirdplace;
if (achieve == "mostdamage") return this.mostdamage;
+ if (achieve == "suicider") return this.suicider;
if (achieve == "airshot") return this.airshot;
if (achieve == "amazing") return this.amazing;
if (achieve == "secondplace") return "Second Place!";
if (achieve == "thirdplace") return "Third Place!";
if (achieve == "mostdamage") return "Most Damage!";
+ if (achieve == "suicider") return "Master of Suicide!";
if (achieve == "airshot") return "Air Shot!";
if (achieve == "amazing") return "Amazing!";
ATTRIB(Achievements, secondplace, bool, 0);
ATTRIB(Achievements, thirdplace, bool, 0);
ATTRIB(Achievements, mostdamage, bool, 0);
+ ATTRIB(Achievements, suicider, bool, 0);
//Notificated achievements
ATTRIB(Achievements, airshot, int, 0);
entity secondplace = spawn();
entity thirdplace = spawn();
entity mostdamage = spawn();
+ entity suicider = spawn();
FOREACH_CLIENT(IS_PLAYER(it), {
if (!mostdamage) {
mostdamage = it;
}
+
+ if (!suicider) {
+ suicider = it;
+ }
float itaverage = PlayerScore_Get(it, SP_KILLS) / PlayerScore_Get(it, SP_SUICIDES);
float plaverage = PlayerScore_Get(firstplace, SP_KILLS) / PlayerScore_Get(firstplace, SP_SUICIDES);
mostdamage = it;
}
+ if (PlayerScore_Get(it, SP_SUICIDES) > PlayerScore_Get(suicider, SP_SUICIDES)) {
+ suicider = it;
+ }
+
});
if (IS_PLAYER(firstplace)) increase_achieve(firstplace, "firstplace");
if (IS_PLAYER(secondplace)) increase_achieve(secondplace, "secondplace");
if (IS_PLAYER(thirdplace)) increase_achieve(thirdplace, "thirdplace");
if (IS_PLAYER(mostdamage)) increase_achieve(mostdamage, "mostdamage");
+ if (IS_PLAYER(suicider)) increase_achieve(suicider, "suicider");
}