Raised This Month: $ Target: $400
 0% 

Display previous round information in chat


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-09-2021 , 10:07   Re: Display previous round information in chat
Reply With Quote #11

1. I didn't consider the scenario where someone could hurt someone before round start. I personally still consider it as damage issued in the round.
2. clamp() would only make sense if you want to enforce damage within a range (eg. 50-100). I do not need a lower boundary for damage since all damage counts, we just want to limit the max. Please provide your argument for using clamp().
3. My goal is to only call get_user_health() on alive players, and only call it once per alive player per round. I updated the code here to avoid redundant calls.
4. I added max() to limit the damage to 100 since you requested it here:
Quote:
Yes, sometimes it is more than 100, which I want to be a maximum of 100.
And that sometimes it is not displayed correctly
For example, I do 100 damage and the plugin writes 80
thank you
__________________

Last edited by Bugsy; 08-09-2021 at 10:53.
Bugsy is offline
 



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