Disabling damange once reaching a certain amount
#7

PHP Code:
public OnPlayerWeaponShot(playeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ)
{
    if(
hittype == BULLET_HIT_TYPE_PLAYER)
    {
        if(
hitid != INVALID_PLAYER_ID)
        {
            new 
Float:hp;
            
GetPlayerHealth(hitidhp);
            if(
hp <= 5.0 && GetPlayerWeapon(playerid) == WEAPON_DEAGLE) return 0//Return 0 means the one who got shot (hitid) is not going to take damage
            //Change the hp as you wish it but that's how i understand what you said
        
}
    }
    return 
1;

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)