Posts: 84
Threads: 24
Joined: Jul 2009
Reputation:
0
23.11.2012, 21:07
(
Последний раз редактировалось vardanega; 23.11.2012 в 22:06.
)
Hi,
I have a small problem, when a player pushes another player with a weapon, and OnPlayerTakeDamage call, how to make the player no longer receives damage while keeping OnPlayerTakeDamage?
No SetPlayerTeam !
Thanks!
Posts: 300
Threads: 24
Joined: Jan 2011
Reputation:
0
If you punch somebody with a gun in you hand, (i don't know if its a bug) OnPlayerGive/TakeDamage calcule it as a shot. So if you SetPlayerHealth - 50 with a minigun, every shot with this weapon will take 50HP to the player. And if you punch someone with a minigun in your hands, he'll loose 50 HP.
Punch is not detected when you are armed.
Posts: 1,363
Threads: 14
Joined: Apr 2009
Reputation:
0
if you want to prevent damage then you need to set everyone to the same team and then deal out all the damage via script.
When the server receives OnPlayerTakeDamage, that means that the player has already taken the damage, it's not something you can interrupt because the server doesn't know if a bullet is going to hit another player until the clients report it