// Check if the given name already exist in race rankings? In that case, where? (otherwise return 0)
int race_CheckName(string net_name)
{
- int i;
- for (i=RANKINGS_CNT-1;i>=0;--i)
- if(strdecolorize(grecordholder[i]) == strdecolorize(net_name))
- return i+1;
- return 0;
+ int rank = 0;
+ string zoned_name = strzone(strdecolorize(entcs_GetName(player_localnum)));
+ for (int i = RANKINGS_CNT - 1; i >= 0; --i)
+ if (strdecolorize(grecordholder[i]) == zoned_name)
+ {
+ rank = i + 1;
+ break;
+ }
+ strfree(zoned_name);
+ return rank;
}
void race_showTime(string text, vector pos, vector timeText_ofs, float theTime, vector textSize, float f)