Raised This Month: $ Target: $400
 0% 

get_players


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
MrPickles
Senior Member
Join Date: Aug 2022
Location: Colombia
Old 10-18-2022 , 00:15   Re: get_players
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
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_teamidTeam15 );

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_teamClientOpposite[] )
{
       static 
Name[1]; 

       
get_user_teamClientTeam);

       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
           
}
       }      


Last edited by MrPickles; 10-18-2022 at 01:04.
MrPickles is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:40.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode