jak zrobić, aby nie zabijało się swoich kolegów z teamu mocą danej klasy np rakietką. We wsparciu ogniowym jest takie coś:
if (!is_user_alive(pid) || get_user_team(attacker) == get_user_team(pid)) rowny teamowi obrywajacego to idziemy dalej
continue;
A jak to zrobić gdy mamy takie coś:
if( pev( pEntity, pev_takedamage ) != DAMAGE_NO )
{
// Check if this is player and player on team
if( is_user_valid_connected( pEntity ))
{
// Retrieve health
static iHealth
iHealth = get_user_health( pEntity )
// We should be alive
if( iHealth - flDamage >= 1 )
{
// Cause some damage
ExecuteHamB( Ham_TakeDamage, pEntity, 0, Player, flDamage, DMG_BULLET | DMG_ALWAYSGIB )
}
else
{
// Die
g_bKilledByLaser[ pEntity ] = true
ExecuteHamB( Ham_Killed, pEntity, Player, 2 )
g_bKilledByLaser[ pEntity ] = false
}
}