Clientside Headshot script.

Hello. First off, before anyone says I’m an idiot or something for not knowing how to do this, I literally took a crash course into learning Lua by decoding addon scrips. I can understand a lot of the code at first glance, but I can’t actually make my own other than edit a line here or there to my own desires so far.

That said, I’m looking for a simple script that will register kills by headshot on NPCs, and possibly players, emit a sound of choice, and put a little popup somewhere. But it must be clientside.

I don’t care if it won’t be compatible for server use, not really an issue to me. I mostly stick to singleplayer most of the time anyways, but if the script works on a server so it simply tells me I killed a player with a headshot, then that’s awesome.

Thanks ahead of time for anyone that takes a crack at giving me a hand with this.

(User was banned for this post ("Wrong forum" - Grea$eMonkey))

use the PlayerTakeDamage hook or whatever and usermessage it to the client. Wiki both of these things.

It’s ScalePlayerDamage, you want to check the hitgroup and if so send a usermessage to the client. I would probably send the dmginfo arg to the client, that should provide enough information. Also, how was this the wrong section? It was a request in all…