head shot
#6

Here you go. Team mates wont be able to headsshot eachother

PHP код:
public OnPlayerTakeDamage(playeridissueridFloat:amountweaponidbodypart)
{
    if(
issuerid != INVALID_PLAYER_ID) { //if there is a shooter, probably not needed since besides another player, no one can shoot you in the head, but just in case
        
if(GetPlayerTeam(issuerid) != GetPlayerTeam(playerid)) { //if their teams dont match aka if they are not same team
            
switch(bodypart) {
                case 
9: { //if they got shot in the head
                    
SetPlayerHealth(playerid,0);
                    
Msg(playerid,COLOR_GREEN,"You have been headshotted");
                }
            }
        }
    }
    return 
true;

Reply


Messages In This Thread
head shot - by GeneralAref - 24.01.2016, 15:36
Re: head shot - by BiosMarcel - 24.01.2016, 16:27
Re: head shot - by FreAkeD - 24.01.2016, 16:38
Re: head shot - by Lumineux - 24.01.2016, 16:42
Re: head shot - by KillerDVX - 25.01.2016, 14:12
Re: head shot - by TwinkiDaBoss - 25.01.2016, 14:22

Forum Jump:


Users browsing this thread: 1 Guest(s)