07.11.2009, 15:48
Well, I think this is possible but hard to script. I know only one way of doing that:
When player lose some health, you check all other players in a certain range from his position. If someone have a gun and this gun can do damage on such distance, and if his face is turned to that player, and he press KEY_FIRE or KEY_SECONDARY_ATTACK (correct me if I'm wrong), then POSSIBLY he has hit the player.
This is just theory.
For health checking you can use YUP by ****** (it has OnPlayerHealthChange callback), or something else.
When player lose some health, you check all other players in a certain range from his position. If someone have a gun and this gun can do damage on such distance, and if his face is turned to that player, and he press KEY_FIRE or KEY_SECONDARY_ATTACK (correct me if I'm wrong), then POSSIBLY he has hit the player.
This is just theory.
For health checking you can use YUP by ****** (it has OnPlayerHealthChange callback), or something else.