Checking if there is someone alive.
#5

Quote:
Originally Posted by ReVo_
Посмотреть сообщение
new bool:Alive[MAX_PLAYERS] = {true,...};

Where u want to check

new alives = 0;
for ( new i = 0 , j = GetMaxPlayers( ) ; i < j ; ++ i ) {
if( ! IsPlayerConnected( i ) ) continue;
if( Alive[ i ] == false ) continue;
alives ++;
}

if ( alives == 1 ) {
SendClientMessageToAll( -1 , "one is alive" );
}
I didn't quite get this part, where actually is the best part to add this code?
Reply


Messages In This Thread
Checking if there is someone alive. - by ValentinLaw - 18.08.2012, 22:32
Re: Checking if there is someone alive. - by ReVo_ - 18.08.2012, 22:39
Re: Checking if there is someone alive. - by Larceny - 18.08.2012, 22:51
Re: Checking if there is someone alive. - by Youice - 18.08.2012, 23:44
Re: Checking if there is someone alive. - by ValentinLaw - 21.08.2012, 18:39
Re: Checking if there is someone alive. - by Finn - 21.08.2012, 19:52

Forum Jump:


Users browsing this thread: 1 Guest(s)