public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost) { if (Shooter != INVALID_PLAYER_ID) { if (GetPlayerTeam(Target) == GetPlayerTeam(Shooter)) // check if the target is from the same team as the shooter. { new Float:hp; GetPlayerHealth(Target, hp); SetPlayerHealth(Target, hp + HealthLost); GameTextForPlayer(Shooter, "~r~Don't Team Kill!", 3000, 3); } } if ( Shooter != INVALID_PLAYER_ID ) { if (GetPlayerTeam(Target) != GetPlayerTeam(Shooter)) // check if the target is from the same team as the shooter. { SetPlayerHealth(Target, 0); GameTextForPlayer(Target, "~r~Head Shot!", 3000, 3); } } return 1; }
if(issuerid != INVALID_PLAYER_ID && weaponid == 34 && bodypart == 9)
{
if (GetPlayerTeam(Target) != GetPlayerTeam(Shooter))
{
SetPlayerHealth(Target, 0);
GameTextForPlayer(Target, "~r~Head Shot!", 3000, 3);
}
}
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLos t,Float:ArmourLost) { if (Shooter != INVALID_PLAYER_ID) { if (GetPlayerTeam(Target) == GetPlayerTeam(Shooter)) // check if the target is from the same team as the shooter. { new Float:hp; GetPlayerHealth(Target, hp); SetPlayerHealth(Target, hp + HealthLost); GameTextForPlayer(Shooter, "~r~Don't Team Kill!", 3000, 3); } } if ( Shooter != INVALID_PLAYER_ID ) { if (GetPlayerTeam(Target) != GetPlayerTeam(Shooter)) // check if the target is from the same team as the shooter. { SetPlayerHealth(Target, 0); GameTextForPlayer(Target, "~r~Head Shot!", 3000, 3); } } return 1; } |
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLos t,Float:ArmourLost) { if (Shooter != INVALID_PLAYER_ID) { if (GetPlayerTeam(Target) == GetPlayerTeam(Shooter)) // check if the target is from the same team as the shooter. { new Float:hp; GetPlayerHealth(Target, hp); SetPlayerHealth(Target, hp + HealthLost); GameTextForPlayer(Shooter, "~r~Don't Team Kill!", 3000, 3); } } if ( Shooter != INVALID_PLAYER_ID ) { if (GetPlayerTeam(Target) != GetPlayerTeam(Shooter)) // check if the target is from the same team as the shooter. { SetPlayerHealth(Target, 0); GameTextForPlayer(Target, "~r~Head Shot!", 3000, 3); } } return 1; } |
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLos t,Float:ArmourLost) { if (Shooter != INVALID_PLAYER_ID) { if (GetPlayerTeam(Target) == GetPlayerTeam(Shooter)) // check if the target is from the same team as the shooter. { new Float:hp; GetPlayerHealth(Target, hp); SetPlayerHealth(Target, hp + HealthLost); GameTextForPlayer(Shooter, "~r~Don't Team Kill!", 3000, 3); } } if ( Shooter != INVALID_PLAYER_ID ) { if (GetPlayerTeam(Target) != GetPlayerTeam(Shooter)) // check if the target is from the same team as the shooter. { SetPlayerHealth(Target, 0); GameTextForPlayer(Target, "~r~Head Shot!", 3000, 3); } } return 1; } |
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
if(weaponid == 34) SetPlayerHealth(playerid, 0);
return 1;
}