I want only headshots to do damage.
#4

The problem with that code is that you can still die from bodyshots if your health is lower or equal to the damage done.

If you don't yet use SAMP's team system in your mode (or minigame, where you use this) you can set all players' teams to the same team and then only process headshot damage (players will not be able to damage each other, except for the damage you specifically allow).

Furthermore this uses OnPlayerTakeDamage, so the headshot must be done on the target's screen. If you shoot someone's head but this doesn't happen on their screen as well, it won't work.

Use OnPlayerGiveDamage if you want it to be dependant on the shooter's hit position.
Reply


Messages In This Thread
I want only headshots to do damage. - by Exhibit - 23.05.2018, 21:15
Re: I want only headshots to do damage. - by Chipardeur - 23.05.2018, 21:22
Re: I want only headshots to do damage. - by Exhibit - 23.05.2018, 22:23
Re: I want only headshots to do damage. - by NaS - 24.05.2018, 10:15
Re: I want only headshots to do damage. - by SeanDenZYR - 24.05.2018, 10:20
Re: I want only headshots to do damage. - by jlalt - 24.05.2018, 12:20
Re: I want only headshots to do damage. - by Logic_ - 24.05.2018, 12:34
Re: I want only headshots to do damage. - by CodeStyle175 - 24.05.2018, 12:44
Re: I want only headshots to do damage. - by jlalt - 25.05.2018, 09:28

Forum Jump:


Users browsing this thread: 1 Guest(s)