AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Making a person "unkillable" for one player only (for TS) (https://forums.alliedmods.net/showthread.php?t=45280)

TiToTal 09-27-2006 18:06

Making a person "unkillable" for one player only (for TS)
 
As the Title says, I am trying to make all damage made by a specific player be 0.

One specific player cant kill another specific player... And others can so.

stupok 09-27-2006 19:58

Re: Making a person "unkillable" for one player only (for TS)
 
I'd like to clarify what you want done.

Here's an example:

PLAYERS: A B C D

A can't kill B
C can kill B
D can kill B

B can kill A,C,D

A,C,D can kill each other.

TiToTal 09-27-2006 20:16

Re: Making a person "unkillable" for one player only (for TS)
 
Yes... exactly...

TiToTal 09-27-2006 20:19

Re: Making a person "unkillable" for one player only (for TS)
 
If A and B can't kill each other would be nice too... one or other is okay for me...


(Sorry my newbie english, lol...)

wonsae 09-27-2006 20:23

Re: Making a person "unkillable" for one player only (for TS)
 
PHP Code:

public client_damage(attackervictimdamagewpnindexhitplaceTA)
{
set_user_health(id,get_user_health(id) + damage)
    return 
PLUGIN_HANDLED


Maybe this :\?

Zenith77 09-27-2006 21:52

Re: Making a person "unkillable" for one player only (for TS)
 
No. I would recomend set_user_hitzones() in the fun module, but it's known to be extremly buggy. You should look into surf tools or something, as this requires the programmer to manually hook traceline and what not and block some stuff.

Jordan 09-27-2006 21:56

Re: Making a person "unkillable" for one player only (for TS)
 
Quote:

Originally Posted by wonsae (Post 385244)
PHP Code:

public client_damage(attackervictimdamagewpnindexhitplaceTA)
{
set_user_health(id,get_user_health(id) + damage)
    return 
PLUGIN_HANDLED


Maybe this :\?

I think in order for this to work you'd need to check if the attacker was some person first... eg:

Code:
public client_damage(attacker, victim, damage, wpnindex, hitplace, TA) { if(get_user_attacker(id) == )//<-- put person here { set_user_health(id,get_user_health(id) + damage)     return PLUGIN_HANDLED; } }

jim_yang 09-27-2006 23:08

Re: Making a person "unkillable" for one player only (for TS)
 
does the damage type include headshot, if headshot, is there a chance to set their health?

Silencer123 09-28-2006 08:20

Re: Making a person "unkillable" for one player only (for TS)
 
There is one Problem:
Lets say A has 100 health. B has AWP and hits A in his Head.
A gets 400 damage has -300 health and dies.
A gets 400 health and is dead with 100 Health.
You must do a forward, which I do not know much about, yet.

Xanimos 09-28-2006 08:36

Re: Making a person "unkillable" for one player only (for TS)
 
Quote:

Originally Posted by Zenith77 (Post 385271)
No. I would recomend set_user_hitzones() in the fun module, but it's known to be extremly buggy. You should look into surf tools or something, as this requires the programmer to manually hook traceline and what not and block some stuff.

You should use set_user_hitzones() as Zenith says. And it is not buggy. People often make a bug report becuase "it doesn't work" but that is because they aren't using it correctly. It works fine.


All times are GMT -4. The time now is 04:49.

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