Hello, I got a Lifes system, I wanna do if X team has 0 lives (between all players) forces round to end and give a Win to the opposite team.
What should I do?
I got
thats where lives are stored.
also
What should I do?
I got
PHP:
new g_iLives[ 33 ];
also
PHP:
public CSGameRules_DeathNotice( victim, attacker, shouldgib )
{
if(!g_bRoundEnding)
set_task( 1.5, "task_Spawn", victim );
}
public Round_Started()
{
g_bRoundEnding = false
for( new id = 1; id <= g_iMaxPlayers; id++ )
{
if( is_user_connected( id ) )
g_iLives[ id ] = 2;
}
}
public End_round()
{
g_bRoundEnding = true
}
public task_Spawn( id )
{
if( g_iLives[ id ] > 0 )
{
ExecuteHamB( Ham_CS_RoundRespawn, id );
g_iLives[ id ]--;
}
else
ChatColor( id, "!g[Test]!y You have 0 lifes, you wont respawn anymore" );
}