Does SetPlayerTeam still not 100% work?
#1

Well, I'm still having problems with SetPlayerTeam, some people can team-kill people on their teams, wile some cant.

Does someone have an alternative or is there something I may be doing wrong?
Reply
#2

Well, Show us a bit of code your having trouble with.
Reply
#3

Код:
public OnPlayerSpawn(playerid)
{
	if (gTeam[playerid] == TEAM_TRIAD)
{
  SetPlayerTeam(playerid, TEAM_TRIAD);
  	SetPlayerColor(playerid, COLOR_YELLOWGREEN);
}
	else if (gTeam[playerid] == TEAM_CASINO)
{
  SetPlayerTeam(playerid, TEAM_CASINO);
  SetPlayerColor(playerid, COLOR_DARKORANGE);
}
	else if (gTeam[playerid] == TEAM_POLICE)
{
  SetPlayerTeam(playerid, TEAM_POLICE);
  SetPlayerColor(playerid, COLOR_NAVY);
}
	else if (gTeam[playerid] == TEAM_MAFIA)
{
  SetPlayerTeam(playerid, TEAM_MAFIA);
  SetPlayerColor(playerid, COLOR_MAGENTA);
}
	else if (gTeam[playerid] == TEAM_ARMY)
{
  SetPlayerTeam(playerid, TEAM_ARMY);
  SetPlayerColor(playerid, COLOR_DARKGREEN);
}
	else if (gTeam[playerid] == TEAM_REDNECK)
{
  SetPlayerTeam(playerid, TEAM_REDNECK);
  SetPlayerColor(playerid, COLOR_DARKRED);
}
	else if (gTeam[playerid] == TEAM_PILOT)
{
  SetPlayerTeam(playerid, TEAM_PILOT);
  SetPlayerColor(playerid, COLOR_OLIVE);
}
	else if (gTeam[playerid] == TEAM_RAIL)
{
  SetPlayerTeam(playerid, TEAM_RAIL);
  SetPlayerColor(playerid, COLOR_DARKKHAKI);
}
	return 1;
}
Even though I'm using SetPlayerTeam (which is suppose to make team-killing impossible) some people are able to team-kill, wile others are not..
Reply
#4

I saw somewhere, that you need to have a timer, setting the teams again(im not sure if its working). You can also make a command getting the player's team, so you can debug it when someone is killing teammates.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)