SA-MP Forums Archive
Some help with teams - 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: Some help with teams (/showthread.php?tid=94970)



Some help with teams - HuRRiCaNe - 02.09.2009

hey i want to noe if you can count the players on your team? im using gTeam


Re: Some help with teams - JaTochNietDan - 02.09.2009

pawn Код:
new TeamCount = 0;
for(new i; i < MAX_PLAYERS; i++)
{
  if(IsPlayerConnected(i))
  {
    if(gTeam[i] == TEAM_NAME)
    {
      TeamCount++;
    }
  }
}




Re: Some help with teams - HuRRiCaNe - 02.09.2009

thx for the fast reply JaTochNietDan will test it.
Edit: i wasnt specific , i wanted to count all the players in a gang.thx for the help.