08.03.2013, 03:16
Hello guys, how to make enable/disable Anti Team Kill ?
The code :
how to make enable/disable with command ?
The code :
Код:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
if ( Shooter != INVALID_PLAYER_ID )
{
if ( GetPlayerTeam( Target ) == GetPlayerTeam( Shooter ) ) // check if the victim is from the same team as the shooter.
{
new Float:hp;
GetPlayerHealth(Target, hp);
SetPlayerHealth(Target, hp + HealthLost);
SetPlayerHealth( Shooter, 0 );
SendClientMessage( Shooter, COLOR_RED, "Team killing is not allowed!" );
GivePlayerMoney( Shooter, - 5000 );
}
}
return 1;
}

