Raised This Month: $ Target: $400
 0% 

'controlling' damage taken


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
commonbullet
Veteran Member
Join Date: Oct 2005
Old 10-06-2006 , 14:35   'controlling' damage taken
Reply With Quote #1

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.

Last edited by commonbullet; 10-06-2006 at 14:49.
commonbullet is offline
Send a message via ICQ to commonbullet Send a message via MSN to commonbullet
Zenith77
Veteran Member
Join Date: Aug 2005
Old 10-06-2006 , 19:20   Re: 'controlling' damage taken
Reply With Quote #2

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.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
commonbullet
Veteran Member
Join Date: Oct 2005
Old 10-06-2006 , 21:25   Re: 'controlling' damage taken
Reply With Quote #3

Thanks, I'll check that.
commonbullet is offline
Send a message via ICQ to commonbullet Send a message via MSN to commonbullet
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 10-06-2006 , 22:00   Re: 'controlling' damage taken
Reply With Quote #4

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.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Zenith77
Veteran Member
Join Date: Aug 2005
Old 10-06-2006 , 22:05   Re: 'controlling' damage taken
Reply With Quote #5

Any specific reason for setting their health to exactly 1124 or is that just a random number?
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
commonbullet
Veteran Member
Join Date: Oct 2005
Old 10-06-2006 , 22:14   Re: 'controlling' damage taken
Reply With Quote #6

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.
commonbullet is offline
Send a message via ICQ to commonbullet Send a message via MSN to commonbullet
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 04:50.


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