OnTakeDamage who is the cause?
#2
Wrong! Wrong, wrong, wrong and wrong. And wrong once again.
(sorry, I'm just enjoying it)

There is cPlayer:GetName(), more than that - it works (look at playerlist in webadmin).
cPawn could be cPlayer and could NOT be a cPlayer as well. Use cEntity:GetEntityType() to check if you're dealing with player. There is some trick I can't remember now to get a cPlayer instance from your cPawn instance.

And sorry, but you have a way to check what's causing damage. It's inside TakeDamageInfo.

But I'm wondering if you actually want your not-logged-in players to be prevented from just making damage to other players and what for you want it that way. Could be much easier to cancel left-click with OnBlockDig hook.
Reply
Thanks given by:


Messages In This Thread
OnTakeDamage who is the cause? - by ThuGie - 10-20-2012, 09:25 AM
RE: OnTakeDamage who is the cause? - by Taugeshtu - 10-22-2012, 08:53 PM



Users browsing this thread: 1 Guest(s)