Raised This Month: $ Target: $400
 0% 

[Help] Count player connecting ,etc....


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-12-2010 , 16:12   Re: [Help] Count player connecting ,etc....
Reply With Quote #2

1. You can use get_playersnum() without all that extra nonsense.
Code:
new iPlayerCount = get_playersnum( ); // or new iPlayers[ 32 ], iNum; get_players( iPlayers, iNum ); // iNum = connected players

2. Check the player team, then change the variable accordingly.

Code:
switch( get_user_team( iPlayer ) ) {     case 0:     {         // unassigned     }     case 1:     {         // terrorist     }     case 2:     {         // counter-terrorist     }     case 3:     {         // spectator     } } // or switch( cs_get_user_team( iPlayer ) ) {     case CS_TEAM_UNASSIGNED:     {         // unassigned     }     case CS_TEAM_T:     {         // terrorist     }     case CS_TEAM_CT:     {         // counter-terrorist     }     case CS_TEAM_SPECTATOR:     {         // spectator     } }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 03:50.


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