[Tutorial] Make Teams and Anti Team-Kill (gTeam)
#5

Quote:
Originally Posted by K0UMA
View Post
You could use OnPlayerShootPlayer https://sampforum.blast.hk/showthread.php?tid=195439

Code:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
    if ( Shooter != INVALID_PLAYER_ID )
    {
        if ( GetPlayerTeam( Target ) == GetPlayerTeam( Shooter ) )
        {

            new Float:hp;
            GetPlayerHealth(Target, hp);
            SetPlayerHealth(Target, hp + HealthLost);
        }
    }
    return 1;
}
If you checked in the link you gave it will say: EDIT 2013: THIS INCLUDE IS OLD AND OUTDATED! SA-MP HAS DEVELOPED NATIVE FUNCTIONS FOR THIS.

But there is a similar code to OnPlayerShootPlayer but better, you can see it in the wiki here.
Reply


Messages In This Thread
Make Teams and Anti Team-Kill (gTeam) - by Gokhan152 - 14.06.2015, 07:24
Re: Make Teams and Anti Team-Kill (gTeam) - by Gokhan152 - 17.06.2015, 05:17
Re: Make Teams and Anti Team-Kill (gTeam) - by MichaelJones - 25.06.2015, 17:12
Re: Make Teams and Anti Team-Kill (gTeam) - by K0UMA - 26.06.2015, 02:27
Re: Make Teams and Anti Team-Kill (gTeam) - by Youssef221 - 26.06.2015, 05:31
Re: Make Teams and Anti Team-Kill (gTeam) - by Vince - 26.06.2015, 07:05
Re: Make Teams and Anti Team-Kill (gTeam) - by Joron - 15.12.2015, 22:48

Forum Jump:


Users browsing this thread: 1 Guest(s)