I want only headshots to do damage.
#2

Use https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage and check if bodypart is different of 9. If it is: SetPlayerHealth with his initial health, like:
PHP код:
public OnPlayerTakeDamage(playeridissueridFloat:amountweaponidbodypart)
{
    new 
Float:healthFloat:armour;
    
GetPlayerHealth(playeridhealth);
    
GetPlayerArmour(playeridarmour);
    if(
bodypart != 9) {
        
SetPlayerHealth(playeridhealth);
        
SetPlayerArmour(playeridarmour);
    }
    return 
1;

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: 3 Guest(s)