Raised This Month: $ Target: $400
 0% 

Help with Tag mismatch


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 07-09-2012 , 23:45   Re: Help with Tag mismatch
Reply With Quote #8

His way: 32 loop iterations, 8 native calls per (for alive\connected\team\bot checking, twice)
get_players: No excess iterations and no other natives.

His code can be optimized a bit, and FYI, if you are ever checking if connected AND alive, just check if alive because that includes a connected check.
PHP Code:
new g_iMaxPlayers;

g_iMaxPlayers get_maxplayers();

for ( new 
<= g_iMaxPlayers i++ )
{
    if ( !
is_user_alive) || is_user_bot) )
        continue;
    
    switch ( 
get_user_team) )
    {
        case 
CS_TEAM_T:
        {
            
        }
        case 
CS_TEAM_CT:
        {
            
        }
    }

__________________

Last edited by Bugsy; 07-09-2012 at 23:52.
Bugsy 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:23.


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