Should work.
PHP Code:
GetRandomInTeamPlayer()
{
new ts[32], cts[32];
new tCount, ctCount;
get_players(ts, tCount, "e", "TERRORIST");
get_players(cts, ctCount, "e", "CT");
if (!tCount && !ctCount)
return 0;
new index = random(tCount + ctCount);
if (index >= tCount)
return cts[index - tCount];
return ts[index];
}
__________________