25.01.2015, 17:25
Код:
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; }