pos_y += 1.2 * sbar_fontsize_y;\r
drawcolorcodedstring(pos + '0.5 0 0' * (sbwidth - stringwidth(str, TRUE, sbar_fontsize)), str, sbar_fontsize, sbar_scoreboard_alpha_fg, DRAWFLAG_NORMAL);\r
\r
+ // print information about respawn status\r
+ float respawn_time = getstatf(STAT_RESPAWN_TIME);\r
+ dprint(strcat(ftos(respawn_time), " --------\n"));\r
+ if(respawn_time)\r
+ {\r
+ if(respawn_time < 0)\r
+ {\r
+ // a negative number means we are awaiting respawn, time value is still the same\r
+ respawn_time *= -1; // remove mark now that we checked it\r
+ if(time >= respawn_time) // don't show a negative value while the server is respawning the player (lag)\r
+ str = strcat("^1Respawning...");\r
+ else\r
+ str = strcat("^1Respawning in ^3", ftos_decimals(respawn_time - time, 2), "^1 seconds...");\r
+ }\r
+ else if(time < respawn_time)\r
+ str = strcat("You are dead, wait ^3", ftos_decimals(respawn_time - time, 2), "^7 seconds before respawning");\r
+ else if(time >= respawn_time)\r
+ str = strcat("You are dead, press ^2", getcommandkey("primary fire", "+fire"), "^7 to respawn");\r
+\r
+ pos_y += 1.2 * sbar_fontsize_y;\r
+ drawcolorcodedstring(pos + '0.5 0 0' * (sbwidth - stringwidth(str, TRUE, sbar_fontsize)), str, sbar_fontsize, sbar_scoreboard_alpha_fg, DRAWFLAG_NORMAL);\r
+ }\r
+\r
scoreboard_bottom = pos_y + 2 * sbar_fontsize_y;\r
}\r
\r