Raised This Month: $ Target: $400
 0% 

Bug base builder


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 08-15-2019 , 11:15   Re: Bug base builder
Reply With Quote #1

That's not a bug with any plugin, CS can't show over 255 health. In order to fix that you need to hook the health message and clamp the health value:

Code:
register_message(get_user_msgid("Health"), "message_health")

Code:
// Fix for the HL engine bug when HP is multiples of 256 public message_health(msg_id, msg_dest, msg_entity) {     // Get player's health     new health = get_msg_arg_int(1)         // Don't bother     if (health < 256) return;         // Check if we need to fix it     if (health % 256 == 0)         set_user_health(msg_entity, get_user_health(msg_entity) + 1)         // HUD can only show as much as 255 hp     set_msg_arg_int(1, get_msg_argtype(1), 255) }
__________________









Last edited by CrazY.; 08-15-2019 at 11:15.
CrazY. is offline
Reply



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 17:29.


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