Anti-Team attack thing
#1

I've tried doing this several times, but never succeeded ;__;
Here's the script I've currently got:
(Ignore the first part)
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    if(issuerid != INVALID_PLAYER_ID)
    {
        if(gTeam[issuerid] != gTeam[playerid])
        {
            PlayerPlaySound(issuerid,17802,0.0,0.0,0.0);
        }
    }
    if(gTeam[issuerid] == gTeam[playerid])
    {
        if(issuerid != INVALID_PLAYER_ID)
        {
            if( !InGG{ issuerid } || !InWZ{ issuerid } || !InDuel{ issuerid } )
            {
                if( !AdminDuty{  issuerid } || !AdminDuty{ playerid } )
                {
                    GameTextForPlayer(issuerid, "~r~Don't team-attack!", 3500, 3);
                    /*new Float:health, Float:newhealth;
                    health = GetPlayerHealth(playerid, health);
                    newhealth = health -= amount;
                    SetPlayerHealth(playerid, newhealth);
                    new Float:armour, Float:newarmour;
                    armour = GetPlayerArmour(playerid, armour);
                    armour = armour -= amount;
                    SetPlayerArmour(playerid, newarmour);*/

                }
            }
        }
    }
//Rest of script here
I tried with the "newhealth = health" bla bla, but due to it it made the armour be removed, and health be set to 5 or something D:
Reply


Messages In This Thread
Anti-Team attack thing - by Kyance - 15.02.2014, 18:17
Re: Anti-Team attack thing - by CuervO - 15.02.2014, 19:43
Re: Anti-Team attack thing - by Vanter - 15.02.2014, 19:45
Re: Anti-Team attack thing - by CuervO - 15.02.2014, 19:47
Re: Anti-Team attack thing - by Kyance - 16.02.2014, 05:22
Re: Anti-Team attack thing - by Scenario - 16.02.2014, 05:26
Re: Anti-Team attack thing - by CuervO - 16.02.2014, 05:35
Re: Anti-Team attack thing - by Kyance - 16.02.2014, 07:33
Re: Anti-Team attack thing - by CuervO - 16.02.2014, 08:00
Re: Anti-Team attack thing - by Kyance - 16.02.2014, 08:57

Forum Jump:


Users browsing this thread: 1 Guest(s)