team attack help
#1

i have this code about anti team attack but isn't working...
does anyone know how to fix this?
i want to do it when a player attacks hes team he will be like in god mode and dont get damage...


and about the setplayerwantedlevel is working but when a cop attacks a cop he gets wanted .. how do i make it to not get wanted when cop attacks a cop
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    if(GetPlayerTeam(playerid) == Team_Cop)
    {
        GameTextForPlayer(issuerid,"~r~Don't attack your team mates!", 3000, 3);
    }
    if(GetPlayerTeam(playerid) == Team_grove)
    {
        GameTextForPlayer(issuerid,"~r~Don't attack your Grove Street Family !", 3000, 3);
    }
    if(GetPlayerTeam(playerid) == Team_ballas)
    {
        GameTextForPlayer(issuerid,"~r~Don't attack Ballas OG's they are your team mates !", 3000, 3);
    }
    if (GetPlayerWantedLevel(issuerid) == 0)
    {
        SetPlayerWantedLevel(issuerid, 3);
        WantedLevelColor(issuerid);
    }
    if(issuerid != INVALID_PLAYER_ID)
    {
        new str[26];
        format(str, sizeof(str),"-%.0f", amount);
        SetPlayerChatBubble(playerid, str, 0xFF0000FF, 100.0, 2000);
        PlayerPlaySound(issuerid,17802,0.0,0.0,0.0);
    }
    return 1;
}
Reply


Messages In This Thread
team attack help - by iThePunisher - 20.03.2014, 22:40
AW: team attack help - by Macronix - 20.03.2014, 22:42
Re: team attack help - by iThePunisher - 20.03.2014, 22:47
Re: team attack help - by Abagail - 20.03.2014, 22:58
AW: team attack help - by Macronix - 20.03.2014, 23:03
Re: team attack help - by iThePunisher - 21.03.2014, 10:42

Forum Jump:


Users browsing this thread: 1 Guest(s)