Pentalty to teamkill.
#4

pawn Код:
//Top of Script
new TeamKilling[MAX_PLAYERS];

public OnPlayerDeath(playerid, killerid, reason)
{
    if(gTeam[killerid] == gTeam[playerid])
    {
        TeamKilling[killerid]++;
        SetPlayerHealth(killerid,0.0);
        if(TeamKilling[killerid] == 4)
        {
            new name[MAX_PLAYER_NAME], string[128];
            GetPlayerName(killerid, name, sizeof(name));
            format(string, sizeof(string), "[ADMIN] %s has been kicked Reason: Consecutive Team killing", name);
            SendClientMessageToAll(0xFFFF00AA, string);
            Kick(killerid);
        }
        return SendClientMessage(killerid,0xFFFF00AA,"You were Killed for teamkilling!");
    }
    return 1;
}
Reply


Messages In This Thread
Pentalty to teamkill. - by DiddyBop - 08.11.2009, 22:07
Re: Pentalty to teamkill. - by miokie - 08.11.2009, 22:20
Re: Pentalty to teamkill. - by DiddyBop - 08.11.2009, 22:26
Re: Pentalty to teamkill. - by AKA_Cross - 08.11.2009, 22:43
Re: Pentalty to teamkill. - by DiddyBop - 08.11.2009, 23:30

Forum Jump:


Users browsing this thread: 2 Guest(s)