void() spawnfunc_info_player_deathmatch; // needed for the other spawnpoints
void() spawnpoint_use;
-string race_readName(float pos);
-string race_placeName(float pos);
string GetMapname();
string ColoredTeamName(float t);
return 0; // pos is zero if unranked
}
-float race_writeTime(string map, float t, string myuid)
+void race_writeTime(string map, float t, string myuid)
{
string rr;
if(g_cts)
}
string race_placeName(float pos) {
- if(floor((pos % 100)/10) * 10 != 10) // examples: 12th, 111th, 213th will not execute this block
+ if(floor((mod(pos, 100))/10) * 10 != 10) // examples: 12th, 111th, 213th will not execute this block
{
- if(pos % 10 == 1)
+ if(mod(pos, 10) == 1)
return strcat(ftos(pos), "st");
- else if(pos % 10 == 2)
+ else if(mod(pos, 10) == 2)
return strcat(ftos(pos), "nd");
- else if(pos % 10 == 3)
+ else if(mod(pos, 10) == 3)
return strcat(ftos(pos), "rd");
else
return strcat(ftos(pos), "th");
r = race_readTime(MapInfo_Map_bspname, 1);
if (r == 0)
continue;
- h = race_readName(MapInfo_Map_bspname, 1)
+ h = race_readName(MapInfo_Map_bspname, 1);
s = strcat(s, strpad(32, MapInfo_Map_bspname), " ", strpad(-8, TIME_ENCODED_TOSTRING(r)), " ", h, "\n");
++rec;
}
r = race_readTime(MapInfo_Map_bspname, 1);
if (r == 0)
continue;
- h = race_readName(MapInfo_Map_bspname, 1)
+ h = race_readName(MapInfo_Map_bspname, 1);
s = strcat(s, strpad(32, MapInfo_Map_bspname), " ", strpad(-8, TIME_ENCODED_TOSTRING(r)), " ", h, "\n");
++rec;
}
string getladder()
{
float i, j, k;
- string s, len, temp_s;
+ string s, temp_s;
s = "";
temp_s = "";
}
}
- len = tokenize_console(temp_s);
+ tokenize_console(temp_s);
s = "";
if(i == 0) // speed award
s = strcat(s, " ", ftos(stof(argv(LADDER_CNT+1)) + floor(LADDER_FIRSTPOINT / i))); // record, add LADDER_FIRSTPOINT / i points
db_put(TemporaryDB, strcat("ladder", myuid), s);
- }
- }
+ }
}
}
{
thisuid = db_get(TemporaryDB, strcat("uid", ftos(i)));
temp_s = db_get(TemporaryDB, strcat("ladder", thisuid));
- len = tokenize_console(temp_s);
+ tokenize_console(temp_s);
thiscnt = stof(argv(LADDER_CNT+1));
if(thiscnt > top_scores[LADDER_SIZE-1])
for (i = 0; i < LADDER_SIZE; ++i)
{
temp_s = db_get(TemporaryDB, strcat("ladder", top_uids[i]));
- len = tokenize_console(temp_s);
+ tokenize_console(temp_s);
if (argv(LADDER_CNT+1) == "") // total is 0, skip
continue;
s = strcat(s, strpad(4, race_placeName(i+1)), "^3| ^7"); // pos