Quote:
Originally Posted by fysiks
Found a few threads in the Scripting Help forum (this one) with a quick search for "get_players team". Here is one that should help. This one talks about the difference between the new and old versions of the function.
Interestingly, I found that the official documentation actually shows an example for getting all players on a team that are also alive (for both versions here and here).
|
mm i know this already, but I was hoping to know, how to find the players of the team opposite yours, which team to put in the native, thinking about what will change
Like:
PHP Code:
static Team[16];
get_opposite_team( id, Team, 15 );
new players[g_maxplayers];
static num;
get_players(players,num,"be", Team);
but the question is to make the "get_opposite_team" function
edit: here is the function...
PHP Code:
stock get_opposite_team( Client, Opposite[] )
{
static Name[1];
get_user_team( Client, Team, 1 );
switch(Team[0])
{
case 'C': // CT
{
Opposite = Terrorist
}
case 'T': // Terrorist
{
Opposite = CT
}
case 'A': // i dont know in this one, if the game is in all vs all?
{
Opposite = All
}
}
}