AntiTeamKill with gTeam
#1

how to abuse it?
Reply
#2

Want Anti-Team Kill?
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid == INVALID_PLAYER_ID)
    {
        SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
        } else {
        if(gTeam[killerid] != gTeam[playerid])
        {
            // Valid kill
            SendDeathMessage(killerid,playerid,reason);
            SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
            GivePlayerMoney(killerid, 1000);
        }
        else
        {
            //Team Killer!
            new warning[256];
            format(warning, sizeof(warning), "Be careful! You have been punished for teamkilling.");
            SendClientMessage(killerid, 0xFFFF00AA, warning);
            SendDeathMessage(killerid,playerid,reason);
            GivePlayerMoney(killerid, -1000);
            SetPlayerScore(killerid, GetPlayerScore(killerid) - 1);
        }
    }
    return 1;
}
Reply
#3

and how to use?
ToggleFriendlyFire?
Reply
#4

SetPlayerTeam.
Reply
#5

it's please write
Reply
#6

Quote:
Originally Posted by buzifej
Посмотреть сообщение
how to abuse it?
Why would you wanna abuse It?

*This forum requires that you wait 60 seconds between posts. Please try again in 5 seconds.*
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)