SA-MP Forums Archive
GetPlayerTeam / SetPlayerTeam issues? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: GetPlayerTeam / SetPlayerTeam issues? (/showthread.php?tid=101285)



GetPlayerTeam / SetPlayerTeam issues? - Redirect Left - 09.10.2009

Is anyone having issues with Get/Set PlayerTeam? Sometimes, they appear to not work for me, so I have to use another variable, can anyone confirm, or just me doing it wrong?


Re: GetPlayerTeam / SetPlayerTeam issues? - Limex - 10.10.2009

There are problems with them in 0.2, but in 0.3 it is fixed apparently. Let me find the bug link.


Re: GetPlayerTeam / SetPlayerTeam issues? - Extremo - 10.10.2009

Well, as the wiki doesn't work and as I couldn't find anything yet about the GetPlayerTeam if its bugged or not, I am guessing it might be. Here is a topic which seems to have encountered problems with the teams too. If SetPlayerTeam and GetPlayerTeam don't work at the moment, just use a static gTeam[MAX_PLAYERS] variable or anything similar and assign players their team there.


Re: GetPlayerTeam / SetPlayerTeam issues? - Redirect Left - 10.10.2009

I use Get/SetPlayerTeam for friendly fire off though


Re: GetPlayerTeam / SetPlayerTeam issues? - Jay_ - 10.10.2009

Something does seem to be bugged with it. GetPlayerTeam had an issue with returning NO_TEAM in 0.2x, not sure if that was fixed, but in 0.3 team's seem to completely fail for me.

Код:
public OnFilterScriptInit()
{
  for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
  {
    SetPlayerTeam(playerid, 1);
  }
}
Try loading that, and shooting other players :S