AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Stopping TFC damage (https://forums.alliedmods.net/showthread.php?t=46995)

NomadCF 11-06-2006 22:33

Stopping TFC damage
 
I was wondering if some one could be with trying to figure out how to stop differnt kinds of damage from happing.

After using the search, I've learned how to stop bullets.. but not any other kind of damage. I've looked at the gernade multipliers but they hook damage event. Which when your trying to stop damage really doesn't work if the damge dealt to you is more then your life total.

The Specialist 11-06-2006 22:38

Re: Stopping TFC damage
 
if you can hook a damage event , you can stop the damage . hook the event properly then just put a return PLUGIN_HANDLED in and it SHOULD stop the event. SHOULD:up:

NomadCF 11-06-2006 22:53

Re: Stopping TFC damage
 
Quote:

Originally Posted by The Specialist (Post 400664)
if you can hook a damage event , you can stop the damage . hook the event properly then just put a return PLUGIN_HANDLED in and it SHOULD stop the event. SHOULD:up:

nope, but you still can die and even more even things that don't kill you your player reacts to. Makes sounds like being shot etc.

I again I'm trying to learn now to prevent damage from the start. Aka like it never hit you...

But I do that you for the insight, And I did try it again after reading your post.

teame06 11-06-2006 23:36

Re: Stopping TFC damage
 
Quote:

Originally Posted by The Specialist (Post 400664)
if you can hook a damage event , you can stop the damage . hook the event properly then just put a return PLUGIN_HANDLED in and it SHOULD stop the event. SHOULD:up:

Damage Event is just a message event. You can't use register_message to block the damage that already dealt. This only block the message itself only. Damage is already dealt by the time you get this message.

The Specialist 11-06-2006 23:50

Re: Stopping TFC damage
 
OOHHh ok. like i said it was only a "theory" lol. just a suggestion. :up:

NomadCF 11-07-2006 00:41

Re: Stopping TFC damage
 
I should have also noted that (if possible) I would like from the attackers side to keep everything the same. Aka the only thing I want to change is that the victim is never dealt the damge, but everything else about the attack would be fine.

Example #1: If a gernade when off, I'd still like the player to be thrown like normal.

VEN 11-07-2006 05:09

Re: Stopping TFC damage
 
Would godmode be fine?

NomadCF 11-07-2006 09:51

Re: Stopping TFC damage
 
I hoping to avoid doing it that way so that I might have the option to allow some kind of damage though.. like a crowbar attack

VEN 11-07-2006 11:30

Re: Stopping TFC damage
 
I just tryed to set pev's, client data's and entity state's Health value to positive one every FM_PlayerPreThink/FM_PlayerPostThink, FM_UpdateClientData and FM_AddToFullPack call just to see if it could block the death caused by damage (in CS), but no luck.

stupok 11-07-2006 17:24

Re: Stopping TFC damage
 
Is the damage event called if the client has godmode enabled?


All times are GMT -4. The time now is 06:54.

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