Raised This Month: $ Target: $400
 0% 

get_players team


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 06-13-2010 , 10:39   Re: get_players team
Reply With Quote #1

new iPlayers[32]
new iNum

get_players(iPlayers, iNum, "ch" /*Ingnores Bots and HLTV */, "TERRORIST" or "CT")
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 06-13-2010 , 11:03   Re: get_players team
Reply With Quote #2

get_players(players,num,"ceh","TERRORIST");

This returns CTs, too.

Edit:

This should select one player as a random T:
PHP Code:
public random_t()
{
    new 
players[g_maxplayers];
    static 
num;
    
    
get_players(players,num,"ceh","TERRORIST");
    
    if(
num)
    {
        new 
random_num(1num);
        
        if(
is_user_connected(x) && is_user_alive(x))
            
g_random_t x;
    }


Last edited by Backstabnoob; 06-13-2010 at 11:24.
Backstabnoob is offline
Reply



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 14:56.


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