Raised This Month: $ Target: $400
 0% 

All players name problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 09-04-2008 , 16:48   Re: All players name problem
Reply With Quote #4

Trying to get all player names and printing to admin's console.

Code:
enum {     TEAM_NONE,     TEAM_T,     TEAM_CT,     TEAM_SPEC,         MAX_TEAMS }; #define OFFSET_TEAM 114 #define fm_get_user_team(%1) get_pdata_int(%1, OFFSET_TEAM) new g_max_clients; public plugin_init() {     // ...     g_max_clients = get_maxplayers(); } // ... new name[32], team, all_names[MAX_TEAMS][sizeof(name) * 32]; // 32 player names for( new i = 1; i <= g_max_clients; i++ ) {     if( !is_user_connected(i) )     {         continue;     }         team = fm_get_user_team(i);     if( team != TEAM_T && team != TEAM_CT )     {         continue;     }         get_user_name(i, name, sizeof(name) - 1);     if( all_names[team][0] )     {         format(all_names[team], sizeof(all_names[]) - 1, "%s, %s", all_names[team], name);     }     else     {         copy(all_names[team], sizeof(all_names[]) - 1, name);     } } console_print(client, "%s ; %s", all_names[TEAM_T], all_names[TEAM_CT]);
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by Exolent[jNr]; 09-06-2008 at 13:58.
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:15.


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