Anti-Team-Kill
#1

How to Make a Anti-Team_kill Using
pawn Код:
gTeam //?
Reply
#2

Take a look :
pawn Код:
enum E_TEAMS ( <<= 1 )
{
    TEAM_VAGOS,
    TEAM_GROVE
}

new E_TEAMS: gTeam[ MAX_PLAYERS ] = { TEAM_VAGOS, ... };

public OnPlayerRequestClass( playerid, classid )
{
    switch ( classid )
    {
        case 0: gTeam[ playerid ] = TEAM_VAGOS;
    }
    return 1;
}

public OnPlayerDeath( playerid, killerid, reason )
{
    if ( gTeam[ killerid ] == gTeam[ playerid ] )
    {
        GameTextForPlayer( killerid, "~w~BANNED FOR TEAMKILLING", 1000, 3 );
        Ban( killerid );  
    }

    return 1;
}
Reply
#3

Or, you can just set them to the same team... SetPlayerTeam

When using SetPlayerTeam (last time i checked) it disables damage to teammates.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)