AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   client_damage help (https://forums.alliedmods.net/showthread.php?t=50640)

pRED* 01-30-2007 20:15

client_damage help
 
Hey

Is there any way to use client_damage or similar to stop the damage from actually occurring to the player.

I want to firstly compare the id's of the attacker and victim (easy) and then possibly stop the damage from happening if the id's are what the script was looking for.

Eg. Gives you god mode but only from specific people.

-e- I tried using set_user_health to add the damaged health back onto the player but obviously this acts too late to prevent death from headshots..

Thanks

lunarwolfx 01-30-2007 23:56

Re: client_damage help
 
The last time I checked, you can't actually block damage, but I think one of avalanches plugins diverts an attack, thus damage isn't done to a certain player.

You can also set the players hp to something really high like 355, and add health back when damage occurs like you said earlier, and then after all calculations are done, and the hp is less than 255, you can kill the player.

If you're going to go with the health method though, I would choose a higher number for hp because it's possible that you can fall off something really high and it would do more than 355 damage. Thus, the fall would kill you, and then after calculation is done, you get killed again while you're dead, which would cause two death messages.

pRED* 01-31-2007 01:34

Re: client_damage help
 
yea im working on using a bonus 512 hp (so it still shows 100hp in the hud, and prevents you from taking awp to the head and dieing) and then killing the player if need be.

Just seems to be a clumsy work around, ill look in avalanches plugin.

SweatyBanana 01-31-2007 01:36

Re: client_damage help
 
Best thing I could think of is:

prethink->player in viewcone->set attackers bullets to blanks

pRED* 01-31-2007 02:48

Re: client_damage help
 
I like, I like..

Figured out trace lines etc from looking through a couple of avalanches plug ins.

So I can do the first two steps easy. Now onto blanks..

-e- Yay for avalanche again. Found a post of his explaining how to edit TR_flFraction to stop bullets from connecting


All times are GMT -4. The time now is 00:36.

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