Raised This Month: $ Target: $400
 0% 

check alive players from a team problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Owyn
Veteran Member
Join Date: Nov 2007
Old 04-06-2009 , 14:57   Re: check alive players from a team problem
Reply With Quote #9

look, i tried to rewrite it:
PHP Code:
checkAlive(const team[])
{

    new 
players[32], iTotalPlayersibool:g_event true
    get_players
playersiTotalPlayers );
    
    if ( 
equaliteam"CT") )
    {
        for ( 
0iTotalPlayersi++ )
            {            
                if ( !
is_user_alive(i) && cs_get_user_team(i) == )
                    {
                        
g_event false
                        
break
                    }
            }
    }
    
    if ( 
equaliteam"TE") )
    {
        for ( 
0iTotalPlayersi++ )
            {            
                if ( !
is_user_alive(i) && cs_get_user_team(i) == )
                    {
                        
g_event false
                        
break
                    }
            }
    }


    for (new 
6<= get_maxplayers(); i++)
        if (
g_event && is_user_connected(i))
            
set_task(1.5"doevent"team[0])
    
    return 
1

but it crashes server )=
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.
Owyn is offline
Send a message via ICQ to Owyn
 



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 02:18.


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