Anti team-attack
#6

Quote:
Originally Posted by Vince
View Post
I don't see why you'd need either of those. Guest123 is partially correct with SetPlayerTeam, but OnPlayerUpdate is severe overkill. Setting the team once on spawn is enough.
Yes, but i think you or i are reading the first post wrong.
I thought he asks to create a anti friendly fire system. (I Assumed he already got something like that what defines the players team)

I thought he needed something like this :
pawn Code:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
    if(issuerid != INVALID_PLAYER_ID)
    {
        if(PlayerInfo[playerid][gTeam] == PlayerInfo[playerid][gTeam])
        {
            new Float:health, Float:newhealth;
            health = GetPlayerHealth(playerid, health);
            newhealth = health += amount;
            SetPlayerHealth(playerid, newhealth);
        }
    }
}
Reply


Messages In This Thread
Anti team-attack - by TheSnaKe - 09.06.2013, 11:14
Re: Anti team-attack - by Guest123 - 09.06.2013, 11:35
Re: Anti team-attack - by Facerafter - 09.06.2013, 11:51
Re: Anti team-attack - by Vince - 09.06.2013, 12:20
Re: Anti team-attack - by TheSnaKe - 09.06.2013, 12:22
Re: Anti team-attack - by Facerafter - 09.06.2013, 12:29
Re: Anti team-attack - by TheSnaKe - 09.06.2013, 12:42
Re: Anti team-attack - by Aly - 09.06.2013, 12:54
Re: Anti team-attack - by TheSnaKe - 09.06.2013, 13:10
Re: Anti team-attack - by dEcooR - 09.06.2013, 13:41

Forum Jump:


Users browsing this thread: 2 Guest(s)