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
#2

ID 0 On The Server?
Or ID 0 From the Teams?
Reply
#3

Quote:
Originally Posted by kavkus
ID 0 On The Server?
Or ID 0 From the Teams?
On the server, when someone has the id 0, and they shoot someone on their team, there team mate takes damage, from id 0..
Reply
#4

Okay, i understand,
but why u post OnPlayerSpawn?
I Dont know your prob,
when ID 1 shoot at an other ID they take damage too or?
Reply
#5

Omg, ONLY ID 0 CAN TEAM KILL. If you dont know how to help, dont reply
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)