Will this work? (Anti team kill) (rep++)
#5

Are'nt you stealing my script ROFL [I almost have same teams in my new GM]? I guess you're from India as noone will ever add India And Pakistan in teams.

You have gTeams[MAX_PLAYERS]; Declared in your game mode? Then use this.
pawn Код:
forward SetTeamToPlayer(playerid);
public SetTeamToPlayer(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        if(gTeam[playerid] == TEAM_INDIA) { SetPlayerTeam(playerid, TEAM_INDIA); }
        else if(gTeam[playerid] == TEAM_GERMANY) { SetPlayerTeam(playerid, TEAM_GERMANY); }
        else if(gTeam[playerid] == TEAM_USA) { SetPlayerTeam(playerid, TEAM_USA); }
        else if(gTeam[playerid] == TEAM_RUSSIA) { SetPlayerTeam(playerid, TEAM_RUSSIA); }
        else if(gTeam[playerid] == TEAM_PAKISTAN) { SetPlayerTeam(playerid, TEAM_PAKISTAN); }
    }
    return 1;
}

//Add this line under OnPlayerSpawn(playerid)
SetTeamToPlayer(playerid);
Reply


Messages In This Thread
Will this work? (Anti team kill) (rep++) - by iOmar - 06.05.2012, 04:39
Re: Will this work? (Anti team kill) (rep++) - by DeathTone - 06.05.2012, 04:42
Re: Will this work? (Anti team kill) (rep++) - by iOmar - 06.05.2012, 04:44
Respuesta: Will this work? (Anti team kill) (rep++) - by Chris1337 - 06.05.2012, 04:47
Re: Will this work? (Anti team kill) (rep++) - by Ballu Miaa - 06.05.2012, 04:47
Re: Will this work? (Anti team kill) (rep++) - by iOmar - 06.05.2012, 04:50
Re: Will this work? (Anti team kill) (rep++) - by Ballu Miaa - 06.05.2012, 04:53

Forum Jump:


Users browsing this thread: 1 Guest(s)