Little help for OnPlayerTakeDamage
#1

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!
Reply
#2

SetPlayerTeam ??
Reply
#3

Quote:

no longer receives Dega

Excuse me but what this mean ?
Reply
#4

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.
Reply
#5

Quote:
Originally Posted by Vukilore
Посмотреть сообщение
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.
Yes, this is exactly the problem, it is there are ways to avoid it?
Reply
#6

Quote:
Originally Posted by vardanega
Посмотреть сообщение
Yes, this is exactly the problem, it is there are ways to avoid it?
Je ne sais pas, j'utilise le mкme systиme pour mon serveur RP, et je ne me suis pas encore penchй sur le problиme. Essaye le IsPlayerInRangeOfPoint au pire


Sorry the others, i'm too lazy to translate to english.
Reply
#7

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)