[Tutorial] How to make an anti-teamkill -Easy- (with OPSP)
#10

If you try to hit a team it kills you? Hmm not good you will die everytime.

Try using this guys:

On top:

pawn Code:
forward TeamProtection();
And this under OnGameModeInit

pawn Code:
SetTimer("TeamProtection", 5000 ,true);
And anywhere in GM.

pawn Code:
public TeamProtection()
{
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            SetPlayerTeam(i, gTeam[i]);
        }
    }
}
This code is 100% working if you put it rite paths.

Thanks.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)