Anti-Team-Kill
#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


Messages In This Thread
Anti-Team-Kill - by 0_o - 14.06.2011, 02:48
Re: Anti-Team-Kill - by Basicz - 14.06.2011, 04:12
Re: Anti-Team-Kill - by Pghpunkid - 14.06.2011, 04:28

Forum Jump:


Users browsing this thread: 1 Guest(s)