When hit a player
#1

Hello! I have one idea. Maybe good, maybe not. So, when you shoot somebody and hit him, a TextDraw, SendClientMessage, GameText (no matter) says next " You hit player (blablabla) and decrease his health on (blablabla) points". Is it possible to do? If it is, help please. Tried to search, got nothing.
Reply
#2

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

I dont think this is possible


P.S why would you wanna do this, itd spam the screen, lol!
Reply
#4

Thanks. Maybe another thoughts will come.
Reply
#5

Yeah, there really is no efficient way of doing this.
Reply
#6

Hm...But I saw that is realisied at least on one server.
Reply
#7

Yeah it can be done but not efficiently. So it would be buggy.
Reply
#8

Yes, but you can try to do it, and I dont have even ad idea.
Reply
#9

There is a script called Useful Callbacks which contains a whole range of callabacks!

Including, OnPlayerLoseHealth!!!! Use that!
Reply
#10

Quote:
Originally Posted by Tigerbeast11
There is a script called Useful Callbacks which contains a whole range of callabacks!

Including, OnPlayerLoseHealth!!!! Use that!
well it doesnt have a shooter id^^
but it would be halfpossible to script this
but it wouldnn't be so correct anytime^^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)