Pentalty to teamkill.
#1

How would i make it so... if you teamkill YOU die? or such. but if you kill other team u dont?

Please help.... i think i have idea how but i dont know how to put the code for either side...

Yes im new scripter laugh.
Reply
#2

If you use gTeam

OnPlayerDeath add:
pawn Код:
if(gTeam[killerid] == gTeam[playerid])
{
SetPlayerHealth(killerid,0.0);
SendClientMessage(killerid,COLOR,"Killed for teamkilling!");
}
Reply
#3

well it compiled.. idk if it gonna work... cant test on myself >_> gotta wait lol
Reply
#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
#5

thx venom testing now..
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)