if(issuerid != INVALID_PLAYER_ID && weaponid == 34 && bodypart == 9) { SetPlayerHealth(playerid, 0.0); } if(issuerid != INVALID_PLAYER_ID && weaponid == 25 && bodypart == 9) { SetPlayerHealth(playerid, 0.0); } if(issuerid != INVALID_PLAYER_ID && weaponid == 27 && bodypart == 9) { SetPlayerHealth(playerid, 0.0); } if(issuerid != INVALID_PLAYER_ID && weaponid == 26 && bodypart == 9) { SetPlayerHealth(playerid, 0.0); } if(issuerid != INVALID_PLAYER_ID && weaponid == 30 && bodypart == 9) { SetPlayerHealth(playerid, 0.0); } if(issuerid != INVALID_PLAYER_ID && weaponid == 31 && bodypart == 9) { SetPlayerHealth(playerid, 0.0); } if(issuerid != INVALID_PLAYER_ID && weaponid == 24 && bodypart == 9) { SetPlayerHealth(playerid, 0.0); }
new array[x] = {24,25,34,etc,etc...} if(issuerid != INVALID_PLAYER_ID && weaponid == arrayvalues && bodypart == 9) { }
new array[7]; array = {24, 25, 26, 27, 30, 31, 34}; new i; for (i=0; i<7; i++) { } if(issuerid != INVALID_PLAYER_ID && weaponid == array[i] && bodypart == 9) { SetPlayerHealth(playerid, 0.0); }
if(issuerid != INVALID_PLAYER_ID && weaponid == 31 || 30 || 24 || 34 && bodypart == 9) { SetPlayerHealth(playerid, 0); }
switch(weaponid) { }
if(issuerid != INVALID_PLAYER_ID && weaponid == 31 && bodypart == 9) { SetPlayerHealth(playerid, 0); }
if(issuerid != INVALID_PLAYER_ID && weaponid == 31 && bodypart == 9) return SetPlayerHealth(playerid, 0);
if(issuerid != INVALID_PLAYER_ID && weaponid == 31 && bodypart == 9 || issuerid != INVALID_PLAYER_ID && weaponid == 30 && bodypart == 9 || issuerid != INVALID_PLAYER_ID && weaponid == 24 && bodypart == 9)
Try one of this:
pawn Код:
pawn Код:
pawn Код:
|
if(issuerid != INVALID_PLAYER_ID && bodypart == 9)
{
switch(weaponid) { case 24 .. 27, 30, 31, 34: SetPlayerHealth(playerid, 0.0); }
}
if(issuerid != INVALID_PLAYER_ID && (weaponid == 34 || weaponid == 35 || weaponid == 27 ||weaponid == 26 || weaponid == 30 || weaponid == 31 ||weaponid == 24) && bodypart == 9)
{
SetPlayerHealth(playerid,0);
GameTextForPlayer(playerid, "~r~Headshotted", 3000, 3);
}