Raised This Month: $ Target: $400
 0% 

How to get the names of the players terrorists?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 02-04-2010 , 14:20   How to get the names of the players terrorists?
Reply With Quote #1

How to get the names of the players terrorists?
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
01101101
BANNED
Join Date: Nov 2009
Location: 9`su 09`n0n7e`r0f76a
Old 02-04-2010 , 14:20   Re: How to get the names of the players terrorists?
Reply With Quote #2

get_user_name
01101101 is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 02-04-2010 , 14:24   Re: How to get the names of the players terrorists?
Reply With Quote #3

I already know, but I just want to get the names of players who are playing terrorists.

PD:
It's a internal funcion
Code:
gettts() { static iTs, id iTs = 0   for (id = 1; id <= g_maxplayers; id++) { if (is_user_connected(id)) { if (fm_get_user_team(id) == CS_TEAM_T) iTs++ } }   return iTs; }

but this return in number.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
01101101
BANNED
Join Date: Nov 2009
Location: 9`su 09`n0n7e`r0f76a
Old 02-04-2010 , 14:29   Re: How to get the names of the players terrorists?
Reply With Quote #4

In that loop get the name and store it in an array.

Like get_user_name(id, names[iTs++], 31)
01101101 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-04-2010 , 15:44   Re: How to get the names of the players terrorists?
Reply With Quote #5

http://www.amxmodx.org/funcwiki.php?go=func&id=174

Counter-Strike team names:
  1. "UNASSIGNED"
  2. "TERRORIST"
  3. "CT"
  4. "SPECTATOR"
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-04-2010 , 16:37   Re: How to get the names of the players terrorists?
Reply With Quote #6

untested
Code:
new szNames[ 32 ][ 33 ]; new iNum = gettts( szNames ); gettts( arrPlayers[][] ) {      static iTs, id      iTs = 0        for (id = 1; id <= g_maxplayers; id++)      {           if (is_user_connected(id))           {                if (fm_get_user_team(id) == CS_TEAM_T)                {                     get_user_name( id , arrPlayers[ iTs++ ] , 32 );                }           }      }      return iTs; }
__________________

Last edited by Bugsy; 02-04-2010 at 16:43.
Bugsy is offline
01101101
BANNED
Join Date: Nov 2009
Location: 9`su 09`n0n7e`r0f76a
Old 02-04-2010 , 16:56   Re: How to get the names of the players terrorists?
Reply With Quote #7

(I know you used it because he used it)

But why using fm_get_user_team instead of cs_get_user_team which is much faster?
01101101 is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 02-04-2010 , 17:40   Re: How to get the names of the players terrorists?
Reply With Quote #8

Thanks Exolent & Bugsy !

Now Testing!

Quote:
Originally Posted by 01101101 View Post
(I know you used it because he used it)

But why using fm_get_user_team instead of cs_get_user_team which is much faster?
If you say to me, I only copy and paste the function of the Zombie Plague.



PD : Bugsy not found D:
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.

Last edited by lucas_7_94; 02-04-2010 at 18:39.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
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 07:28.


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