• headshots?
    4 replies, posted
Is there anyway I can make the killfeed register headshots properly, like with a headshot icon?
I don't know exactly, but I would do it in the ScaleDamage hook. Check if the bodygroup is the player's head, and create a short timer to check if he's dead. (This would assume he died from a headshot) But, I don't think ScaleDamage is called every time a player is hurt. I don't know how else you would do it, assuming this would work (Even if hacky.) :l
you could use PlayerDeath, I am pretty sure that there is a function to check the hitgroup since PlayerDeath doesn't accept a hitgroup parameter
[b][url=http://wiki.garrysmod.com/?title=Killicon.Add]Killicon.Add [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] [b][url=wiki.garrysmod.com/?title=Gamemode.DoPlayerDeath]Gamemode.DoPlayerDeath [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
The only way I could think to do this would be to: Using an EntityTakeDamage hook, check to see if the hitgroup was the head (and of course if the victim HAD a head) Calculate the damage and the victim's health to see if he died from the damage If he died, rapidly change the inflictor's (the weapon's) killicon to a headshot icon, and then, after the kill notification was drawn, Change the weapon's killicon back to normal. That's EXTREMELY hacky, and I'm not even sure if it would work because I don't know when a kill notification gets drawn so I'm not sure how you would do it quick enough or fix it afterwards. As far as I know, there's no way to intercept sandbox's kill-notification-draw-event, so we really need an admin in here or someone who knows alot about lua. This thread is relevant to my interests as well (making a SWEP pack).
Sorry, you need to Log In to post a reply to this thread.