View Single Post
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-09-2021 , 09:21   Re: Display previous round information in chat
Reply With Quote #14

Quote:
Originally Posted by deprale View Post
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?
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh