'controlling' damage taken
I’m trying control damage taken by a player depending on his health; is there a way to reduce or block damages to a player? I tried to hook “Damage” messages and recover the damage taken, it would work unless the player gets a damage that sets his health to less than 1 – then nothing prevents him to die.
Also I tried to check in prethink forward if user's health is <= 0 so it could be recovered, it didn't work though (player would die anyway). EDIT: I don't mean to make a 'god mode', just want to prevent players to die in some situations. |
Re: 'controlling' damage taken
Hawk does this in his surf tools plugin; it's a multi-step process, you can follow what he does and when the time is right block the message or something like that.
|
Re: 'controlling' damage taken
Thanks, I'll check that.
|
Re: 'controlling' damage taken
I actually removed the section of code that does this, but anyway...
Set their HP to 1124 and then just throw your own damage. It makes it a lot easier. |
Re: 'controlling' damage taken
Any specific reason for setting their health to exactly 1124 or is that just a random number?
|
Re: 'controlling' damage taken
Thank you. I guess it's the only way to make it, and it works as I expected. I have made that by adding 100 but I guess it's better with safer (higher) numbers.
|
| All times are GMT -4. The time now is 04:50. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.