Rather interesting approach of getting health but problem is, players can still damage each other after round end(since it's called 5 seconds before a newround).
The way I do it is - I hook eventdeath and eventhealth, I use a bool for freezetime, set it to true on newround, and false on startround, in eventhealth I gather HP if it's not freezetime, and it works properly. This way I don't have to care if somebody changed mp_round_restart_delay (regamedll) or if they're using some mod that changes the amount of seconds it takes for new round to start.
PHP Code:
public EventHealth(client){
if( !g_FreezeTime ) // Have to do this because EventHealth is called after you die (or maybe I'm stupid) and it sets your health to 100.
g_RoundEndHp[client] = get_user_health(client);
}
Also may I ask why you chose min instead of clamp?
Can you explain how this is related to the thread topic?