Raised This Month: $ Target: $400
 0% 

[ Solved ] How to get num of terrorists ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 08-23-2008 , 19:51   Re: How to get num of terrorists ?
Reply With Quote #4

Don't use that method anyway, though it seems the most common sense way to do it.

Before I give you updated code, I have to question why the hell you'd be looping this. That's a bad idea and needless to boot. Do you want to know the current T count at any given moment?

This code will give you the T count:
Code:
new players[32], playerCnt, playerIdx, terroristCnt;
get_players(players, playerCnt);

for (playerIdx = 0; playerIdx < playerCnt; playerIdx++)
{
   if (get_user_team(players[playerIdx]) == 2)
   {
      terroristCnt++;
   }
}
You'll need to confirm if terrorists are team 1 or 2 as I can't recall at the moment.
__________________
Brad 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:10.


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