Raised This Month: $ Target: $400
 0% 

getting number of t's


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 07-14-2012 , 06:30   Re: getting number of t's
Reply With Quote #2

PHP Code:
 new players[32], numT
get_players
playersnumT"ae""TERRORIST" 
Yes, the number or alive terrorists will be saved in the numT variable.

PHP Code:
static i
for(1<= g_max_clientsi++)
if(
is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_T)
       
set_user_health(i100
Since you use get_players, it's better to make this loop like this:

PHP Code:
static i
for(0numTi++)
       
set_user_health(players[i],100
In players array you have the indexes of all alive terrorists.
__________________
<VeCo> 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:19.


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