Raised This Month: $ Target: $400
 0% 

Storing players in Array


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 02-17-2009 , 13:42   Re: Storing players in Array
Reply With Quote #5

Something like this
Code:
#include <amxmodx> #define MAX_PLAYERS 32 new g_maxplayers; new g_Array[ MAX_PLAYERS+1 ]; public plugin_init() {     set_task( 5.0, "check", _, _, _, "b" );     g_maxplayers = get_maxplayers(); } public check( ) {     new j;     for( new i = 1; i <= g_maxplayers; i++ )     {         if( !is_user_alive( i ) )             continue;                     if( get_user_health( i ) < 50 )         {             g_Array[ j ] = i;             j++;         }     } }
__________________

anakin_cstrike 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 16:52.


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