AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to give teammate damage as like an enemy? (https://forums.alliedmods.net/showthread.php?t=85202)

griefhy 02-07-2009 07:50

How to give teammate damage as like an enemy?
 
How to use weapon give teammate damage ,as like an enemy?
It's Possible?
If possible,how ?
thanks!

bomnacama 02-07-2009 08:15

Re: How to give teammate damage as like an enemy?
 
you can use the ffa plugin. take a look at the code

SnoW 02-07-2009 08:15

Re: How to give teammate damage as like an enemy?
 
You are probably talking about mp_friendlyfire. Just set it to 1.

anakin_cstrike 02-07-2009 08:21

Re: How to give teammate damage as like an enemy?
 
Quote:

Originally Posted by SnoW (Post 757316)
You are probably talking about mp_friendlyfire. Just set it to 1.

It will receive with ~30% less than the real damage.

SnoW 02-07-2009 08:30

Re: How to give teammate damage as like an enemy?
 
Quote:

Originally Posted by anakin_cstrike (Post 757322)
It will receive with ~30% less than the real damage.

Ye. Still I just guessed it would be enough for him. I think that mp_friendlyfire does weapons give teammate damage as like an enemy. With mp_friendlyfire the hits act the same, even it doesn't do the exact same dmg.

hleV 02-07-2009 09:10

Re: How to give teammate damage as like an enemy?
 
Maybe this is what you want (not tested)?
Code:
#include <amxmodx> #include <hamsandwich>   public plugin_init() RegisterHam(Ham_TakeDamage, "player", "hTakeDamage");   public hTakeDamage(iVictim, iInflictor, iAttacker, Float:fDmg) {         if (!is_user_alive(iVictim) || !is_user_alive(iAttacker))                 return;           if (get_user_team(iVictim) != get_user_team(iAttacker))                 SetHamParamFloat(4, fDmg * 1.30); }

anakin_cstrike 02-07-2009 09:17

Re: How to give teammate damage as like an enemy?
 
Does the TA damage has the same percentaje everytime ?

hleV 02-07-2009 09:41

Re: How to give teammate damage as like an enemy?
 
I've made some tests and the result is ~2.9 times less damage to a teammate than enemy.

So if setting fDmg * 2.9, the damage done to teammate would be almost the same as to enemy.

bomnacama 02-07-2009 09:49

Re: How to give teammate damage as like an enemy?
 
I think with ffa plugin the damage done to teammate is same as to enemy.

hleV 02-07-2009 10:08

Re: How to give teammate damage as like an enemy?
 
Yes. But it also count TK as enemy kill, no team attack message, no -frag ant etc.


All times are GMT -4. The time now is 17:08.

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