Zero (0) HP Bug Fix by Exolent
1 Attachment(s)
Intro:
|
Re: Zero (0) HP Bug Fix
looks hot
|
Re: Zero (0) HP Bug Fix
The must have for a surf server. tyvm exo! :mrgreen:
|
Re: Zero (0) HP Bug Fix
try:
if(hp>0&&hp%256==0){ .... } |
Re: Zero (0) HP Bug Fix
well if it works fine the way it is, why change it?
also, i never knew what the % sign meant when using it as an operator. |
Re: Zero (0) HP Bug Fix
Yay for modulus?
|
Re: Zero (0) HP Bug Fix
for those people who havent upgraded and need to know :\ (not me :P)
|
Re: Zero (0) HP Bug Fix
Quote:
kp_uparrow is right though, it would make sense to use that. Code:
public message_Health(msgid, dest, id) |
Re: Zero (0) HP Bug Fix
thanks for clearing up how % works :)
ill update in 1 sec. |
Re: Zero (0) HP Bug Fix
This is not needed: set_pev(id, pev_health, ++health);
you just need to make sure the hud does not show 0 by using: set_msg_arg_int(1, get_msg_argtype(1), 1); ---------------- You also don't need get_msg_argtype(1) and can just use ARG_BYTE for: set_msg_arg_int(1, ARG_BYTE, 1); what i used: Code:
public message_Health(msgid, dest, id) |
Re: Zero (0) HP Bug Fix
if its > than 255 its unreadable anyways, so why not do
PHP Code:
|
Re: Zero (0) HP Bug Fix
Nice, gonna use it for ZombieMod server.
|
Re: Zero (0) HP Bug Fix
Quote:
Code:
public message_Health(msgid, dest, id) |
Re: Zero (0) HP Bug Fix
Quote:
|
Re: Zero (0) HP Bug Fix
@vittu
ill do some testing to see if i can reduce coding i just like to test myself so i know for sure it will fix the bug |
Re: Zero (0) HP Bug Fix
this was made a while ago by fatalis (posted on xtreme-jumps.eu) but nice to see it here too :P
|
Re: Zero (0) HP Bug Fix
Quote:
------------------ travo, updated that code above. Didn't need the hp variable for what you wanted to do. |
Re: Zero (0) HP Bug Fix
ive never seen a plugin like this...
|
Re: Zero (0) HP Bug Fix
Quote:
Code:
#include <amxmodx> |
Re: Zero (0) HP Bug Fix
Well this method is still superior since that one only catches the damage event. Health can be changed in other ways not involving damage. This plugin's method is also better for its use of register_message rather than register_event. I also would rather not change the users health and just send the message to change their hud only, which I showed above.
|
Re: Zero (0) HP Bug Fix
Indeed vittu, you'r method is best...i just replyed to X-olent post.
|
Re: Zero (0) HP Bug Fix
updated to 0.3
thanks for pointing that out vittu :) |
Re: Zero (0) HP Bug Fix
Kinda forgot about this but because you are checking if the client is alive, you don't need to check against 0 hp. Client can not be alive and have 0 health or less.
You can reduce the if statement to: if(hp % 256 == 0) or if you really wanted, you don't need to check below 255 so you could change it to: if(hp > 255 && (hp % 256) == 0) |
Re: Zero (0) HP Bug Fix
done.
|
Re: Zero (0) HP Bug Fix by Exolent
Can someone edit it to act on the armor?
|
Re: Zero (0) HP Bug Fix by Exolent
Quote:
|
Re: Zero (0) HP Bug Fix by Exolent
Quote:
|
Re: Zero (0) HP Bug Fix by Exolent
There is no 0 armor bug.
|
Re: Zero (0) HP Bug Fix by Exolent
Quote:
|
Re: Zero (0) HP Bug Fix by Exolent
You don't understand the purpose of this plugin.
If a player has more than 255 health, it will loop back to less than or equal to 255. Example: 510 (which is 255 * 2) will be reduced to 255, but the player's real health is still 510. The bug with this is when a player has a health value of 256x, where x is any postive integer, it will reduce the player's health to 0 because 255 is the maximum. When a player's HUD health is 0 but actual health is greater than 255, it turns the player's screen to an awkward view and changes how the player can move. This plugin detects when that happens and adds 1 health to the player so that the player's HUD health is 1 instead of 0, thus removing the bug. |
Re: Zero (0) HP Bug Fix by Exolent
Quote:
|
Re: Zero (0) HP Bug Fix by Exolent
I use CSDM 2.1.2 and when i am 1 vs 1 , and i die, i have 0 hp and messed up movements.
I use your plugin now, is on the bottom of my plugins.ini , but the same damn thing. 0 hp bug not fixed. Code:
Zero (0) HP Bug F 0.4 Exolent zero_hp_fix.amx runnin |
| All times are GMT -4. The time now is 08:34. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.