Raised This Month: $ Target: $400
 0% 

Display previous round information in chat


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-09-2021 , 09:21   Re: Display previous round information in chat
Reply With Quote #11

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
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:38.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode