ID 0 can team kill.. [UNSOLVED]
#1

Hello, I have a script that disables people from teamkilling, it works on everyone but ID 0..

I dont know why, but heres the script.

pawn Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerToTeamColor(playerid);

    if (gTeam[playerid] == TEAM_TRIAD)
{
  SetPlayerTeam(playerid, TEAM_TRIAD);
}
    else if (gTeam[playerid] == TEAM_CASINO)
{
  SetPlayerTeam(playerid, TEAM_CASINO);
}
    else if (gTeam[playerid] == TEAM_POLICE)
{
  SetPlayerTeam(playerid, TEAM_POLICE);
}
    else if (gTeam[playerid] == TEAM_MAFIA)
{
  SetPlayerTeam(playerid, TEAM_MAFIA);
}
    else if (gTeam[playerid] == TEAM_ARMY)
{
  SetPlayerTeam(playerid, TEAM_ARMY);
}
    else if (gTeam[playerid] == TEAM_REDNECK)
{
  SetPlayerTeam(playerid, TEAM_REDNECK);
}
    else if (gTeam[playerid] == TEAM_PILOT)
{
  SetPlayerTeam(playerid, TEAM_PILOT);
}
    else if (gTeam[playerid] == TEAM_RAIL)
{
  SetPlayerTeam(playerid, TEAM_RAIL);
}
    else if (gTeam[playerid] == TEAM_ADMIN && IsPlayerAdmin(playerid))
{
  SetPlayerTeam(playerid, TEAM_ADMIN);
    GivePlayerWeapon(playerid, 46, 500);
}
    else
{
  SendClientMessage(playerid,COLOR_RED,"You're not an Administrator! Choose another team!");
    SetPlayerHealth(playerid, 0.0);
    ForceClassSelection(playerid);
}
    return 1;
}
How can I fix this?
Reply


Messages In This Thread
ID 0 can team kill.. [UNSOLVED] - by _Vortex - 16.08.2009, 22:22
Re: ID 0 can team kill.. - by kavkus - 16.08.2009, 22:39
Re: ID 0 can team kill.. - by _Vortex - 16.08.2009, 22:41
Re: ID 0 can team kill.. - by kavkus - 16.08.2009, 22:43
Re: ID 0 can team kill.. - by _Vortex - 16.08.2009, 23:51

Forum Jump:


Users browsing this thread: 1 Guest(s)